Cannot lock: transport is read only

Bug #137157 reported by Tom Vetterlein
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

bzr: ERROR: bzrlib.errors.UnlockableTransport: Cannot lock: transport is read only: <bzrlib.transport.http._urllib.HttpTransport_urllib url=http://bazaar.launchpad.net/~timevaulters/timevault/trunk/.bzr/repository/>

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 729, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 691, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 389, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2199, in run
    reporter=reporter, revprops=properties)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 245, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 207, in commit
    revprops=revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 254, in commit
    self._check_bound_branch()
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 441, in _check_bound_branch
    self.master_branch.lock_write()
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1320, in lock_write
    repo_token = self.repository.lock_write()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 252, in lock_write
    return self.control_files.lock_write(token=token)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockable_files.py", line 258, in lock_write
    token_from_lock = self._lock.lock_write(token=token)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 556, in lock_write
    return self.wait_lock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 485, in wait_lock
    return self.attempt_lock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 450, in attempt_lock
    raise UnlockableTransport(self.transport)
UnlockableTransport: Cannot lock: transport is read only: <bzrlib.transport.http._urllib.HttpTransport_urllib url=http://bazaar.launchpad.net/~timevaulters/timevault/trunk/.bzr/repository/>

bzr 0.18.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'commit']

Don't think I have done anything wrong, although I am pretty new at this stuff.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 137157] Cannot lock: transport is read only

On (03/09/07 21:49), Tom Vetterlein wrote:
> Public bug reported:
>
> bzr: ERROR: bzrlib.errors.UnlockableTransport: Cannot lock: transport is
> read only: <bzrlib.transport.http._urllib.HttpTransport_urllib
> url=http://bazaar.launchpad.net/~timevaulters/timevault/trunk/.bzr/repository/>

What this is trying to tell you is that
http://bazaar.launchpad.net/~timevaulters/timevault/trunk/ is a readonly
location, as it is on http.

I assume what you did is

bzr checkout http://bazaar.launchpad.net/~timevaulters/timevault/trunk/

which means that you have a "checkout" of that location. In bzr when you
commit in a checkout the changes are first done on the "master" branch
(the one above) and then locally.

In this case the commit fails as it can't write to that location. If you
want to make your changes available on that branch you need to use a
writable transport.

If you have write permission on that branch (i.e. you are a member of
timevaulters) and you want your commit to be available there (it is not
an experimental commit for testing, you can change the url the master
branch is recorded as. To do this you use the 'bzr bind' command. Pass
it the url of the new branch to bind to. In this case you will want to
use an sftp url, i.e.:

bzr bind sftp://bazaar.launchpad.net/~timevaulters/timevault/trunk/

if you are not a member of the group, or this is an experimental commit,
or you just want to stop worrying about this and have your own area to
play around in, you can turn your checkout in to a branch by using the
'bzr unbind' command, simply

bzr unbind

and then any commits will only be local until you push (when again you
will need to use a writeable url).

Thanks,

James

--
  James Westby -- GPG Key ID: B577FE13 -- http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256

Revision history for this message
James Westby (james-w) wrote :

This is not a bug in bzr. Hopefully my explanation cleared up any confusion.

Changed in bzr:
status: New → Invalid
Revision history for this message
Tom Vetterlein (smbm) wrote :

Ah I see, cheers for getting back to me.

Sorry for posting a superfluous bug.

Thanks again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.