[PATCH 00 of 12] RFC: Overlay repositories

Brendan Cully brendan at kublai.com
Sat Jan 13 14:19:37 CST 2007


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?


More information about the Mercurial-devel mailing list