[PATCH RFC] commit: add --reuse-message for keeping the old commit message during amend

Durham Goode durham at fb.com
Wed Feb 13 13:42:44 CST 2013

On 2/12/13 8:56 PM, "Matt Mackall" <mpm at selenic.com> wrote:
>I'm now inclined to think that 'hg commit --amend' will eventually be
>replaced by 'hg amend', which will have a different default. Then we'll
>deprecate --amend on commit.
>So I think we should leave this alone. But I don't think we've got quite
>enough experience here to add the new amend command yet.

If anyone feels strongly about getting the extra commit flag in, speak up.
 For Facebook's purposes we will just add an amend alias for our users
that does 'hg --config ui.editor=true commit --amend' while we wait for
the real 'hg amend'.

As for having amend experience, as I've started using evolve more I've
found I use an amend flows in three ways:

1. (most common) Amending the code in the current commit
2. Amending the code in a commit further down.
3. (least common) Amending the commit description.

So my ideal "hg amend" would do #1 by default, #2 with "hg amend --to
'tip~2'", and #3 with "hg amend -e".  #2 is the only crazy one, but I've
been using a script that does it in one step and it makes editing chains
of commits much much easier.

More information about the Mercurial-devel mailing list