[PATCH 1 of 4] store all heads of a branch in the branch cache

John Mulligan phlogistonjohn at asynchrono.us
Tue Dec 23 06:53:39 CST 2008


On Mon, Dec 22, 2008 at 10:17:58PM -0600, Matt Mackall wrote:
> On Mon, 2008-12-22 at 19:25 -0500, John Mulligan wrote:
> > # HG changeset patch
> > # User John Mulligan <phlogistonjohn at asynchrono.us>
> > # Date 1229874763 18000
> > # Node ID 499372d70f9b1961857bdbd7e5177aed130775be
> > # Parent  3896310bd797a3c0db22654321e88db9cc73d3e7
> > store all heads of a branch in the branch cache
> > 
> > All heads of branches will be stored in the cache.
> > The new cache format is tagged so that old caches files are invalidated
> > so that heads distant from tip may be discovered.
> 
> This is a suboptimal way to do things, especially for a cache. Consider
> two different versions of hg accessing the same repo. If we alternate,
> we repeatedly rebuild the cache.

That is what happens currently.

> Or perhaps we confuse the hell out of
> the old hg. And we have to keep around extra logic to tell when we're
> looking at different file formats. Instead, if we just change the name
> to "branchheads.cache" and forget about the old file, there's no
> confusion at all.

That sounds good. Currently, there a few tests that cat out the contents
of the branch.cache file. Should they just be changed to point at the
new file, or something else?

Thanks.

--John M.



More information about the Mercurial-devel mailing list