[PATCH] revert: simplify help message, better error message on reverting a merge

Adrian Buehlmann adrian at cadifra.com
Sun Jun 5 18:03:44 CDT 2011


On 2011-06-06 00:09, Matt Mackall wrote:
> On Sun, 2011-06-05 at 12:55 +0200, Adrian Buehlmann wrote:
>> On 2011-06-05 12:01, timeless wrote:
>>> On Sun, Jun 5, 2011 at 3:34 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>>> +    .. warning::
>>>> +       In contrast to the update command, revert never changes the
>>>> +       parent revisions of the working directory. Revert thus cannot
>>>> +       completely set the working directory state back to an earlier
>>>> +       revision nor can it undo a merge.
>>>> +       Use :hg:`update -r REV` to check out an earlier revision, or
>>>> +       :hg:`update --clean .` to undo a uncommitted merge.
>>>>
>>>>
>>>> This proposal fulfills Matt's requirement that the first sentence must
>>>> be a warning by changing "note:" to "warning:".
>>>
>>> it occurs to me that we might also want to point to backout...
>>
>> IMHO, patch scope creep.
>>
>> hg help revert doesn't currently mention backout.
> 
> Indeed, this whole thread is creep.

I just made a counter proposal for Rupert's first hunk.

I don't think that's creep.

> The best way to make forward progress is for Rupert to resend his
> original patch with the important/controversial line restored. Then we
> can continue discussing this piece without holding up the rest of his
> efforts.
> 

Agreed. Rupert should take the part

diff -r cd31a1cc1521 -r f59a8551d77b mercurial/commands.py
--- a/mercurial/commands.py	Sat Jun 04 20:01:01 2011 +0900
+++ b/mercurial/commands.py	Sat Jun 04 21:57:01 2011 +0200
@@ -4089,41 +4089,29 @@
     """restore individual files or directories to an earlier state

     .. note::
-       This command is most likely not what you are looking for.
-       Revert will partially overwrite content in the working
-       directory without changing the working directory parents. Use
+       Revert does not change the working directory parents. Use
        :hg:`update -r rev` to check out earlier revisions, or
        :hg:`update --clean .` to undo a merge which has added another
        parent.

out of his patch.

No one commented on the rest of his patch so far.



More information about the Mercurial-devel mailing list