[PATCH 1 of 1 V5] revert: improve hint on abort if no files were specified

Na'Tosha Bard natosha at gmail.com
Mon Jun 20 15:47:05 CDT 2011


On Mon, Jun 20, 2011 at 6:40 PM, Adrian Buehlmann <adrian at cadifra.com>wrote:

> On 2011-06-20 18:25, Kevin Bullock wrote:
> > On Jun 18, 2011, at 1:43 AM, Adrian Buehlmann wrote:
> >
> >> On 2011-06-17 21:42, Matt Mackall wrote:
> >>> On Fri, 2011-06-17 at 13:56 +0200, Adrian Buehlmann wrote:
> >>>> clean, revert to non-parent:
> >>>>
> >>>>  BEFORE:
> >>>>    $ hg revert -d 2011-05-05
> >>>>    Found revision 7423 from Thu May 05 19:56:05 2011 +0200
> >>>>    abort: no files or directories specified
> >>>>    (use --all to revert all files)
> >>>>
> >>>>  NEW:
> >>>>    $ hg revert -d 2011-05-05
> >>>>    Found revision 7423 from Thu May 05 19:56:05 2011 +0200
> >>>>    abort: no files or directories specified
> >>>>    (use --all to revert all files, or 'hg update -r 7423' to update)
> >>>
> >>> discard?
> >>
> >> What's to be discarded if the working directory is all clean?
> >
> > All the changes between the specified revision and the current state. I
> agree, I think discard is appropriate here.
>
> Well. Losing uncommitted edits or not is a rather big difference in my
> book.
>

When you pass the --all flag in this situation, are all of the changes
between your current tip and the revision specified lost permanently?  If
so, I'd say "discard" is appropriate here, as well. If there is a way to
"undo" the operation later, then I'd say "revert" is appropriate.

Cheers,
Na'Tosha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110620/45ab3db4/attachment.htm>


More information about the Mercurial-devel mailing list