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

Ethan Mallove ethan.mallove at sun.com
Fri Apr 11 10:05:20 CDT 2008


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

FYI -

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

-Ethan


More information about the Mercurial mailing list