[PATCH 07 of 12] localrepo: don't clear filecache on _rollback and destroyed (issue3335) (issue3693)

Idan Kamara idankk86 at gmail.com
Tue Jan 8 13:06:54 CST 2013


On Tue, Jan 8, 2013 at 7:53 PM, Pierre-Yves David <
pierre-yves.david at logilab.fr> wrote:
>
> On Mon, Dec 17, 2012 at 05:35:32PM +0200, Idan Kamara wrote:
> > # HG changeset patch
> > # User Idan Kamara <idankk86 at gmail.com>
> > # Date 1355689904 -7200
> > # Branch stable
> > # Node ID 92641ad93e4cbb3e570a6630d5ded31db3b1bec3
> > # Parent  15e21c2dbb278e679418782a30047b02f69dc6af
> > localrepo: don't clear filecache on _rollback and destroyed (issue3335)
> > (issue3693)
> >
> > We need to make sure that if X is in the filecache then it's also in the
> > filecache owner's __dict__, otherwise it will go out of sync:
> >
> > repo.X                  # first access to X, records stat info in
> > filecache and updates __dict__
> > repo._filecache.clear() # removes X from _filecache but it's still in
> > __dict__
> > repo.invalidate()       # iterates over _filecache and removes entries
> > from __dict__
> >                         # but X isn't in _filecache, so it's kept in
> > __dict__
> > repo.X                  # X is fetched from __dict__, bypassing the
> > filecache
>
> sound like you are doing two thing here:
>
> (1) ensuring that repo._filecache.clear() always result in a pop of
> __dict__
> (2) remove an invalidation call.
>
> Can that be two changeset so we could validates each change independently
> ?

Sure, assuming it doesn't break tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130108/3803e47e/attachment.html>


More information about the Mercurial-devel mailing list