Can't push. Any idea why?

Augie Fackler durin42 at gmail.com
Mon Nov 29 17:10:11 CST 2010


On Nov 29, 2010, at 3:23 PM, lumeng.dev at gmail.com wrote:

> Hi,
> 
> 
> On Mon, Nov 29, 2010 at 12:25, lumeng.dev at gmail.com <lumeng.dev at gmail.com>wrote:
> 
>> Hi,
>> 
>> 
>> On Mon, Nov 29, 2010 at 08:11, Augie Fackler <durin42 at gmail.com> wrote:
>> 
>>> 
>>> On Nov 29, 2010, at 2:03 AM, Adrian Buehlmann wrote:
>>> 
>>>> 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.
>>> 
>>> He probably copied it from a non-HFS filesystem to an HFS filesystem using
>>> Finder on OS X. That'd cause exactly this class of corruption.
>>> 
>>> This is probably the issue. I am looking for solution to handling this. I
>> found BlueHarvest4 (http://www.zeroonetwenty.com/blueharvest4/)
>> 
> 
> Using this didn't fix the problem.

If anything, That would probably make things worse. The *problem* is that you used naive OS X tools to copy a Mercurial repository in a particular case that has issues. This has been fixed as of the latest release, but requires upgrading both your copy of mercurial and the repository, and won't retroactively fix the missing revlogs. You'll need to restore those from a backup. 'hg verify' may give you clues as to which files are missing.

> So how do I safely copy a repository?
> 
> The scenario is that I have been working on repoB on computerB cloned from
> repoA which is on computerA for a period, now I want to copy repoB to
> computerA and push the revisions to repoA.
> 
> Thanks!
> 
>> 
>> But what files should I delete?
>> (See attachment)
>> 
>> Thanks to all repliers.
>> 
>> 
>> 
>>>> 
>>>> 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.
>>>> 
>>>> _______________________________________________
>>>> Mercurial mailing list
>>>> Mercurial at selenic.com
>>>> http://selenic.com/mailman/listinfo/mercurial
>>> 
>>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20101129/9a035165/attachment.htm>


More information about the Mercurial mailing list