[PATCH 4 of 4 V2-SeriesB] clfilter: drop unnecessary explicit filtering on histedit

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jan 8 14:10:45 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1356346808 -3600
# Node ID deb5f73c05f62b5395feceda3b1d9e6004450200
# Parent  48fa5ab19802141756e3166c54ad76f18e684aa1
clfilter: drop unnecessary explicit filtering on histedit

Hidden changeset filtered is now done a repo level. The orphaned children
computation will not include any (unless you add --hidden of course).

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -592,11 +592,11 @@ def between(repo, old, new, keep):
 
     When keep is false, the specified set can't have children."""
     ctxs = list(repo.set('%n::%n', old, new))
     if ctxs and not keep:
         if (not obsolete._enabled and
-            repo.revs('(%ld::) - (%ld + hidden())', ctxs, ctxs)):
+            repo.revs('(%ld::) - (%ld)', ctxs, ctxs)):
             raise util.Abort(_('cannot edit history that would orphan nodes'))
         root = ctxs[0] # list is already sorted by repo.set
         if not root.phase():
             raise util.Abort(_('cannot edit immutable changeset: %s') % root)
     return [c.node() for c in ctxs]


More information about the Mercurial-devel mailing list