Can't push. Any idea why?

Adrian Buehlmann adrian at cadifra.com
Mon Nov 29 08:03:13 UTC 2010


On 2010-11-29 07:38, lumeng.dev at gmail.com wrote:
> Can't push. Any idea why?
> 
> $ hg push ~/hg/repos/repotest
> pushing to /home/usr1/lx/hg/repos/repotest
> searching for changes
> adding changesets
> adding manifests
> adding file changes
> transaction abort!
> rollback completed
> abort: empty or missing revlog for DemoDevel/Project/._Foo.c
> $
> 
> I have tried to remove all files starting with ._ and added ._* into
> .hgignore.

In case you've executed a (non-Mercurial) command (shell or program)
that searches through the file system's directory tree, removing all
files starting with ._ and you did let recurse it inside the .hg
directory (which contains Mercurial's private metadata inside .hg/store
you shouldn't fiddle with yourself), then you probably have corrupted
your repository's stored history by deleting files beginning with "._"
inside .hg/store.

Running 'hg verify' (please do that) will most likely tell you too that
revlog files are missing.

You will need to restore that corrupted repository from a backup-ed one
(that hopefully passes verify, which you hopefully made sure when
creating the backup).

As a side note, the new repository format created for new repos by
default since release 1.7 ("dotencode", use 'hg clone --pull' to convert
older repos) by coincidence would have protected you from such a user
error, since it happens to encode leading dots on filenames inside
.hg/store. Which is not an excuse for failing to *not* touch files
inside .hg/store though.




More information about the Mercurial mailing list