diff mercurial/subrepo.py @ 46930:0afe96e374a7

outgoing: pass subrepo path using function argument instead of abssource hack This is clearer, remove the needs for the `repo._subtoppath` hack and will make our live easier when making `outgoing` accept multiple destinations. Differential Revision: https://phab.mercurial-scm.org/D10390
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Apr 2021 09:23:28 +0200
parents ffd3e823a7e5
children 279df499511e
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Apr 15 09:23:19 2021 +0200
+++ b/mercurial/subrepo.py	Thu Apr 15 09:23:28 2021 +0200
@@ -873,7 +873,8 @@
             opts = copy.copy(opts)
             opts.pop(b'rev', None)
             opts.pop(b'branch', None)
-        return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts)
+        subpath = subrepoutil.repo_rel_or_abs_source(self._repo)
+        return hg.outgoing(ui, self._repo, dest, opts, subpath=subpath)
 
     @annotatesubrepoerror
     def incoming(self, ui, source, opts):