comparison mercurial/subrepo.py @ 46950:279df499511e

incoming: kill the `repo._subtoppath =` hack We do the same as for `hg outgoing`, instead of relying on implicit passing value by monkey punching them onto the repo object, we pass equivalent information by argument to the proper function. This is way cleaner. Differential Revision: https://phab.mercurial-scm.org/D10416
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 14 Apr 2021 17:41:02 +0200
parents 0afe96e374a7
children d55b71393907
comparison
equal deleted inserted replaced
46949:3800a6aafb6f 46950:279df499511e
880 def incoming(self, ui, source, opts): 880 def incoming(self, ui, source, opts):
881 if b'rev' in opts or b'branch' in opts: 881 if b'rev' in opts or b'branch' in opts:
882 opts = copy.copy(opts) 882 opts = copy.copy(opts)
883 opts.pop(b'rev', None) 883 opts.pop(b'rev', None)
884 opts.pop(b'branch', None) 884 opts.pop(b'branch', None)
885 return hg.incoming(ui, self._repo, _abssource(self._repo, False), opts) 885 subpath = subrepoutil.repo_rel_or_abs_source(self._repo)
886 return hg.incoming(ui, self._repo, source, opts, subpath=subpath)
886 887
887 @annotatesubrepoerror 888 @annotatesubrepoerror
888 def files(self): 889 def files(self):
889 rev = self._state[1] 890 rev = self._state[1]
890 ctx = self._repo[rev] 891 ctx = self._repo[rev]