[PATCH 1 of 2 Series-Z] clfilter: add mutable filtering

Pierre-Yves David pierre-yves.david at logilab.fr
Tue Jan 8 05:35:49 CST 2013


On Tue, Jan 08, 2013 at 10:20:54AM +0100, Pierre-Yves David wrote:
> On Mon, Jan 07, 2013 at 07:36:26PM -0600, Kevin Bullock wrote:
> > On 7 Jan 2013, at 12:18 PM, pierre-yves.david at logilab.fr wrote:
> > 
> > > # HG changeset patch
> > > # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> > > # Date 1357088266 -3600
> > > # Node ID 889008e5dbeaea793ac4988f6a04f3b3d78ef8cf
> > > # Parent  a55b06885cda861cf989c987beac66cf49d5b15b
> > > clfilter: add mutable filtering
> > 
> > [...]
> > 
> > > diff --git a/tests/test-acl.t b/tests/test-acl.t
> > > --- a/tests/test-acl.t
> > > +++ b/tests/test-acl.t
> > [...]
> > > @@ -890,11 +897,11 @@ file specified by acl.config does not ex
> > >   calling hook pretxnchangegroup.acl: hgext.acl.hook
> > >   acl: checking access for user "barney"
> > >   error: pretxnchangegroup.acl hook raised an exception: [Errno *] *: '../acl.config' (glob)
> > >   transaction abort!
> > >   rollback completed
> > > -  abort: *: ../acl.config (glob)
> > > +  abort: No such file or directory: ../acl.config
> > 
> > ?
> 
> grmlml, slipped in during a rebase.
> 
> > > diff --git a/tests/test-keyword.t b/tests/test-keyword.t
> > > --- a/tests/test-keyword.t
> > > +++ b/tests/test-keyword.t
> > > @@ -746,12 +746,14 @@ Interrupted commit should not change sta
> > > 
> > > Commit with multi-line message and custom expansion
> > > 
> > >   $ hg --debug commit -l log -d '2 0' -u 'User Name <user at example.com>'
> > >   invalid branchheads cache: tip differs
> > > +  invalid branchheads cache (unserved): tip differs
> > >   a
> > >   invalid branchheads cache: tip differs
> > > +  invalid branchheads cache (unserved): tip differs
> > 
> > Two double-invalidations? What's going on here?
> 
> Double invalidation are expected. There is not hidden of secret changeset here.
> so `repo.unfiltered() == repo.filter("unserved")` here. If the cache in invalid
> for on version it is unfiltered for both.
> 
> The fact its is invalided twice was there before and is probably an artifact of
> the keyword extension.

Hum you are right this is a bit more tricky. Why is "unserved" cache
invalidated when we add "mutable" cache.

After the rollback, the "unserved" cache becomes invalid, but all changeset in
the repo are public. So "mutable" == "unserved" == ø.

As the "unserved" cache is invalid, we fall back to "mutable" cache. But not
update is needed between "mutable" and "unserved" cache and the "unserved"
cache is not updated on disk. The on disk version therefor stay invalid for
some time

I've updated the commit message to explain that.



-- 
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/41d26718/attachment.pgp>


More information about the Mercurial-devel mailing list