# HG changeset patch # User RhodeCode Admin # Date 2023-10-04 13:57:54 # Node ID c9256ee2ecc04e6d8b2f3df652a91d1c426df365 # Parent 17e9e494a8fba908381edc8f00196b4ec927a548 git: fix remote repo compare logic that wrongly used repos to fetch for cross fork review diff --git a/vcsserver/remote/git_remote.py b/vcsserver/remote/git_remote.py --- a/vcsserver/remote/git_remote.py +++ b/vcsserver/remote/git_remote.py @@ -812,14 +812,18 @@ class GitRemote(RemoteBase): return repo.get_description() @reraise_safe_exceptions - def get_missing_revs(self, wire, rev1, rev2, path2): + def get_missing_revs(self, wire, rev1, rev2, other_repo_path): + origin_repo_path = wire['path'] repo = self._factory.repo(wire) - LocalGitClient(thin_packs=False).fetch(path2, repo) + # fetch from other_repo_path to our origin repo + LocalGitClient(thin_packs=False).fetch(other_repo_path, repo) wire_remote = wire.copy() - wire_remote['path'] = path2 + wire_remote['path'] = other_repo_path repo_remote = self._factory.repo(wire_remote) - LocalGitClient(thin_packs=False).fetch(path2, repo_remote) + + # fetch from origin_repo_path to our remote repo + LocalGitClient(thin_packs=False).fetch(origin_repo_path, repo_remote) revs = [ x.commit.id