[PATCH] Proper error message when specifying empty commit message

Robert Collins robertc at robertcollins.net
Wed Sep 7 12:55:18 BST 2005


On Tue, 2005-09-06 at 19:38 +0200, Jelmer Vernooij wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> Attached is a small patch that fixes the error message when an empty
> commit message was specified (when using an editor). Previously it
> warned that it wanted either --message or --file. I hope I'm using the
> right exception (BzrCommandError).
> 
> Alternatively, the patch can be pulled from http://jelmer.vernstok.nl/bzr/

Hi Jelmer, thanks for this patch. There are a couple of small quirks
with it before it is ready for inclusion...

Firstly, please configure your editor not to insert literal TAB
characters in *.py files. IIRC this is standard for PEP-8 in the python
community.

I agree with Michaels suggestion of len(msg.strip()) == 0 as the test.

The except class is fine.

The other thing that is missing (and why I'm asking you to do this
rather than just tweaking the other minor stuff), is to write a test for
this. You can see the HACKING file for information on tests. I suggest a
blackbox test for this particular change.

Cheers,
Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050907/ae5e279e/attachment.pgp 


More information about the bazaar mailing list