441 if len(self._repo) == 0: |
441 if len(self._repo) == 0: |
442 self._repo.ui.status(_('cloning subrepo %s from %s\n') |
442 self._repo.ui.status(_('cloning subrepo %s from %s\n') |
443 % (subrelpath(self), srcurl)) |
443 % (subrelpath(self), srcurl)) |
444 parentrepo = self._repo._subparent |
444 parentrepo = self._repo._subparent |
445 shutil.rmtree(self._repo.root) |
445 shutil.rmtree(self._repo.root) |
446 other, self._repo = hg.clone(self._repo._subparent.ui, other, |
446 other, self._repo = hg.clone(self._repo._subparent.ui, {}, other, |
447 self._repo.root, update=False) |
447 self._repo.root, update=False) |
448 self._initrepo(parentrepo, source, create=True) |
448 self._initrepo(parentrepo, source, create=True) |
449 else: |
449 else: |
450 self._repo.ui.status(_('pulling subrepo %s from %s\n') |
450 self._repo.ui.status(_('pulling subrepo %s from %s\n') |
451 % (subrelpath(self), srcurl)) |
451 % (subrelpath(self), srcurl)) |
452 self._repo.pull(other) |
452 self._repo.pull(other) |