bookmarks: fix in/out return values stable
authorMatt Mackall <mpm@selenic.com>
Sat, 26 Jun 2010 12:26:03 -0500
branchstable
changeset 11444 b9a46acdfe1f
parent 11443 9e1bc1aafdb1
child 11445 4061205ad9e1
child 11477 9374e3c214f9
bookmarks: fix in/out return values
hgext/bookmarks.py
--- a/hgext/bookmarks.py	Sat Jun 26 12:24:55 2010 -0500
+++ b/hgext/bookmarks.py	Sat Jun 26 12:26:03 2010 -0500
@@ -463,15 +463,17 @@
 
     if len(diff) <= 0:
         ui.status(_("no changes found\n"))
+        return 1
+    return 0
 
 def incoming(oldincoming, ui, repo, source="default", **opts):
     if opts.get('bookmarks'):
         source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
         other = hg.repository(hg.remoteui(repo, opts), source)
         ui.status(_('comparing with %s\n') % url.hidepassword(source))
-        diffbookmarks(ui, repo, other)
+        return diffbookmarks(ui, repo, other)
     else:
-        oldincoming(ui, repo, source, **opts)
+        return oldincoming(ui, repo, source, **opts)
 
 def outgoing(oldoutgoing, ui, repo, dest=None, **opts):
     if opts.get('bookmarks'):
@@ -479,9 +481,9 @@
         dest, branches = hg.parseurl(dest, opts.get('branch'))
         other = hg.repository(hg.remoteui(repo, opts), dest)
         ui.status(_('comparing with %s\n') % url.hidepassword(dest))
-        diffbookmarks(ui, other, repo)
+        return diffbookmarks(ui, other, repo)
     else:
-        oldoutgoing(ui, repo, dest, **opts)
+        return oldoutgoing(ui, repo, dest, **opts)
 
 def uisetup(ui):
     extensions.wrapfunction(repair, "strip", strip)