mercurial/subrepo.py
branchstable
changeset 35834 fb278041df06
parent 35833 eed02e192770
child 36715 b529e640015d
equal deleted inserted replaced
35833:eed02e192770 35834:fb278041df06
   994                 shared = hg.share(self._repo._subparent.baseui,
   994                 shared = hg.share(self._repo._subparent.baseui,
   995                                   other, self._repo.root,
   995                                   other, self._repo.root,
   996                                   update=False, bookmarks=False)
   996                                   update=False, bookmarks=False)
   997                 self._repo = shared.local()
   997                 self._repo = shared.local()
   998             else:
   998             else:
       
   999                 # TODO: find a common place for this and this code in the
       
  1000                 # share.py wrap of the clone command.
       
  1001                 if parentrepo.shared():
       
  1002                     pool = self.ui.config('share', 'pool')
       
  1003                     if pool:
       
  1004                         pool = util.expandpath(pool)
       
  1005 
       
  1006                     shareopts = {
       
  1007                         'pool': pool,
       
  1008                         'mode': self.ui.config('share', 'poolnaming'),
       
  1009                     }
       
  1010                 else:
       
  1011                     shareopts = {}
       
  1012 
   999                 self.ui.status(_('cloning subrepo %s from %s\n')
  1013                 self.ui.status(_('cloning subrepo %s from %s\n')
  1000                                % (subrelpath(self), srcurl))
  1014                                % (subrelpath(self), srcurl))
  1001                 other, cloned = hg.clone(self._repo._subparent.baseui, {},
  1015                 other, cloned = hg.clone(self._repo._subparent.baseui, {},
  1002                                          other, self._repo.root,
  1016                                          other, self._repo.root,
  1003                                          update=False)
  1017                                          update=False, shareopts=shareopts)
  1004                 self._repo = cloned.local()
  1018                 self._repo = cloned.local()
  1005             self._initrepo(parentrepo, source, create=True)
  1019             self._initrepo(parentrepo, source, create=True)
  1006             self._cachestorehash(srcurl)
  1020             self._cachestorehash(srcurl)
  1007         else:
  1021         else:
  1008             self.ui.status(_('pulling subrepo %s from %s\n')
  1022             self.ui.status(_('pulling subrepo %s from %s\n')