D5660: uncommit: mark old node obsolete after updating dirstate
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Jan 23 06:37:55 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The next patch will start doing more things with the context object
for the old node and that ran into problems without this
change. Regardless of that, I think it seems better to first update to
the new node and then mark the old node obsolete.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5660
AFFECTED FILES
hgext/uncommit.py
CHANGE DETAILS
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(), ()):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list