Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 17059:fba17a64fa49
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Jun 2012 00:40:52 -0500 |
parents | 55e7f352b1d3 52ea9ce5b641 |
children | 11f26e2669aa |
comparison
equal
deleted
inserted
replaced
17058:d5422faf648c | 17059:fba17a64fa49 |
---|---|
2750 repo.ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) | 2750 repo.ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) |
2751 stats = mergemod.update(repo, ctx.node(), True, True, False, | 2751 stats = mergemod.update(repo, ctx.node(), True, True, False, |
2752 ctx.p1().node()) | 2752 ctx.p1().node()) |
2753 finally: | 2753 finally: |
2754 repo.ui.setconfig('ui', 'forcemerge', '') | 2754 repo.ui.setconfig('ui', 'forcemerge', '') |
2755 # drop the second merge parent | |
2756 repo.setparents(current.node(), nullid) | |
2757 repo.dirstate.write() | |
2758 # fix up dirstate for copies and renames | |
2759 cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev()) | |
2760 # report any conflicts | 2755 # report any conflicts |
2761 if stats and stats[3] > 0: | 2756 if stats and stats[3] > 0: |
2762 # write out state for --continue | 2757 # write out state for --continue |
2763 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] | 2758 nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]] |
2764 repo.opener.write('graftstate', ''.join(nodelines)) | 2759 repo.opener.write('graftstate', ''.join(nodelines)) |
2765 raise util.Abort( | 2760 raise util.Abort( |
2766 _("unresolved conflicts, can't continue"), | 2761 _("unresolved conflicts, can't continue"), |
2767 hint=_('use hg resolve and hg graft --continue')) | 2762 hint=_('use hg resolve and hg graft --continue')) |
2768 else: | 2763 else: |
2769 cont = False | 2764 cont = False |
2765 | |
2766 # drop the second merge parent | |
2767 repo.setparents(current.node(), nullid) | |
2768 repo.dirstate.write() | |
2769 # fix up dirstate for copies and renames | |
2770 cmdutil.duplicatecopies(repo, ctx.rev(), ctx.p1().rev()) | |
2770 | 2771 |
2771 # commit | 2772 # commit |
2772 source = ctx.extra().get('source') | 2773 source = ctx.extra().get('source') |
2773 if not source: | 2774 if not source: |
2774 source = ctx.hex() | 2775 source = ctx.hex() |