comparison mercurial/subrepo.py @ 24875:5135c2be6959 stable

subrepo: don't pass the outer repo's --rev or --branch to subrepo outgoing() The previous behavior didn't reflect what would actually be pushed- push will ignore --rev and --branch in the subrepo and push everything. Therefore, 'push -r {rev}' would not list everything, unless {rev} was also the revision of the subrepo's tip. Worse, if a hash was passed in, the command would abort because that hash would either not be in the outer repo or not in the subrepo.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 27 Apr 2015 21:15:25 -0400
parents a99931201d1b
children b5513ee85dd8
comparison
equal deleted inserted replaced
24874:89fe9921511f 24875:5135c2be6959
871 self._cachestorehash(dsturl) 871 self._cachestorehash(dsturl)
872 return res.cgresult 872 return res.cgresult
873 873
874 @annotatesubrepoerror 874 @annotatesubrepoerror
875 def outgoing(self, ui, dest, opts): 875 def outgoing(self, ui, dest, opts):
876 if 'rev' in opts or 'branch' in opts:
877 opts = copy.copy(opts)
878 opts.pop('rev', None)
879 opts.pop('branch', None)
876 return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts) 880 return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
877 881
878 @annotatesubrepoerror 882 @annotatesubrepoerror
879 def incoming(self, ui, source, opts): 883 def incoming(self, ui, source, opts):
880 return hg.incoming(ui, self._repo, _abssource(self._repo, False), opts) 884 return hg.incoming(ui, self._repo, _abssource(self._repo, False), opts)