[issue764] hg strip can create a cross between changelog revs and manifest linkrevs, leading to eventual corruption
Richard Lowe
mercurial-bugs at selenic.com
Fri Oct 5 00:40:20 UTC 2007
New submission from Richard Lowe <richlowe at richlowe.net>:
it's possible for strip to create a situation where a changelog rev, and a
manifest link rev cross:
cl man
10 -> 11
11 -> 10
Which, if strip is then used again, will cause a dangling linkrev in the
manifest, and thus repo corruption.
A snippet from #mercurial, about this issue is probably the better explanation:
<cmason> mpm, ok I finally get it
<cmason> (how the crossover happens)
<cmason> we start with a valid repo that looks like this:
<cmason> changeset 5 -> manifest 2
<cmason> changeset 3 -> manifest 3
<cmason> manifest 2 has a linkrev -> changeset 2
<cmason> changeset 2 only has one child, changeset 4. So, stripping
changeset 2 means we have to bundle off changesets 3 and 5 and
unbundle them later
<cmason> when we unbundle, we go in changeset order. changeset 3 first
and then changeset 5
<cmason> but, the manifests stored in the bundle were pulled right out
of the manifest revlog. this produces the cross
a script to reproduce this is attached.
----------
files: test-strip.sh
messages: 4071
nosy: richlowe
priority: urgent
status: unread
title: hg strip can create a cross between changelog revs and manifest linkrevs, leading to eventual corruption
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue764>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-strip.sh
Type: application/x-shellscript
Size: 1219 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20071005/58d07e1c/attachment-0002.bin>
More information about the Mercurial-devel
mailing list