changeset 20970:70312c95f2f7

subrepo: check return code for git push (issue4223)
author Matt Mackall <mpm@selenic.com>
date Fri, 11 Apr 2014 15:38:18 -0400
parents 7a679918ee2b
children 557a083453c9
files mercurial/subrepo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Fri Apr 04 17:50:44 2014 -0700
+++ b/mercurial/subrepo.py	Fri Apr 11 15:38:18 2014 -0400
@@ -1463,8 +1463,8 @@
                 return False
             self._ui.status(_('pushing branch %s of subrepo %s\n') %
                             (current.split('/', 2)[2], self._relpath))
-            self._gitcommand(cmd + ['origin', current])
-            return True
+            ret = self._gitdir(cmd + ['origin', current])
+            return ret[1] == 0
         else:
             self._ui.warn(_('no branch checked out in subrepo %s\n'
                             'cannot push revision %s\n') %