[PATCH] revert: hint at update if --all is not specified

Adrian Buehlmann adrian at cadifra.com
Mon Jun 13 11:02:32 CDT 2011


On 2011-06-13 01:04, Matt Mackall wrote:
> On Sat, 2011-06-11 at 13:04 +0200, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1307788593 -7200
>> # Node ID 1459d1d4fed7b449521b1c7d1a22108afc2d4185
>> # Parent  81fc9678b018c928e2c5333b9055a66616db0531
>> revert: hint at update if --all is not specified
>>
>> and the target revision is not a parent
>>
>> And we no longer say "no files or directories specified". While technically
>> true, the fact that no files or directories were specified is not really the
>> real reason for aborting. The real reason is that revert would revert all files.
>>
>> OLD:
>>
>>   $ hg -q par
>>   4:8765e19eea07
>>
>>   $ hg revert
>>   abort: no files or directories specified
>>   (use --all to revert all files)
>>
>>   $ hg revert -r 2
>>   abort: no files or directories specified
>>   (use --all to revert all files)
>>
>> NEW:
>>
>>   $ hg -q par
>>   4:8765e19eea07
>>
>>   $ hg revert
>>   abort: revert changes all files
> 
> I don't think that's an improvement. Revert doesn't necessarily change
> all files, you just give it permission to change all files.
> 

I wonder what's the most efficient way to make progress here. You said
you agree that hinting at --all isn't good (current code).

Shall I keep trying sending patches (at the risk of wasting your time)
or can you give some hints at what you would like to see in the change?

Coding the change yourself (if you agree to change something) seems like
the most efficient thing to me here. Then you can choose the wording
yourself.

Unless you have a different opinion on how to move forward.


More information about the Mercurial-devel mailing list