# old_bottom is different, there wasn't any previous 'refresh'
# command (probably only a 'push')
if old_bottom != patch.get_bottom() or old_top == patch.get_top():
- raise StackException, 'No refresh undo information available'
+ raise StackException, 'No undo information available'
git.reset(tree_id = old_top, check_out = False)
if patch.restore_old_boundaries():
# merge can fail but the patch needs to be pushed
try:
- git.merge(bottom, head, top)
+ git.merge(bottom, head, top, recursive = True)
except git.GitException, ex:
print >> sys.stderr, \
'The merge failed during "push". ' \
log = 'push'
self.refresh_patch(cache_update = False, log = log)
else:
+ # we store the correctly merged files only for
+ # tracking the conflict history. Note that the
+ # git.merge() operations shouls always leave the index
+ # in a valid state (i.e. only stage 0 files)
+ self.refresh_patch(cache_update = False, log = 'push(c)')
raise StackException, str(ex)
return modified
# modified by 'refresh'). If they are both unchanged, there
# was a fast forward
if old_bottom == patch.get_bottom() and old_top != patch.get_top():
- raise StackException, 'No push undo information available'
+ raise StackException, 'No undo information available'
git.reset()
self.pop_patch(name)