[PATCH V2] amend: new extension providing the amend command
Gregory Szorc
gregory.szorc at gmail.com
Thu Jul 13 11:03:42 EDT 2017
>> On Jul 12, 2017, at 10:11, Martin von Zweigbergk via Mercurial-devel <mercurial-devel at mercurial-scm.org> wrote:
>>
>> On Wed, Jul 12, 2017 at 12:47 AM, Jun Wu <quark at fb.com> wrote:
>> # HG changeset patch
>> # User Jun Wu <quark at fb.com>
>> # Date 1499831635 25200
>> # Tue Jul 11 20:53:55 2017 -0700
>> # Node ID d1092112d98c29fc3e1b4cb700eed4fc48dd7d8e
>> # Parent 26e4ba058215e536d3827befbea99ff6203d35f8
>> # Available At https://bitbucket.org/quark-zju/hg-draft
>> # hg pull https://bitbucket.org/quark-zju/hg-draft -r d1092112d98c
>> amend: new extension providing the amend command
>
> Queued, thanks!
>
>> + with repo.wlock(), repo.lock():
>> + if not opts.get('logfile'):
>> + opts['message'] = opts.get('message') or repo['.'].description()
>
> Great, looks like fixes another little bug in evolve's version: "hg
> amend -m foo -e" (and "hg amend -l file -e") actually works with this
> version.
I'm late to the review party.
When I saw this patch, I thought an extension was a bit heavyweight. I was wondering if we could achieve something similar by defining a [commands] option or 2 for changing behavior of prompting for commit message during --amend. Then you would just need to [alias] your way to victory.
That being said, there is value to squatting on "amend" in core: it is a useful name. So I have nothing against this patch. I'm just trying to encourage use of [commands] for doing useful things.
More information about the Mercurial-devel
mailing list