Mercurial > evolve
comparison hgext/evolve.py @ 901:4f84b3307dc2 stable
Fix preservation of rename information on evolve (#33)
Following what rebase itself does, call duplicatecopies between
rebasenode and concludenode.
Should fix
https://bitbucket.org/marmoute/mutable-history/issue/33/evolve-command-loses-copy-metadata
author | Julien Cristau <julien.cristau@logilab.fr> |
---|---|
date | Mon, 14 Apr 2014 18:16:35 +0200 |
parents | 12ed6dfa8eea |
children | c17ab719da56 3b7dfa9bb789 |
comparison
equal
deleted
inserted
replaced
893:12ed6dfa8eea | 901:4f84b3307dc2 |
---|---|
743 if not orig.p2().rev() == node.nullrev: | 743 if not orig.p2().rev() == node.nullrev: |
744 raise util.Abort( | 744 raise util.Abort( |
745 'no support for evolution merge changesets yet', | 745 'no support for evolution merge changesets yet', |
746 hint="Redo the merge a use `hg prune` to obsolete the old one") | 746 hint="Redo the merge a use `hg prune` to obsolete the old one") |
747 destbookmarks = repo.nodebookmarks(dest.node()) | 747 destbookmarks = repo.nodebookmarks(dest.node()) |
748 cmdutil.duplicatecopies(repo, orig.node(), dest.node()) | |
749 nodesrc = orig.node() | 748 nodesrc = orig.node() |
750 destphase = repo[nodesrc].phase() | 749 destphase = repo[nodesrc].phase() |
751 try: | 750 try: |
752 r = rebase.rebasenode(repo, orig.node(), dest.node(), | 751 r = rebase.rebasenode(repo, orig.node(), dest.node(), |
753 {node.nullrev: node.nullrev}, False) | 752 {node.nullrev: node.nullrev}, False) |
754 if r[-1]: #some conflict | 753 if r[-1]: #some conflict |
755 raise util.Abort( | 754 raise util.Abort( |
756 'unresolved merge conflicts (see hg help resolve)') | 755 'unresolved merge conflicts (see hg help resolve)') |
756 cmdutil.duplicatecopies(repo, orig.node(), dest.node()) | |
757 nodenew = rebase.concludenode(repo, orig.node(), dest.node(), | 757 nodenew = rebase.concludenode(repo, orig.node(), dest.node(), |
758 node.nullid) | 758 node.nullid) |
759 except util.Abort, exc: | 759 except util.Abort, exc: |
760 class LocalMergeFailure(MergeFailure, exc.__class__): | 760 class LocalMergeFailure(MergeFailure, exc.__class__): |
761 pass | 761 pass |