linkrev corruption (was Re: Corrupted repo? Full of unexpected changesets)

Augie Fackler raf at durin42.com
Sun Oct 29 18:37:16 EDT 2017


> On Oct 28, 2017, at 9:23 PM, Kim Alvefur <zash at zash.se> wrote:
> 
> Hi,
> 
> I've got a repo that, when running `hg verify`, produces a number of
> messages like:
> 
>> rev 42 points to unexpected changeset 6074
> 
> A tarball of the repo can be downloaded from
> <https://www.zash.se/upload/unexpected-changesets.tar.gz>
> 
> It's a clone of <https://hg.prosody.im/timber/>.
> 
> I'm not entirely sure what I have done to it. `hg debugupgraderepo` may
> have been involved, as well as hardlinking to other repos.
> 
> Oddly enough, the problem appears to follow along when it is cloned.

I’ve known about problems like this for a while - in fact, for a long time the way to fix them was to push them to code.google.com and then clone back out, as the nature of Google’s custom hg server meant it scrubbed these problems away.

I suppose for an “easy” fix we could add some sort of debug config setting that would re-guess linkrevs on the way in - it’d be *really* slow on large repos, but would work.

> I don't consider recovery of this particulary important, I'm more
> interested in knowing how this could have happened and, if this can be
> traced down no a bug in hg, seeing that fixed.

It’d be interesting to know if you can reproduce this with `hg debugupgraderepo`: if you can, please file a bug.

This corruption is partially harmless - it can result in pushes omitting file contents in such a way that the server has a broken history (which is how I discovered the problem.) We should probably figure out a way to fix it, especially now that GCode is gone.

AF

> 
> -- 
> Regards,
> Kim "Zash" Alvefur
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list