mercurial/subrepo.py
changeset 22619 f6cf96804d27
parent 22590 d4c972b97fee
child 22657 f4e39ceb064a
equal deleted inserted replaced
22618:ce95c15f680b 22619:f6cf96804d27
    10 import stat, subprocess, tarfile
    10 import stat, subprocess, tarfile
    11 from i18n import _
    11 from i18n import _
    12 import config, util, node, error, cmdutil, bookmarks, match as matchmod
    12 import config, util, node, error, cmdutil, bookmarks, match as matchmod
    13 import phases
    13 import phases
    14 import pathutil
    14 import pathutil
       
    15 import exchange
    15 hg = None
    16 hg = None
    16 propertycache = util.propertycache
    17 propertycache = util.propertycache
    17 
    18 
    18 nullstate = ('', '', 'empty')
    19 nullstate = ('', '', 'empty')
    19 
    20 
   815                     % (subrelpath(self), dsturl))
   816                     % (subrelpath(self), dsturl))
   816                 return None
   817                 return None
   817         self._repo.ui.status(_('pushing subrepo %s to %s\n') %
   818         self._repo.ui.status(_('pushing subrepo %s to %s\n') %
   818             (subrelpath(self), dsturl))
   819             (subrelpath(self), dsturl))
   819         other = hg.peer(self._repo, {'ssh': ssh}, dsturl)
   820         other = hg.peer(self._repo, {'ssh': ssh}, dsturl)
   820         res = self._repo.push(other, force, newbranch=newbranch)
   821         res = exchange.push(self._repo, other, force, newbranch=newbranch)
   821 
   822 
   822         # the repo is now clean
   823         # the repo is now clean
   823         self._cachestorehash(dsturl)
   824         self._cachestorehash(dsturl)
   824         return res
   825         return res.cgresult
   825 
   826 
   826     @annotatesubrepoerror
   827     @annotatesubrepoerror
   827     def outgoing(self, ui, dest, opts):
   828     def outgoing(self, ui, dest, opts):
   828         return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
   829         return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
   829 
   830