Patchwork D5660: uncommit: mark old node obsolete after updating dirstate

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2019, 5:10 p.m.
Message ID <171dda7ca1242b6e0591a59b8acdeb7d@localhost.localdomain>
Download mbox | patch
Permalink /patch/37978/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2019, 5:10 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc9f1fd82a826: uncommit: mark old node obsolete after updating dirstate (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5660?vs=13372&id=13407

REVISION DETAIL
  https://phab.mercurial-scm.org/D5660

AFFECTED FILES
  hgext/uncommit.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -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(), ()):