[PATCH v2] histedit: add "amen" command to fold commit data and drop message (issue4256)

Matt Mackall mpm at selenic.com
Tue Aug 12 02:05:17 CDT 2014


On Mon, 2014-08-11 at 14:31 -0400, adgar at google.com wrote:
> # HG changeset patch
> # User Mike Edgar <adgar at google.com>
> # Date 1407358301 14400
> #      Wed Aug 06 16:51:41 2014 -0400
> # Node ID 40809b1ede87da3184d06cfccee966dd4aea72fe
> # Parent  4354b1e35f533f72d5b6ccc76e8bc742f8cb5257
> histedit: add "amen" command to fold commit data and drop message (issue4256)

So in looking closer at this, I spotted the following problem:

>   #  e, edit = use commit, but stop for amending
> + #  a, amen = add commit content to one above, dropping message (hg amend)

We're using amend in two different ways on these two lines, and arguably
the first one is the 'correct' usage (ie hg commit --amend or hg amend =
fold in working directory contents, not another commit). Plus the whole
awkward five letter thing.

A bit more brainstorming and I've come up with:

  #  f, fold = use commit, but combine it with the one above
  #  r, roll = like fold, but discard this commit's description

(The new message has the added benefit of simultaneously expanding on
fold's description.)

This suggests 'roll up', which keeps with the 'fold up' metaphor, while
suggesting a more Katamari-esque process.

Alternately, join. Both suboptimal, but 'hg help -k {roll,join}'
suggests they're both not overloaded anywhere.

A last possibility to consider: we might want to instead start adding
modifiers to the action letters instead of adding new letters to make
slight modifications.. for instance, f! or F:

  #  f, fold = use commit, but combine it with the one above
  #  F       = like fold, but discard this commit's description

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list