[bug 0.11] bzr ci -m allow no message to be specified

Martin Pool mbp at canonical.com
Fri Nov 24 01:52:29 GMT 2006


On 23/11/2006, at 11:55pm, Matthew Hannigan wrote:

> On Fri, Nov 24, 2006 at 12:13:51AM +0200, Jari Aalto wrote:
>> James Westby <jw+debian at jameswestby.net> writes:
>>
>>> On (23/11/06 13:53), Jari Aalto wrote:
>>>> Aaron Bentley <aaron.bentley at utoronto.ca> writes:
>>>>>
>>>>> It can happen under any release.  Your command there is "commit  
>>>>> all
>>>>> files, with the message 'file.txt'", and I doubt that there's an
>>>>> automatic way to detect that this is not what you meant.
>>>>
>>>> Oh, then make this alwasy require argument (like "."), so that  
>>>> this mistake
>>>> does not happen by accident:
>>>>
>>>>     $ bzr ci -m file.txt
>>>>     Syntax error, needs file or directory "." to commit all
>>>>
>>>
>>> I don't like this idea. I think that the other proposal of asking  
>>> for
>>> confirmation if the message is the same as a file is a better one.
>>
>> If this means interacitve questions, please don't. It will make bzr
>> inpossible to be used in scripts and backends.
>
> That's an important point, but think it's still worth doing.
> You could error out if not a terminal.
>
> The case where the intended commit message is the name of a single
> file and you want to commit every change must be _vanishingly_
> rare.
>
> The case where you intend to commit just one file but in
> fact accidentally commit everything is not particularly rare,
> and the consequences might be severe.  Especially in a script,
> where the error might not be realised till quite a few commits
> later.

I filed this as https://launchpad.net/products/bzr/+bug/73073

On the other hand, unlike svn, we have an easy and effective uncommit  
command, so perhaps this should just give a warning and proceed.

-- 
Martin







More information about the bazaar mailing list