hg repo has empty or missing revlogs

Matt Mackall mpm at selenic.com
Wed Oct 1 13:34:18 CDT 2008


On Wed, 2008-10-01 at 14:22 -0400, Sanjoy Mahajan wrote:
> > Notice a pattern in these names? They're all temporary files that got
> > checked in by mistake.
> 
> Right.  They were in the habit of doing 'hg add' and committing every
> file in creation.  
> 
> > It looks like after 232 revisions, they learned to stop checking in
> > temporary files though.
> 
> After I found out about all the junk files going in, I gave them a
> reasonable .hgignore to reduce the useless files committed.  That might
> be the cause.
> 
> > I suspect if you dig a little deeper you'll either find that users
> > recursively deleted these files (accidentally clobbering the ones in
> > .hg) or an automated tool did.   Or, if you have really special users,
> > they may have intentionally deleted them.
> 
> Thanks for that plausible diagnosis.  The files wouldn't have been
> directly deleted on the server (it was only pushed to), but perhaps on
> one of the clients, whose push could have trashed the server repo.

Hmm, that shouldn't happen, but I suppose it's possible. Must check into
that.

> > You can clean up this repo by using the hg convert extension and
> > --filemap to filter out the temporary files.
> 
> Good idea.  Alas revision 6 is so messed up that when convert gets to
> that one, it fails with
> 
>   source: 1acd9e80eb68a6abb19a82a166acd8f4152b0e62
>   abort: data/codeSandbox/#SM.py#.i at 90215be98881: no match found!
> 
> I haven't managed to find a magic line in the filemap file that avoids
> this problem.

Yeah, there may be an issue with that. Somewhere in the list archives is
a magical ignore-all-data-integrity-problems extension that should fix
that up.

> > In the future, please write to mercurial at selenic.com, as I generally
> > don't answer Mercurial questions privately.
> 
> Apologies.  I'd written privately only because I couldn't make the
> repository public.  But point taken, thanks.
> 
> For the sake of public record-keeping (and future problem solving via
> google searching), should I send my original message to the list for you
> to resend your response there?  (And then I can send an edited version
> of this note as a followup.)

Please.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list