[PATCH 03 of 13] histedit: don't cleanup nodes already disposed of

Boris Feld boris.feld at octobus.net
Thu Sep 27 13:08:35 EDT 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1537991489 -7200
#      Wed Sep 26 21:51:29 2018 +0200
# Node ID b425c3186b916eef5e315962fb73491f046e10bf
# Parent  55f1732982232e65d0ccabbfe4e3e38036c028f9
# EXP-Topic trackfold
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b425c3186b91
histedit: don't cleanup nodes already disposed of

If something else took care of these temporary nodes, we don't need to do
anything about it. This less liberal usage of pruning through cleanup nodes
will help us further cleanup on the road to explicitly tracks folds.

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1202,7 +1202,8 @@ def _finishhistedit(ui, repo, state, fm)
         mapping = {}
 
     for n in tmpnodes:
-        mapping[n] = ()
+        if n in repo:
+            mapping[n] = ()
 
     # remove entries about unknown nodes
     nodemap = repo.unfiltered().changelog.nodemap


More information about the Mercurial-devel mailing list