[BUG] Problem with "stgit push" causing data loss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, "data loss" is a bit strong, since the data is still available
to find using git-lost-found.

I first tried to reproduce with a simple test-case, but could not, so
here is my way to reproduce it, on a clone of the stgit official
workspace.

stgit$ stg branch --create test origin
Branch "test" created.

 The test patch is my previous work on "pull --to", now superceded
 by "rebase".  Patch to reproduce attached to this mail - I just use
 "pick" since it's easier for me:

stgit$ ./stg pick -n pull-to 9abaec589753ab190d378b534ceaa6a5af5d0dd3
Checking for changes in the working directory... done
Importing commit 9abaec589753ab190d378b534ceaa6a5af5d0dd3... done
Now at patch "pull-to"
stgit$ stg files pull-to
M stgit/commands/pull.py
A t/t2100-pull-to.sh

 Now move the testcase in a new patch below, using my
 stg-fold-files-from already sent to the list:

stgit$ stg pop
Popping patch "pull-to"... done
No patches applied
stgit$ stg new test -m test
stgit$ stg-fold-files-from pull-to 't/*'
Folding patch from stdin... done
stgit$ stg refresh
Refreshing patch "test"... done
stgit$ stg files
A t/t2100-pull-to.sh

 And then push the old file over that:

$ stg push
Pushing patch "pull-to"...
Traceback (most recent call last):
  File "/usr/bin/stg", line 43, in ?
    main()
  File "/var/lib/python-support/python2.4/stgit/main.py", line 261, in main
    command.func(parser, options, args)
  File "/var/lib/python-support/python2.4/stgit/commands/push.py", line 101, in func
    push_patches(patches, options.merged)
  File "/var/lib/python-support/python2.4/stgit/commands/common.py", line 190, in push_patches
    modified = crt_series.push_patch(p)
  File "/var/lib/python-support/python2.4/stgit/stack.py", line 916, in push_patch
    git.merge(bottom, head, top)
  File "/var/lib/python-support/python2.4/stgit/git.py", line 535, in merge
    stages['2'][0], stages['3'][0]) != 0:
  File "/var/lib/python-support/python2.4/stgit/gitmergeonefile.py", line 203, in merge
    print >> sys.stderr, \
TypeError: not all arguments converted during string formatting

 State of things now:

stgit$ stg status
? t/t2100-pull-to.sh.current
? t/t2100-pull-to.sh.patched
M stgit/commands/pull.py
stgit$ diff t/t2100-pull-to.sh.*; echo $?
0
stgit$ stg files pull-to
stgit$ stg top
test

 As you can see, the pull-to patch is now in a situation that's not
 obvious to untangle by hand.  Also "stg push -m" exhibits the same
 issue.

Best regards,
-- 
Yann.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]