changeset 1098:195642c1520b

uncommit: improve error message for use with no arguments
author Nathan Goldbaum <ngoldbau@ucsc.edu>
date Thu, 24 Jul 2014 12:02:53 -0700
parents f7f4a1fac6c0
children 574315ec19c2
files hgext/evolve.py tests/test-uncommit.t
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1974,7 +1974,8 @@
                 match = scmutil.match(old, pats, opts)
                 newid = _commitfiltered(repo, old, match)
             if newid is None:
-                raise util.Abort(_('nothing to uncommit'))
+                raise util.Abort(_('nothing to uncommit'),
+                                 hint=_("use --all to uncommit all files"))
             # Move local changes on filtered changeset
             createmarkers(repo, [(old, (repo[newid],))])
             phases.retractboundary(repo, oldphase, [newid])
--- a/tests/test-uncommit.t
+++ b/tests/test-uncommit.t
@@ -152,6 +152,7 @@
 
   $ hg uncommit
   abort: nothing to uncommit
+  (use --all to uncommit all files)
   [255]
   $ hg bookmarks
    * touncommit-bm             3:5eb72dbe0cb4
@@ -162,6 +163,7 @@
 
   $ hg uncommit --include nothere
   abort: nothing to uncommit
+  (use --all to uncommit all files)
   [255]
 
 Enjoy uncommit