[RFC] Ask for confirmation if the commit message is a file name

Gioele Barabucci gioele at svario.it
Wed Nov 11 23:29:32 GMT 2009


sometimes I mistakenly type "commit -m file1 file2", i.e. I forget to add a 
commit message and bzr uses "file1" as the commit message. With the attached 
tiny patch, bzr will ask the user for a confirmation in cases like that.

This patch lacks a test case. What variation of run_bzr should I use to 
assert "and now a boolean prompt with a text like this should appear"?

Other code questions:
  * what is the correct way to abort a command in "peaceful" way?
  * is "return 0" OK?
  * are the strings correctly split? I can see that in the code, the inter-
word space is sometimes kept at the end of a string, other times at the 

Messages questions:
  * should a strong verb like "abort" be used in the user interface?
  * doesn't the forced addition of a "?" to boolean questions create 
problems for future translations in languages where questions are not 
created in that way?

Gioele Barabucci <gioele at svario.it>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forgot-commit-message.patch
Type: text/x-patch
Size: 2612 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20091112/289ded3a/attachment-0001.bin 

More information about the bazaar mailing list