changeset 49400:a1bb21542ab0 stable

debug-discovery: properly apply remote filtering in "old" mode Before this change using `--remote-as-revs` with `--old` had no effect and everything was considered as "common", which is really not what we intended.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 26 Jul 2022 04:56:29 +0200
parents a3fdc4fcb7d2
children 362c0026a977
files mercurial/debugcommands.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Tue Jul 26 04:54:59 2022 +0200
+++ b/mercurial/debugcommands.py	Tue Jul 26 04:56:29 2022 +0200
@@ -1276,6 +1276,9 @@
             if not util.safehasattr(remote, b'branches'):
                 # enable in-client legacy support
                 remote = localrepo.locallegacypeer(remote.local())
+                if remote_revs:
+                    r = remote._repo.filtered(b'debug-discovery-remote-filter')
+                    remote._repo = r
             common, _in, hds = treediscovery.findcommonincoming(
                 repo, remote, force=True, audit=data
             )