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

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 8, 2013, 8:10 p.m.
Message ID <deb5f73c05f62b5395fe.1357675845@yamac.lan>
Download mbox | patch
Permalink /patch/503/
State Accepted
Commit 48deb483a8f83ee1cddf710ac95e14a220abdf31
Headers show

Comments

Pierre-Yves David - Jan. 8, 2013, 8:10 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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).
Bryan O'Sullivan - Jan. 9, 2013, 5:56 p.m.
On Tue, Jan 8, 2013 at 12:10 PM, Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

> clfilter: drop unnecessary explicit filtering on histedit
>

Series pushed to crew with minor edits, thanks.

Patch

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]