RevlogError - index data corrupted when pushing new files via https

Adrian Buehlmann adrian at cadifra.com
Sun Jan 30 11:41:18 CST 2011


On 2011-01-30 16:48, Greg Ward wrote:
> On Thu, Jan 27, 2011 at 10:03 AM, Richard Mason <richard at rikware.com> wrote:
>> I'm trying to update a Windows http mercurial server to 1.7.3 to support
>> dotencode repositories but have run into a problem I can't find mentioned
>> anywhere.
> [...]
>>   File "C:\Python27\lib\site-packages\mercurial\localrepo.py", line 1769, in addchangegroup
>>     fl = self.file(f)
>>   File "C:\Python27\lib\site-packages\mercurial\localrepo.py", line 555, in file
>>     return filelog.filelog(self.sopener, f)
>>   File "C:\Python27\lib\site-packages\mercurial\filelog.py", line 24, in __init__
>>     "/".join(("data", path + ".i")))
>>   File "C:\Python27\lib\site-packages\mercurial\revlog.py", line 273, in __init__
>>     raise RevlogError(_("index %s is corrupted") % (self.indexfile))
>> RevlogError: index data/Test.txt.i is corrupted
> 
> That's funny.  There should be no uppercase filenames in
> .hg/store/data; that file should be _test.txt.i.

That's not correct, Greg. The filename revlog.py is seeing is the
unencoded filename. If it has a problem with a file, it will throw back
the unencoded filename.

I hacked the contents of the real file .hg/store/data/_test.txt.i inside
a testrepo and got:

  $ hg --traceback up
  Traceback (most recent call last):
    File "mercurial\dispatch.pyo", line 58, in _runcatch
    File "mercurial\dispatch.pyo", line 590, in _dispatch
    File "mercurial\dispatch.pyo", line 401, in runcommand
    File "mercurial\dispatch.pyo", line 641, in _runcommand
    File "mercurial\dispatch.pyo", line 595, in checkargs
    File "mercurial\dispatch.pyo", line 588, in <lambda>
    File "mercurial\util.pyo", line 426, in check
    File "mercurial\extensions.pyo", line 130, in wrap
    File "mercurial\util.pyo", line 426, in check
    File "hgext\mq.pyo", line 3029, in mqcommand
    File "mercurial\util.pyo", line 426, in check
    File "mercurial\commands.pyo", line 3887, in update
    File "mercurial\hg.pyo", line 381, in update
    File "mercurial\merge.pyo", line 537, in update
    File "mercurial\merge.pyo", line 341, in applyupdates
    File "mercurial\context.pyo", line 349, in data
    File "mercurial\util.pyo", line 169, in __get__
    File "mercurial\context.pyo", line 249, in _filelog
    File "mercurial\localrepo.pyo", line 555, in file
    File "mercurial\filelog.pyo", line 24, in __init__
    File "mercurial\revlog.pyo", line 273, in __init__
  RevlogError: index data/Test.txt.i is corrupted
  abort: index data/Test.txt.i is corrupted!

The filename encoding is done by the store opener, which is a layer
below revlog.py.

> Is there really a
> file called .hg/store/data/Test.txt.i (uppercase T) in either the
> source or destination repo?

No, there wouldn't be, even if Richard had no problem. That's an
artificial internal name. There is not such path in the filesystem. At
least not for a repo using a recent enough repo format (e.g. fncache,
dotencode).

> Other relevant questions just to rule out other possible problems:
>   * any virus scanner on the target machine?  if so, is it disabled
> for the target .hg directory?
>   * is it a local filesystem?
>   * what filesystem?
>   * what version of Windows?

Extensions used might be interesting too.


More information about the Mercurial mailing list