changeset 985:b303b60be11e

wrappers: Return the same value as the original incoming command
author Mitsuhiro Koga <shiena.jp@gmail.com>
date Thu, 22 Nov 2012 12:56:49 +0900
parents 6315bdd1546e
children 1bdd075a490a
files hgsubversion/wrappers.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -101,6 +101,11 @@ def incoming(orig, ui, repo, origsource=
     svnrevisions = list(svn.revisions(start=meta.revmap.youngest))
     if opts.get('newest_first'):
         svnrevisions.reverse()
+    # Returns 0 if there are incoming changes, 1 otherwise.
+    if len(svnrevisions) > 0:
+        ret = 0
+    else:
+        ret = 1
     for r in svnrevisions:
         ui.status('\n')
         for label, attr in revmeta:
@@ -109,6 +114,7 @@ def incoming(orig, ui, repo, origsource=
             if not ui.verbose:
                 val = val.split('\n')[0]
             ui.status('%s%s\n' % (l1.ljust(13), val))
+    return ret
 
 
 def findcommonoutgoing(repo, other, onlyheads=None, force=False, commoninc=None):