"hg push" errors with "could not lock repository"

Martin Marques martin at marquesminen.com.ar
Fri Apr 11 17:31:39 CDT 2008


Ethan Mallove escribió:
> On Thu, Apr/10/2008 05:46:45PM, Mart?n Marqu?s wrote:
>> On Thu, 10 Apr 2008 11:54:50 -0400, Ethan Mallove <ethan.mallove at sun.com>
>> wrote:
>>> Hello,
>>>
>>> What "lock" is "hg push" referring to below?
>>>
>>>   $ hg push
>>>   pushing to /foo/bar
>>>   abort: could not lock repository /foo/bar:
>>>   Permission denied
>>>
>>> Is there an "hg cleanup" command (like "svn cleanup") that
>>> removes locks?
>>>
>>> All files in the "hg" area are group-writable, and
>>> directories are everyone-executable. If I 777 everything,
>>> things seem to work, but this is obviously the wrong way to
>>> go.
>> If, as I see there, you have both clones on the same machine (Linux or some
>> UNIX as I see), you obviously have permission issues between different
>> users.
>>
>> What happens if you do this with the user that's trying to push:
>>
>> $ touch /foo/bar/.lock
>>
> 
> I could touch /foo/bar/.lock without a permission error, but
> I needed to do a little more. I needed to at least do these
> two chmod's:
> 
>   $ chmod g+w /foo/bar/.hg
>   $ chmod g+w /foo/bar/.hg/store

Well, looking at my .hg's it is a permission problem.

After hg init .hg and .hg/store have 755 permission, so if you're not 
the owner of the repository, you won't be able to write there. You can 
read, but not write.

> FYI -
> 
>   $ hg --version
>   Mercurial Distributed SCM (version 1.0)
>   $ uname -a
>   SunOS ... 5.10 Generic_120011-14 sun4u sparc

I've abandoned Solaris about a year ago. :-( Anyway, this is not SunOS 
related.


More information about the Mercurial mailing list