[PATCH 1 of 4 Series-B] clfilter: enforce hidden changeset globally

Pierre-Yves David pierre-yves.david at logilab.fr
Tue Jan 8 12:22:37 CST 2013


On Tue, Jan 08, 2013 at 10:16:49AM -0600, Kevin Bullock wrote:
> On Jan 8, 2013, at 7:04 AM, pierre-yves.david at logilab.fr wrote:
> 
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> > # Date 1357580178 -3600
> > # Node ID a342ff119d504e34d22c5ad52a172d6addf121db
> > # Parent  b92288b31fc0c2099068928a7a0ef36cd2dc5a6d
> > clfilter: enforce hidden changeset globally
> > 
> > The dispatch code now enables filtering of "hidden" changesets globally. The
> > filter is installed before command and extension invocation. The `--hidden`
> > switch is now global and disables this filtering for any command.
> > 
> > Code in log dedicated to changeset exclusion is removed as this global filtering
> > has the same effect.
> > 
> > diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> > --- a/mercurial/localrepo.py
> > +++ b/mercurial/localrepo.py
> > @@ -56,10 +56,21 @@ def unfilteredmethod(orig):
> >     """decorate method that always need to be run on unfiltered version"""
> >     def wrapper(repo, *args, **kwargs):
> >         return orig(repo.unfiltered(), *args, **kwargs)
> >     return wrapper
> > 
> > +
> > +def computeunserved(repo):
> > +    """compute the set of revision that should be filtered when used a server
> > +
> > +    Secret and hidden changeset should not pretend to be here."""
> > +    assert not repo.changelog.filteredrevs
> > +    # fast path in simple case to avoid impact of non optimised code
> > +    if phases.hassecret(repo) or repo.obsstore:
> > +        return frozenset(repo.revs('hidden() + secret()'))
> > +    return ()
> > +
> 
> Rebase artifact? This is already in repoview.

Yes, this change to localrepo can be dropped.

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130108/f5a0c3a6/attachment.pgp>


More information about the Mercurial-devel mailing list