Error with sftp transport and file locking

Chris Seaton chris at chrisseaton.com
Sun Feb 26 18:19:46 GMT 2006


I've just created a new branch, running bzr init on some existing  
code, and I'm trying to publish it for the first time to my web  
server, using sftp.

bzr complains first about not being able to update the remote working  
tree - but doesn't say why it can't - and then gives an error that  
the file .bzr/branch-lock is already locked.

I tried deleting the .bzr directory and starting again, but it still  
thinks the file is locked. I even tried restarting. What am I doing  
wrong?

This is my ~/.bzr.log

bzr 0.7 invoked on python 2.4.2.final.0 (darwin)
   arguments: ['/usr/local/bin/bzr', 'push', 'sftp:// 
chrisseaton.skylis.net/httpdocs/projects/clifton/bzr']
   working dir: u'/Users/chrisseaton/Projects/Clifton'
looking for plugins in /usr/local/lib/python2.4/site-packages/bzrlib/ 
plugins
Plugin name __init__ already loaded
Plugin name __init__ already loaded
looking for plugins in /Users/chrisseaton/.bazaar/plugins
WARNING: using slower ElementTree; consider installing cElementTree  
and make sure it's on your PYTHONPATH
trying to open u'/Users/chrisseaton/Projects/Clifton' with transport  
<bzrlib.transport.local.LocalTransport object at 0x65bc10>
got branch format u'Bazaar-NG branch, format 6\n'
failed to open /Users/chrisseaton/Projects/Clifton/.bzr/stat-cache:  
[Errno 2] No such file or directory: u'/Users/chrisseaton/Projects/ 
Clifton/.bzr/stat-cache'
write hc
ssh implementation is OpenSSH
trying to open u'sftp://chrisseaton.skylis.net/httpdocs/projects/ 
clifton/bzr' with transport <bzrlib.transport.sftp.SFTPTransport  
object at 0x1047250>
got branch format u'Bazaar-NG branch, format 6\n'
[  215] Sun 18:14:18.490 WARNING: Unable to update the working tree  
of: sftp://chrisseaton.skylis.net/httpdocs/projects/clifton/bzr
[  215] Sun 18:14:18.581 ERROR: bzrlib.errors.LockError: File '.bzr/ 
branch-lock' already locked
   at /usr/local/lib/python2.4/site-packages/bzrlib/transport/sftp.py  
line 205
   in __init__
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py",  
line 572, in run_bzr_catch_errors
     return run_bzr(argv)
   File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py",  
line 534, in run_bzr
     ret = cmd_obj.run_argv(argv)
   File "/usr/local/lib/python2.4/site-packages/bzrlib/commands.py",  
line 233, in run_argv
     return self.run(**all_cmd_args)
   File "/usr/local/lib/python2.4/site-packages/bzrlib/builtins.py",  
line 515, in run
     count = br_to.pull(br_from, overwrite)
   File "/usr/local/lib/python2.4/site-packages/bzrlib/branch.py",  
line 87, in decorated
     self.lock_write()
   File "/usr/local/lib/python2.4/site-packages/bzrlib/branch.py",  
line 671, in lock_write
     self._lock = self._transport.lock_write(
   File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/ 
sftp.py", line 590, in lock_write
     return SFTPLock(relpath, self)
   File "/usr/local/lib/python2.4/site-packages/bzrlib/transport/ 
sftp.py", line 205, in __init__
     raise LockError('File %r already locked' % (self.path,))
LockError: File '.bzr/branch-lock' already locked

return code 3




More information about the bazaar mailing list