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

login
register
mail settings
Submitter Boris Feld
Date Sept. 27, 2018, 5:08 p.m.
Message ID <b425c3186b916eef5e31.1538068115@localhost.localdomain>
Download mbox | patch
Permalink /patch/35140/
State Accepted
Headers show

Comments

Boris Feld - Sept. 27, 2018, 5:08 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@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.

Patch

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