subrepo: drop arguments unsupported by old git
authorEric Eisner <ede@mit.edu>
Mon, 06 Dec 2010 21:17:27 -0500
changeset 13097 c922aacf6f1f
parent 13096 6e74b912fa5c
child 13098 f7d6750dcd01
subrepo: drop arguments unsupported by old git
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Mon Dec 06 21:17:27 2010 -0500
+++ b/mercurial/subrepo.py	Mon Dec 06 21:17:27 2010 -0500
@@ -713,7 +713,12 @@
         if self._githavelocally(revision):
             return
         self._ui.status(_('pulling subrepo %s\n') % self._relpath)
-        self._gitcommand(['fetch', '--all', '-q'])
+        # first try from origin
+        self._gitcommand(['fetch'])
+        if self._githavelocally(revision):
+            return
+        # then try from known subrepo source
+        self._gitcommand(['fetch', source])
         if not self._githavelocally(revision):
             raise util.Abort(_("revision %s does not exist in subrepo %s\n") %
                                (revision, self._path))
@@ -833,7 +838,7 @@
                 return False
             self._ui.status(_('pushing branch %s of subrepo %s\n') %
                             (current, self._relpath))
-            self._gitcommand(cmd + ['origin', current, '-q'])
+            self._gitcommand(cmd + ['origin', current])
             return True
         else:
             self._ui.warn(_('no branch checked out in subrepo %s\n'