[MERGE] Give nicer errors for some write operations on read-only transports.

James Westby jw+debian at jameswestby.net
Sun Sep 2 17:04:11 BST 2007


When a user tries to perform a write operation (usually commit after checkout
or push) on a read-only transport they tend to get a traceback that obscures
the error (at least with the above mentioned commands).

This change adds a new error that explains the problem without a traceback,
and points the user to help urlspec in an attempt to point them to a solution.

It throws this exception from builtins.py for the above commands and a couple
of other easy ones.

It wont detect all problems, but the mistake these people are making suggests
that they are quite new to the game, and as such they should be given a clear
error.

Thanks,

James

P.S. one issue I have with send is that I write a good commit message before
sending and then get given an almost blank sheet to compose a new message,
with the log message hidden inside the bundle. I realise it wont always be
the case that the log message is good enough to use or contains everything
that wants to be said, particularly for requests to merge several revisions.

One thing git does is use the commit message as the body of the email, with
a space for extra comments not appropriate for the commit message. This
tends to encourage better commit messages for projects organised by emailing
patches.

Perhaps send could use the last log message as the message to start editing,
or at least have an option to. Any comments?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 11083 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070902/36501d80/attachment.bin 


More information about the bazaar mailing list