[PATCH] rollback: add reference to "hg commit --amend"

Martin Geisler martin at geisler.net
Wed Jul 17 07:08:19 CDT 2013


Alexander Plavin <me at aplavin.ru> writes:

> 2013/7/17 Martin Geisler <martin at geisler.net>:
>> # HG changeset patch
>> # User Martin Geisler <martin at geisler.net>
>> # Date 1374050974 -7200
>> #      Wed Jul 17 10:49:34 2013 +0200
>> # Node ID 85d4ebb3d89e29657c4d7365174d9120ba88ad34
>> # Parent  ea4342d0e6fea19c8c4b7651f36929cd682afae7
>> rollback: add reference to "hg commit --amend"
>>
>> Now that rollback is deprecated (yay!) users might need a pointer to
>> the alternative for 99% of the cases where I used rollback.
>>
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -5016,6 +5016,9 @@
>>  def rollback(ui, repo, **opts):
>>      """roll back the last transaction (DANGEROUS) (DEPRECATED)
>>
>> +    Please use :hg:`commit --amend` instead of rollback to correct
>> +    mistakes in the last commit.
>
> May be not 'last commit', but 'parent of the working directory', like
> in help for hg commit --amend?

Making the messages similar sounds good at first, but on second thought
I think it's better to make the message specific for rollback. The
rollback command was (is!) often abused for redoing the very last commit
since (unlike 'hg commit --amend'), it cannot be used for redoing other
commits.

-- 
Martin Geisler


More information about the Mercurial-devel mailing list