noob trouble with web interface and repo corruption on windows

Adrian Buehlmann adrian at cadifra.com
Wed Jan 26 10:26:36 CST 2011


On 2011-01-26 16:57, Adrian Buehlmann wrote:
> On 2011-01-26 16:07, Rafkind, David (US - Boston) wrote:
>> Thanks for the help all. To close this, the solution was to install MINGW32 and use that to build and install "impure" (C-based) mercurial.
> 
> You will also have to install the pywin32 package. Current version is at
> (choose the correct installer matching your version of python):
> 
>   http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/
> 
> or you will be hit by issue1922, which is repository corruption in
> hardlinked clones.
> 
> For what a hardlinked clone is, see
> 
>   http://mercurial.selenic.com/wiki/HardlinkedClones
> 
> To produce and see the corruption, you can, for example, do (on Windows,
> of course. Only do this with throwaway test data repositories!):
> 
>     $ hg clone repoA repoB
>     updating to branch default
>     4 files updated, 0 files merged, 0 files removed, 0 files unresolved

I forgot to say here that this clone operation needs a version of
mercurial that can create hardlinks on Windows. Your version of hg
should not be able to create hardlinks *if* pywin32 is not installed,
but all binary installers will be able to do this. So if you happen to
have TortoiseHg installed as well, you *will* get hardlinked clones.
It's pretty easy to get hardlinked clones.

> Now, repoB and repoA are hardlinked with each other (at least some files
> inside and below the .hg directory). Now do:
> 
>     $ cd repoA
>     $ echo foo > bla.txt
>     $ hg add bla.txt
>     $ hg ci -mbla
> 
> repoA is still fine:
> 
>     $ hg verify
>     checking changesets
>     checking manifests
>     crosschecking files in changesets and manifests
>     checking files
>     6 files, 22 changesets, 23 total revisions
> 
> But repoB is now corrupt and verify detects it:
> 
>     $ cd ..
>     $ cd repoB
>     $ hg verify
>     checking changesets
>     checking manifests
>     crosschecking files in changesets and manifests
>     checking files
>      data/bla.txt.i at 21: missing revlog!
>      21: empty or missing bla.txt
>      bla.txt at 21: 26db3b532733 in manifests not found
>     6 files, 22 changesets, 22 total revisions
>     3 integrity errors encountered!
>     (first damaged changeset appears to be 21)
> 
> We are currently debating on a workaround for issue1922. Hopefully, we
> will manage to get a fix into the upcoming release 1.7.4 (due on Feb 1st).


More information about the Mercurial mailing list