[merge][#129701] better message when unable to commit to readonly branch

Martin Pool mbp at sourcefrog.net
Fri Oct 5 06:14:17 BST 2007


  http://bugs.edge.launchpad.net/bzr/129701

People tend to try this operation:

  bzr checkout http://....
  ...
  bzr commit

This doesn't work because http is a readonly transport.  In bzr 0.91
they get an internal error.  This make it somewhat cleaner, showing
the url and saying we can't lock because it's readonly.

  bzr: ERROR: Cannot lock
LockDir(http://sourcefrog.net/bzr/.bzr/repository/lock): Transport
operation not possible: http does not support mkdir()

This still isn't making it obvious what they should do instead (use
sftp or ssh), but maybe that's better answered in a faq, or at least
addressed in a future patch.

Also:

 * removes some unnecessary calls to Transport.is_readonly() - better
to just go ahead and try, so that transports that are inherently
readonly are consistent with other cases where the user may be unable
to write (like permission denied)

 * deprecate and mostly remove ReadOnlyLockError, which was a bit
confused about what it represents

 * add new LockFailed, covering cases distinct from being able to lock
because someone else holds it

 * In passing, fix PatchMissing message style

 * Allow for 0.92 deprecations, and improve messages for deprecated constructors

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20071005-lock-failed.diff
Type: text/x-diff
Size: 24774 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071005/dd84811c/attachment-0001.bin 


More information about the bazaar mailing list