mercurial/subrepo.py
branchstable
changeset 13466 f2295f7cd468
parent 13465 fa88fabc1d66
child 13525 c12088259f64
child 13531 67fbe566eff1
equal deleted inserted replaced
13465:fa88fabc1d66 13466:f2295f7cd468
   762             self._ui.status(_('cloning subrepo %s\n') % self._relpath)
   762             self._ui.status(_('cloning subrepo %s\n') % self._relpath)
   763             self._gitnodir(['clone', self._abssource(source), self._abspath])
   763             self._gitnodir(['clone', self._abssource(source), self._abspath])
   764         if self._githavelocally(revision):
   764         if self._githavelocally(revision):
   765             return
   765             return
   766         self._ui.status(_('pulling subrepo %s\n') % self._relpath)
   766         self._ui.status(_('pulling subrepo %s\n') % self._relpath)
   767         # first try from origin
   767         # try only origin: the originally cloned repo
   768         self._gitcommand(['fetch'])
   768         self._gitcommand(['fetch'])
   769         if self._githavelocally(revision):
       
   770             return
       
   771         # then try from known subrepo source
       
   772         self._gitcommand(['fetch', self._abssource(source)])
       
   773         if not self._githavelocally(revision):
   769         if not self._githavelocally(revision):
   774             raise util.Abort(_("revision %s does not exist in subrepo %s\n") %
   770             raise util.Abort(_("revision %s does not exist in subrepo %s\n") %
   775                                (revision, self._relpath))
   771                                (revision, self._relpath))
   776 
   772 
   777     def dirty(self, ignoreupdate=False):
   773     def dirty(self, ignoreupdate=False):