Mercurial > hg-stable
diff mercurial/commands.py @ 17045:52ea9ce5b641 stable
graft: don't drop the second parent on unsuccessful merge (issue3498)
This replicates the strategy of rebase, which postpones setparents and
duplicatecopies after checking the merge stats.
Without the second parent, resolve cannot redo merge.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Jun 2012 17:05:55 +0900 |
parents | 6e578e77cbe6 |
children | fba17a64fa49 b558c9fa39c1 |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jun 26 14:50:16 2012 -0500 +++ b/mercurial/commands.py Sat Jun 16 17:05:55 2012 +0900 @@ -2696,11 +2696,6 @@ ctx.p1().node()) finally: repo.ui.setconfig('ui', 'forcemerge', '') - # drop the second merge parent - repo.setparents(current.node(), nullid) - repo.dirstate.write() - # fix up dirstate for copies and renames - cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev()) # report any conflicts if stats and stats[3] > 0: # write out state for --continue @@ -2712,6 +2707,12 @@ else: cont = False + # drop the second merge parent + repo.setparents(current.node(), nullid) + repo.dirstate.write() + # fix up dirstate for copies and renames + cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev()) + # commit source = ctx.extra().get('source') if not source: