Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
46929:5a59a0ed0a37 | 46930:0afe96e374a7 |
---|---|
871 def outgoing(self, ui, dest, opts): | 871 def outgoing(self, ui, dest, opts): |
872 if b'rev' in opts or b'branch' in opts: | 872 if b'rev' in opts or b'branch' in opts: |
873 opts = copy.copy(opts) | 873 opts = copy.copy(opts) |
874 opts.pop(b'rev', None) | 874 opts.pop(b'rev', None) |
875 opts.pop(b'branch', None) | 875 opts.pop(b'branch', None) |
876 return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts) | 876 subpath = subrepoutil.repo_rel_or_abs_source(self._repo) |
877 return hg.outgoing(ui, self._repo, dest, opts, subpath=subpath) | |
877 | 878 |
878 @annotatesubrepoerror | 879 @annotatesubrepoerror |
879 def incoming(self, ui, source, opts): | 880 def incoming(self, ui, source, opts): |
880 if b'rev' in opts or b'branch' in opts: | 881 if b'rev' in opts or b'branch' in opts: |
881 opts = copy.copy(opts) | 882 opts = copy.copy(opts) |