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

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 8, 2013, 8:10 p.m.
Message ID <48fa5ab19802141756e3.1357675844@yamac.lan>
Download mbox | patch
Permalink /patch/502/
State Accepted
Commit 9454e40e047ba8bf42b3c59030a345656f995875
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 1354629499 -3600
# Node ID 48fa5ab19802141756e3166c54ad76f18e684aa1
# Parent  6b0c3211fff2cd120d6c5837882b7978ba5b5e2c
clfilter: drop unnecessary explicit filtering on rebase

Hidden changeset filtered is now done a repo level. The rebaseset computation
will not include any (unless you add --hidden) of course.
Dave S - Jan. 8, 2013, 8:27 p.m.
Just minor stuff in the message ...

On Tue, Jan 8, 2013 at 12:10 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@logilab.fr>
> # Date 1354629499 -3600
> # Node ID 48fa5ab19802141756e3166c54ad76f18e684aa1
> # Parent  6b0c3211fff2cd120d6c5837882b7978ba5b5e2c
> clfilter: drop unnecessary explicit filtering on rebase
>
> Hidden changeset filtered is now done a repo level.

I'd suggest "filtering".

> The rebaseset computation
> will not include any (unless you add --hidden) of course.

"will not include any filtered c/s, of course, unless you add --hidden."

/dps

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -182,22 +182,20 @@  def rebase(ui, repo, **opts):
             else:
                 base = scmutil.revrange(repo, [basef or '.'])
                 rebaseset = repo.revs(
                     '(children(ancestor(%ld, %d)) and ::(%ld))::',
                     base, dest, base)
-            # temporary top level filtering of extinct revisions
-            rebaseset = repo.revs('%ld - hidden()', rebaseset)
             if rebaseset:
                 root = min(rebaseset)
             else:
                 root = None
 
             if not rebaseset:
                 repo.ui.debug('base is ancestor of destination\n')
                 result = None
             elif (not (keepf or obsolete._enabled)
-                  and repo.revs('first(children(%ld) - %ld)-hidden()',
+                  and repo.revs('first(children(%ld) - %ld)',
                                 rebaseset, rebaseset)):
                 raise util.Abort(
                     _("can't remove original changesets with"
                       " unrebased descendants"),
                     hint=_('use --keep to keep original changesets'))