[PATCH 7 of 7] subrepo: drop arguments unsupported by old git

Eric Eisner ede at MIT.EDU
Mon Dec 6 20:37:11 CST 2010


# HG changeset patch
# User Eric Eisner <ede at mit.edu>
# Date 1291688247 18000
# Node ID c922aacf6f1f15f275b2297d41ecf02396f3255d
# Parent  6e74b912fa5ceeefa76d0a51a9d05d8038425583
subrepo: drop arguments unsupported by old git

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -713,7 +713,12 @@ class gitsubrepo(object):
         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 @@ class gitsubrepo(object):
                 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'


More information about the Mercurial-devel mailing list