subrepo: check return code for git push (issue4223)
authorMatt Mackall <mpm@selenic.com>
Fri, 11 Apr 2014 15:38:18 -0400
changeset 20970 70312c95f2f7
parent 20969 7a679918ee2b
child 20971 557a083453c9
subrepo: check return code for git push (issue4223)
mercurial/subrepo.py
--- 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') %