changeset 16022:04604d1a9fc3 stable

push: more precise failure check on subrepo push This will let us distinguish between nothing to push and push failed
author Matt Mackall <mpm@selenic.com>
date Mon, 30 Jan 2012 11:26:20 -0600
parents 7f47873d7484
children 90f8b8dd0326
files mercurial/commands.py mercurial/subrepo.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Jan 30 11:23:17 2012 -0600
+++ b/mercurial/commands.py	Mon Jan 30 11:26:20 2012 -0600
@@ -4419,7 +4419,7 @@
         c = repo['']
         subs = c.substate # only repos that are committed
         for s in sorted(subs):
-            if not c.sub(s).push(opts):
+            if c.sub(s).push(opts) == 0:
                 return False
     finally:
         del repo._subtoppath
--- a/mercurial/subrepo.py	Mon Jan 30 11:23:17 2012 -0600
+++ b/mercurial/subrepo.py	Mon Jan 30 11:26:20 2012 -0600
@@ -528,7 +528,7 @@
         c = self._repo['']
         subs = c.substate # only repos that are committed
         for s in sorted(subs):
-            if not c.sub(s).push(opts):
+            if c.sub(s).push(opts) == 0:
                 return False
 
         dsturl = _abssource(self._repo, True)