views:

87

answers:

3

All of the emacs users on our development server are unable to do a bazaar commit to our development branch on launchpad. They receive this message:

bzr: ERROR: Cannot lock /.. /.bzr/checkout/dirstate: [Errno 13] Permission denied: u'/../.bzr/checkout/dirstate'

I've double-checked all of the permissions and everyone has their keys set up correctly. I'm using vim and have no problems.

Any other ideas?

Thanks, Jen

A: 

Look for a .lock file of some kind. Sometimes they don't get cleaned up after a crash and the resource stays locked. Maybe the Emacs plugin for bazaar created it and thats why vim doesn't care.

Kelly French
+1  A: 

This error does not look like it has anything to do with Launchpad's server side.

The error means bzr is failing to acquire a filesystem lock for the "checkout" part of the tree. The "checkout" in bzr represents the checked-out source files and associated metadata. It's what makes it possible to run "bzr st", "bzr add" and similar commands.

Since you describe the problem as emacs-specific, it might be something wrong with the emacs mode you are using for driving bzr. Is that VC, or DVC?

Generally, VC does not do what you would expect, because it's designed for centralized version control systems such as RCS, SCCS, CVS and Subversion. Make sure to investigate the use DVC instead.

The way you phrase it, you suggest that all developers are working on the same branch on a shared development server. That's a pretty unusual way to use a distributed version control, you should check that the .bzr/checkout directory has the appropriate permissions. For you that would be something like rwxrwtr-x. Note the setgid bit on directory.

The best place to get such problems resolved is the #bazaar channel on irc.freenode.net. Diagnosing and solving such problems often requires a number of roundtrips, and IRC is a more appropriate medium than stackoverflow.

ddaa
A: 

I'm with ddaa on this. It is almost certianly an issue with the emacs mode they are using to do their checkouts. Presumably they have no problem using the command-line interface to bzr, right?

The source code for the modes in usually found under the Emacs installation directory in either the lisp or site-lisp subdirectories. However, it is written in a special elisp language, so it is tough reading if you don't know elisp (or at least lisp in general). But if you post exactly what mode they are using, what version, and perhaps what version of emacs, there may be some folks reading who can enlighten you about known problems and whatnot.

T.E.D.