comparison mercurial/subrepo.py @ 13466:f2295f7cd468 stable

subrepo: only attempt pulling from git's origin git fetch does not accept repository URLs as arguments, and the intended logic of this code was not actually doing anything.
author Eric Eisner <ede@mit.edu>
date Wed, 23 Feb 2011 10:59:36 -0500
parents fa88fabc1d66
children c12088259f64 67fbe566eff1
comparison
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):