Commits

jcristau  committed 4f84b33

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

  • Participants
  • Parent commits 12ed6df

Comments (0)

Files changed (2)

File hgext/evolve.py

                 '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:
             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:

File tests/test-evolve.t

   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