mercurial/subrepo.py
branchstable
changeset 17874 2ba70eec1cf0
parent 17873 573bec4ab7ba
child 17876 f4ee2e959696
equal deleted inserted replaced
17873:573bec4ab7ba 17874:2ba70eec1cf0
   499     def _get(self, state):
   499     def _get(self, state):
   500         source, revision, kind = state
   500         source, revision, kind = state
   501         if revision not in self._repo:
   501         if revision not in self._repo:
   502             self._repo._subsource = source
   502             self._repo._subsource = source
   503             srcurl = _abssource(self._repo)
   503             srcurl = _abssource(self._repo)
   504             other = hg.peer(self._repo.ui, {}, srcurl)
   504             other = hg.peer(self._repo, {}, srcurl)
   505             if len(self._repo) == 0:
   505             if len(self._repo) == 0:
   506                 self._repo.ui.status(_('cloning subrepo %s from %s\n')
   506                 self._repo.ui.status(_('cloning subrepo %s from %s\n')
   507                                      % (subrelpath(self), srcurl))
   507                                      % (subrelpath(self), srcurl))
   508                 parentrepo = self._repo._subparent
   508                 parentrepo = self._repo._subparent
   509                 shutil.rmtree(self._repo.path)
   509                 shutil.rmtree(self._repo.path)
   564                 return False
   564                 return False
   565 
   565 
   566         dsturl = _abssource(self._repo, True)
   566         dsturl = _abssource(self._repo, True)
   567         self._repo.ui.status(_('pushing subrepo %s to %s\n') %
   567         self._repo.ui.status(_('pushing subrepo %s to %s\n') %
   568             (subrelpath(self), dsturl))
   568             (subrelpath(self), dsturl))
   569         other = hg.peer(self._repo.ui, {'ssh': ssh}, dsturl)
   569         other = hg.peer(self._repo, {'ssh': ssh}, dsturl)
   570         return self._repo.push(other, force, newbranch=newbranch)
   570         return self._repo.push(other, force, newbranch=newbranch)
   571 
   571 
   572     def outgoing(self, ui, dest, opts):
   572     def outgoing(self, ui, dest, opts):
   573         return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
   573         return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
   574 
   574