RFC: Possibility to re-edit last commit message

Jari Aalto jari.aalto at cante.net
Mon Jan 29 16:14:33 GMT 2007


John Arbash Meinel <john at arbash-meinel.com> writes:
>>> message could be re-edited
>>>
>>>     bzr ci --re-edit
>>>
>>> And that would bring up the editor just like last time. After exiting
>>> the editor, that message would be updated (no files updated)
>> 
>> But if someone has pulled the branch in the meantime, and you change
>> the message without creating a new commit, you're in a world of pain.
>> So just uncommit, edit the message and recommit. It might be nice to
>> have a plugin that does it for you though.
>> 
> I always thought of this as a "bzr recommit" command. Which could do 2
> things.
>
[...]
> For the message, if we spawned an editor with the old message, I could
> always just accept it. But the command should support '-m' like the
> current commit command does.

The reason why "bzr ci --re-edit" is imporartant is that there are many
non-native speaker's that make typos and grammar mistakes all the time.
We just don't notice them but only after looking the message second time
(after the commit is already happened).

I don't know internals how the thing has been implemented, but
culd the message have a minor version (flag?) that is incremented
after each change. The log would only show the latest message, although
the repository would just keep all messages.

I mean:

 a)
        file.txt --> ci     r1
        msgA                r1 (1)
 b)
        ... Ooops, re-edit ...
        msgA    --> ci      internally: r1 (2)
                            r1               (to the outside)

Someone doing a branch at point (a), would still get the updated
message after "pull" at (b), when the merge would put (b) to the
front of message stack (being number 2).

Jari




More information about the bazaar mailing list