debug-discovery: properly apply remote filtering in "old" mode stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 26 Jul 2022 04:56:29 +0200
branchstable
changeset 49400 a1bb21542ab0
parent 49399 a3fdc4fcb7d2
child 49401 362c0026a977
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.
mercurial/debugcommands.py
--- 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
             )