hgext/uncommit.py
changeset 41340 c9f1fd82a826
parent 41339 7be231f5a4ad
child 41341 19c590ce8661
--- a/hgext/uncommit.py	Fri Jan 18 17:09:42 2019 -0800
+++ b/hgext/uncommit.py	Sun Jan 20 22:00:21 2019 -0800
@@ -179,13 +179,13 @@
                 # Fully removed the old commit
                 mapping[old.node()] = ()
 
-            scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True)
-
             with repo.dirstate.parentchange():
                 repo.dirstate.setparents(newid, node.nullid)
                 s = old.p1().status(old, match=match)
                 _fixdirstate(repo, old, repo[newid], s)
 
+            scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True)
+
 def predecessormarkers(ctx):
     """yields the obsolete markers marking the given changeset as a successor"""
     for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()):