commit 766a0cc090ab001b75daefda739ea78918ed5211
parent b5c7de4a1d04670606ee14bedd1253f2a9f2d445
Author: Sandor Molnar <smolnar@mozilla.com>
Date: Wed, 31 Dec 2025 01:56:24 +0200
Revert "Bug 2008043 - Fix base ref computation. r=glandium" for causing vcs failures
This reverts commit b5c7de4a1d04670606ee14bedd1253f2a9f2d445.
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/python/mozversioncontrol/mozversioncontrol/repo/git.py b/python/mozversioncontrol/mozversioncontrol/repo/git.py
@@ -129,9 +129,17 @@ class GitRepository(Repository):
if is_official_remote(url):
yield name
+ def get_mozilla_remote_args(self) -> list[str]:
+ """Return a list of `--remotes` arguments to limit commits to official remotes."""
+ official_remotes = [
+ f"--remotes={remote}" for remote in self.get_mozilla_upstream_remotes()
+ ]
+
+ return official_remotes if official_remotes else ["--remotes"]
+
@property
def base_ref(self):
- remote_args = self.get_mozilla_upstream_remotes()
+ remote_args = self.get_mozilla_remote_args()
refs = self._run(
"rev-list", "HEAD", "--topo-order", "--boundary", "--not", *remote_args
@@ -356,7 +364,7 @@ class GitRepository(Repository):
follow: Optional[list[str]] = None,
) -> list[str]:
"""Return a list of commit SHAs for nodes on the current branch."""
- remote_args = self.get_mozilla_upstream_remotes()
+ remote_args = self.get_mozilla_remote_args()
cmd = [
"log",