mercurial/dispatch.py
branchstable
changeset 21572 6c9b7712ac69
parent 21569 c5afb07c33d3
child 21824 57c70d3ad1c9
--- a/mercurial/dispatch.py	Tue May 27 15:16:52 2014 -0700
+++ b/mercurial/dispatch.py	Sat May 17 15:14:18 2014 +0900
@@ -355,7 +355,7 @@
         if not self.definition:
             def fn(ui, *args):
                 ui.warn(_("no definition for alias '%s'\n") % self.name)
-                return 1
+                return -1
             self.fn = fn
             self.badalias = True
             return
@@ -389,7 +389,7 @@
             def fn(ui, *args):
                 ui.warn(_("error in definition for alias '%s': %s\n")
                         % (self.name, inst))
-                return 1
+                return -1
             self.fn = fn
             self.badalias = True
             return
@@ -402,7 +402,7 @@
                     ui.warn(_("error in definition for alias '%s': %s may only "
                               "be given on the command line\n")
                             % (self.name, invalidarg))
-                    return 1
+                    return -1
 
                 self.fn = fn
                 self.badalias = True
@@ -434,14 +434,14 @@
                     commands.help_(ui, cmd, unknowncmd=True)
                 except error.UnknownCommand:
                     pass
-                return 1
+                return -1
             self.fn = fn
             self.badalias = True
         except error.AmbiguousCommand:
             def fn(ui, *args):
                 ui.warn(_("alias '%s' resolves to ambiguous command '%s'\n") \
                             % (self.name, cmd))
-                return 1
+                return -1
             self.fn = fn
             self.badalias = True