[PATCH RFC] commit: add --amend option to amend the parent changeset

Idan Kamara idankk86 at gmail.com
Sat Feb 18 10:44:14 UTC 2012


On Sat, Feb 18, 2012 at 12:05 AM, Matt Mackall <mpm at selenic.com> wrote:
>
> On Fri, 2012-02-17 at 18:44 +0100, Patrick Mézard wrote:
> > Le 02/02/12 13:55, Idan Kamara a écrit :
> > > On Thu, Feb 2, 2012 at 2:45 PM, Angel Ezquerra <
angel.ezquerra at gmail.com <mailto:angel.ezquerra at gmail.com>> wrote:
> > >
> > >     On Thu, Feb 2, 2012 at 1:35 PM, Idan Kamara <idankk86 at gmail.com<mailto:
idankk86 at gmail.com>> wrote:
> > >     > # HG changeset patch
> > >     > # User Idan Kamara <idankk86 at gmail.com <mailto:
idankk86 at gmail.com>>
> > >     > # Date 1328185747 -7200
> > >     > # Branch stable
> > >     > # Node ID cc7dec00d5016f03acf789c35ce6ef50b204f0cb
> > >     > # Parent  0620421044a2bcaafd054a6ee454614888699de8
> > >     > commit: add --amend option to amend the parent changeset
> >
> > [...]
> >
> > >
> > >     This is quite cool and a neat example of what can be done now that
> > >     mercurial tracks phases :-)
> > >
> > >     One thing that would be nice is to be able to just "amend" the
commit
> > >     message (without modifying the patch file contents). I think
_that_ is
> > >     probably _the_ most commonly requested history editing operation
(at
> > >     least in my experience).
> > >
> > >
> > > Right. I didn't take care of that yet and due to the current
implementation
> > > it fails with a 'nothing changed' message. But it should be doable.
> >
> > I think the UI for this should be addressed right away. What are the
choices?
> >
> > 1- git commit --amend: open the editor with the current message all the
time, even when the working directory is clean
> > 2- Add qrefresh like --edit option
>
> I don't think launching and quitting an editor is overly burdensome,
> especially given that fixing a commit message will be an extremely
> common usage.

I agree. And even if we end up having to choose between:

1) adding a new command
2) adding --edit to commit

I think 2) is preferable. Same goes for -U and -D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20120218/fbe762a2/attachment-0002.html>


More information about the Mercurial-devel mailing list