changeset 11444:b9a46acdfe1f stable

bookmarks: fix in/out return values
author Matt Mackall <mpm@selenic.com>
date Sat, 26 Jun 2010 12:26:03 -0500
parents 9e1bc1aafdb1
children 4061205ad9e1 9374e3c214f9
files hgext/bookmarks.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)