[PATCH 1 of 4 V6 STABLE] revert: be more explicit that changes are lost

Na'Tosha Bard natosha at unity3d.com
Tue Jun 21 06:37:28 CDT 2011


On Tue, Jun 21, 2011 at 11:03 AM, Adrian Buehlmann <adrian at cadifra.com>wrote:

> On 2011-06-21 06:11, Kevin Bullock wrote:
> > # HG changeset patch
> > # User Kevin Bullock <kbullock at ringworld.org>
> > # Date 1308626152 18000
> > # Branch stable
> > # Node ID 10a8c14a8fdca3d00fee266b3af949f2bd5d74e5
> > # Parent  848a6658069eb88a920ac3ec1220c0c53fae9d0e
> > revert: be more explicit that changes are lost
> >
> >  BEFORE:
> >    $ hg revert
> >    abort: no files or directories specified
> >    (use --all to revert all files)
> >
> >  AFTER:
> >    $ hg revert
> >    abort: no files or directories specified
> >    (use --all to discard all changes)
> >
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -4182,7 +4182,7 @@
> >
> >      if not pats and not opts.get('all'):
> >          raise util.Abort(_('no files or directories specified'),
> > -                         hint=_('use --all to revert all files'))
> > +                         hint=_('use --all to discard all changes'))
> >
> >      ctx = scmutil.revsingle(repo, opts.get('rev'))
> >      node = ctx.node()
> > diff --git a/tests/test-confused-revert.t b/tests/test-confused-revert.t
> > --- a/tests/test-confused-revert.t
> > +++ b/tests/test-confused-revert.t
> > @@ -60,7 +60,7 @@
> >
> >    $ hg revert
> >    abort: no files or directories specified
> > -  (use --all to revert all files)
> > +  (use --all to discard all changes)
> >    [255]
> >
> >  Revert should be ok now:
> > diff --git a/tests/test-revert.t b/tests/test-revert.t
> > --- a/tests/test-revert.t
> > +++ b/tests/test-revert.t
> > @@ -186,7 +186,7 @@
> >
> >    $ hg revert -rtip
> >    abort: no files or directories specified
> > -  (use --all to revert all files)
> > +  (use --all to discard all changes)
> >    [255]
> >
> >  should succeed
>
> +1
> An improvement compared to the status quo
>

I also support this change.

-- 
*Na'Tosha Bard*
Build & Infrastructure Developer | Unity Technologies

*E-Mail:* natosha at unity3d.com
*Skype:* natosha.bard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110621/3ffb24d5/attachment.htm>


More information about the Mercurial-devel mailing list