Mercurial > evolve
changeset 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 | 69872cef6053 |
files | hgext/evolve.py tests/test-evolve.t |
diffstat | 2 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Fri Apr 04 01:07:27 2014 +0200 +++ b/hgext/evolve.py Mon Apr 14 18:16:35 2014 +0200 @@ -745,7 +745,6 @@ 'no support for evolution merge changesets yet', hint="Redo the merge a use `hg prune` to obsolete the old one") destbookmarks = repo.nodebookmarks(dest.node()) - cmdutil.duplicatecopies(repo, orig.node(), dest.node()) nodesrc = orig.node() destphase = repo[nodesrc].phase() try: @@ -754,6 +753,7 @@ if r[-1]: #some conflict raise util.Abort( 'unresolved merge conflicts (see hg help resolve)') + cmdutil.duplicatecopies(repo, orig.node(), dest.node()) nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid) except util.Abort, exc:
--- a/tests/test-evolve.t Fri Apr 04 01:07:27 2014 +0200 +++ b/tests/test-evolve.t Mon Apr 14 18:16:35 2014 +0200 @@ -645,3 +645,28 @@ 4 : add 4 - test 5 : add 3 - test 11 : add 1 - test + + +Test evolving renames + + $ hg up null + 0 files updated, 0 files merged, 4 files removed, 0 files unresolved + $ echo a > a + $ hg ci -Am a + adding a + created new head + $ echo b > b + $ hg ci -Am b + adding b + $ hg mv a c + $ hg ci -m c + $ hg kill .^ + 1 changesets pruned + 1 new unstable changesets + $ hg stab --any + move:[15] c + atop:[13] a + $ hg st -C --change=tip + A c + a + R a