[PATCH 00 of 12] RFC: Overlay repositories

Brendan Cully brendan at kublai.com
Sat Jan 13 17:15:28 CST 2007


Alexis pointed out that this problem can be avoided by converting the
fork revision to a full version if it's a delta. I've done this in the
current patch queue.

All tests pass, including hg verify on cloned repositories. I'd
appreciate it if people could review the current implementation. The
patch queue lives in

http://hg.kublai.com/mercurial/patches/overlay

and I've applied the queue to crew at

http://hg.kublai.com/mercurial/overlay

for easier browsing.

On Saturday, 13 January 2007 at 12:19, Brendan Cully wrote:
> On Wednesday, 03 January 2007 at 20:17, Alexis S. L. Carvalho wrote:
> > You probably want to hide/ignore revisions in a parent revlog if their
> > linkrev is larger than the changelog offset, otherwise at least hg pull
> > and hg log <filename> may be fooled[1].
> 
> Hmm, this seems to be a bit tricky to do with the current index
> format. The problem is that when I fork the revlog, I copy from tip
> back to the base revision of tip, and I use the base as the fork
> startrev. So I can't just trim revisions in the parent whose linkrev
> is greater than the overlay changelog's startrev, because that will
> lose revisions between base and the real tip of the fork.
> 
> parent changelog:
> rev 0 base 0 link 0 ...
> rev 1 base 0 link 1 ...
> 
> parent manifest:
> rev 0 base 0 link 0
> rev 1 base 0 link 1 ...
> 
> hg clone --overlay parent child
> 
> child changelog:
> rev 0 base 0 link 0 startrev 0
> rev 1 base 0 link 1
> 
> now when I open the child manifest, I need a way to determine that I
> should trim revisions with a link > 1, but not > 0 (the startrev). I
> don't have that in the current index format.
> 
> The only obvious solution to me is to put a header on the overlay
> index, or write a separate overlay metadata file into the store. Can
> anyone see a more clever trick?
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list