Properly inherit phase of relocated changeset.
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 19 Dec 2011 12:18:04 +0100
changeset 108 85271a8a7fb9
parent 107 f45325da7970
child 109 a2e8057117d3
Properly inherit phase of relocated changeset.
hgext/evolution.py
--- a/hgext/evolution.py	Mon Nov 28 00:59:42 2011 +0100
+++ b/hgext/evolution.py	Mon Dec 19 12:18:04 2011 +0100
@@ -130,6 +130,7 @@
         nodenew = rebase.concludenode(repo, rev, dest, node.nullid)
         nodesrc = repo.changelog.node(rev)
         repo.addobsolete(nodenew, nodesrc)
+        repo.setstate(repo.nodestate(nodesrc), [nodenew])
         oldbookmarks = repo.nodebookmarks(nodesrc)
         for book in oldbookmarks:
             repo._bookmarks[book] = nodenew
@@ -293,6 +294,7 @@
                         [old.p1().node(), old.p2().node()], opts)
 
         # reroute the working copy parent to the new changeset
+        repo.setstate(repo.nodestate(old.node()), [newid])
         repo.dirstate.setparents(newid, node.nullid)
 
     finally: