diff 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
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Apr 14 17:29:27 2021 +0200
+++ b/mercurial/subrepo.py	Wed Apr 14 17:41:02 2021 +0200
@@ -882,7 +882,8 @@
             opts = copy.copy(opts)
             opts.pop(b'rev', None)
             opts.pop(b'branch', None)
-        return hg.incoming(ui, self._repo, _abssource(self._repo, False), opts)
+        subpath = subrepoutil.repo_rel_or_abs_source(self._repo)
+        return hg.incoming(ui, self._repo, source, opts, subpath=subpath)
 
     @annotatesubrepoerror
     def files(self):