Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 13525:c12088259f64
subrepo: show the source that git clones
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Wed, 02 Mar 2011 12:19:18 -0500 |
parents | f2295f7cd468 |
children | d4c2f2ac3ff7 |
comparison
equal
deleted
inserted
replaced
13524:121c89dd7983 | 13525:c12088259f64 |
---|---|
757 self._subsource = source | 757 self._subsource = source |
758 return _abssource(self) | 758 return _abssource(self) |
759 | 759 |
760 def _fetch(self, source, revision): | 760 def _fetch(self, source, revision): |
761 if not os.path.exists(os.path.join(self._abspath, '.git')): | 761 if not os.path.exists(os.path.join(self._abspath, '.git')): |
762 self._ui.status(_('cloning subrepo %s\n') % self._relpath) | 762 source = self._abssource(source) |
763 self._gitnodir(['clone', self._abssource(source), self._abspath]) | 763 self._ui.status(_('cloning subrepo %s from %s\n') % |
764 (self._relpath, source)) | |
765 self._gitnodir(['clone', source, self._abspath]) | |
764 if self._githavelocally(revision): | 766 if self._githavelocally(revision): |
765 return | 767 return |
766 self._ui.status(_('pulling subrepo %s\n') % self._relpath) | 768 self._ui.status(_('pulling subrepo %s\n') % self._relpath) |
767 # try only origin: the originally cloned repo | 769 # try only origin: the originally cloned repo |
768 self._gitcommand(['fetch']) | 770 self._gitcommand(['fetch']) |