Tag caching, at last
mpm at selenic.com
Mon Jul 13 16:00:57 CDT 2009
On Sun, 2009-07-12 at 22:18 -0400, Greg Ward wrote:
> On Sun, Jul 12, 2009 at 8:34 PM, Matt Mackall<mpm at selenic.com> wrote:
> > On Fri, 2009-07-10 at 11:34 -0400, Greg Ward wrote:
> >> I finally have a working tag cache implementation. The "ah-ha" moment
> >> came when I realized we don't *have* to cache .hgtags contents, since
> >> that's not the most expensive part of reading tags.
> > I think you're still making that bit too hard. Simply write out the tags
> > as calculated and use them if and only if the cache is determined to be
> > fully up to date. No need to be clever. Remember: no change is the
> > common case.
> OK, sure, my *previous* implementations may have made life too hard by
> trying to be clever with .hgtags content. But giving up on caching
> .hgtags content makes things as simple as I can make them.
Yes, and I think that's been good for clarifying things.
> Here's the rub: strip can modify tag info without changing tip.
Which is why I think strip and friends should simply shoot the cache for
now, until we can figure out how to be more clever.
Even though I've said I don't want version numbers and that it's ok in
the future to just switch to a new format/filename, I -do- want to have
the format more or less pinned down. Even if you don't actually -use-
the tags you write out for now, I'd rather write them out so we don't
have to burn a disk format when we do figure out how to use them. Does
that make sense?
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel