Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package git-repo for openSUSE:Factory checked in at 2026-08-19 17:58:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/git-repo (Old) and /work/SRC/openSUSE:Factory/.git-repo.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "git-repo" Wed Aug 19 17:58:17 2026 rev:20 rq:1371832 version:2.66.1 Changes: -------- --- /work/SRC/openSUSE:Factory/git-repo/git-repo.changes 2026-08-06 16:28:45.546149234 +0200 +++ /work/SRC/openSUSE:Factory/.git-repo.new.1258/git-repo.changes 2026-08-19 17:59:59.537599295 +0200 @@ -1,0 +2,6 @@ +Tue Aug 11 17:04:07 UTC 2026 - BenoƮt Monin <[email protected]> + +- Update to version 2.66.1: + * project: skip manifest default fallback for MetaProjects + +------------------------------------------------------------------- Old: ---- git-repo-2.66.tar.xz New: ---- git-repo-2.66.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ git-repo.spec ++++++ --- /var/tmp/diff_new_pack.TjMlN0/_old 2026-08-19 18:00:00.519634581 +0200 +++ /var/tmp/diff_new_pack.TjMlN0/_new 2026-08-19 18:00:00.520634617 +0200 @@ -17,7 +17,7 @@ Name: git-repo -Version: 2.66 +Version: 2.66.1 Release: 0 Summary: The Multiple Git Repository Tool License: Apache-2.0 ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.TjMlN0/_old 2026-08-19 18:00:00.590637132 +0200 +++ /var/tmp/diff_new_pack.TjMlN0/_new 2026-08-19 18:00:00.604637635 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://gerrit.googlesource.com/git-repo</param> - <param name="changesrevision">d9da609d8c120bb882a43196a4a6b7f183418304</param></service></servicedata> + <param name="changesrevision">b85886fa9f5b4e2189cc5b2f40bd0a80459d4c77</param></service></servicedata> (No newline at EOF) ++++++ git-repo-2.66.tar.xz -> git-repo-2.66.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-repo-2.66/project.py new/git-repo-2.66.1/project.py --- old/git-repo-2.66/project.py 2026-08-05 00:00:19.000000000 +0200 +++ new/git-repo-2.66.1/project.py 2026-08-10 22:37:04.000000000 +0200 @@ -2859,12 +2859,17 @@ def _GetUpstreamFallback(self) -> Optional[str]: """Resolve a fallback upstream ref when revisionExpr is a SHA-1.""" - for cand in ( - self.dest_branch, - self.manifest.default.upstreamExpr, - self.manifest.default.destBranchExpr, - self.manifest.default.revisionExpr, - ): + default = self.manifest.default + candidates = [self.dest_branch] + if default: + candidates.extend( + ( + default.upstreamExpr, + default.destBranchExpr, + default.revisionExpr, + ) + ) + for cand in candidates: if cand and not IsId(cand): return cand return None @@ -4736,6 +4741,20 @@ # here also avoids loading the manifest during `repo init`, # before manifest.xml has been linked into .repo/. return False + + def _GetUpstreamFallback(self) -> Optional[str]: + # MetaProjects (the manifest repo and repo itself) do not have + # defaults in a manifest. Returning None here also avoids + # loading the manifest during `repo init`, before manifest.xml + # has been linked into .repo/. + return None + + def _SharingProjectHasShallow(self) -> bool: + # MetaProjects (the manifest repo and repo itself) are never + # shared with other projects in the manifest. Returning False + # here also avoids loading the manifest during `repo init`, + # before manifest.xml has been linked into .repo/. + return False @property def HasChanges(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/git-repo-2.66/tests/test_project.py new/git-repo-2.66.1/tests/test_project.py --- old/git-repo-2.66/tests/test_project.py 2026-08-05 00:00:19.000000000 +0200 +++ new/git-repo-2.66.1/tests/test_project.py 2026-08-10 22:37:04.000000000 +0200 @@ -742,6 +742,35 @@ ) self.assertFalse(os.path.exists(manifest_path)) + def test_get_upstream_fallback_metaproject_skips_manifest_load( + self, + ) -> None: + """MetaProjects must not parse manifest.xml during upstream fallback.""" + with utils_for_test.TempGitTree() as tempdir: + fakeproj = self.setUpManifest(tempdir) + manifest_path = os.path.join( + tempdir, ".repo", manifest_xml.MANIFEST_FILE_NAME + ) + self.assertFalse(os.path.exists(manifest_path)) + + self.assertIsNone(fakeproj._GetUpstreamFallback()) + self.assertFalse(os.path.exists(manifest_path)) + + def test_sharing_project_has_shallow_metaproject_skips_manifest_load( + self, + ) -> None: + """MetaProjects must not parse manifest.xml during sharing shallow + check.""" + with utils_for_test.TempGitTree() as tempdir: + fakeproj = self.setUpManifest(tempdir) + manifest_path = os.path.join( + tempdir, ".repo", manifest_xml.MANIFEST_FILE_NAME + ) + self.assertFalse(os.path.exists(manifest_path)) + + self.assertFalse(fakeproj._SharingProjectHasShallow()) + self.assertFalse(os.path.exists(manifest_path)) + def test_sync_use_local_gitdirs_worktree_conflict(self): """Test that --use-local-gitdirs conflicts with --worktree.""" with utils_for_test.TempGitTree() as tempdir: @@ -1403,6 +1432,61 @@ "+refs/heads/*:refs/remotes/origin/*", cmd_args ) + def test_remote_fetch_sha1_metaproject_without_manifest_xml(self) -> None: + """Test MetaProject _RemoteFetch with SHA-1 fetches all branches.""" + sha = "4f8a3c0000000000000000000000000000000000" + with utils_for_test.TempGitTree() as tempdir: + repodir = os.path.join(tempdir, ".repo") + manifest_dir = os.path.join(repodir, "manifests") + manifest_file = os.path.join( + repodir, manifest_xml.MANIFEST_FILE_NAME + ) + os.mkdir(repodir) + os.mkdir(manifest_dir) + manifest = manifest_xml.XmlManifest(repodir, manifest_file) + proj = project.ManifestProject( + manifest, + "test/manifest", + os.path.join(tempdir, ".git"), + tempdir, + ) + proj.revisionExpr = sha + proj.upstream = None + proj._CheckForImmutableRevision = mock.MagicMock(return_value=False) + + mock_remote = mock.MagicMock() + mock_remote.name = "origin" + + def _to_local(r: str) -> str: + if r.startswith("refs/heads/"): + return "refs/remotes/origin/" + r[11:] + return r + + mock_remote.ToLocal.side_effect = _to_local + mock_remote.PreConnectFetch.return_value = True + proj.GetRemote = mock.MagicMock(return_value=mock_remote) + + with mock.patch("project.GitCommand") as mock_git_cmd: + mock_cmd_instance = mock.MagicMock() + mock_cmd_instance.Wait.return_value = 0 + mock_git_cmd.return_value = mock_cmd_instance + + res = proj._RemoteFetch(current_branch_only=True) + + self.assertTrue(res) + mock_git_cmd.assert_called_once() + cmd_args = mock_git_cmd.call_args[0][1] + self.assertIn("+refs/heads/*:refs/remotes/origin/*", cmd_args) + + def test_remote_fetch_sha1_none_manifest_default(self) -> None: + """Test _GetUpstreamFallback when manifest.default is None.""" + sha = "4f8a3c0000000000000000000000000000000000" + with utils_for_test.TempGitTree() as tempdir: + proj = self._get_project(tempdir, revisionExpr=sha) + proj.dest_branch = None + proj.manifest.default = None + self.assertIsNone(proj._GetUpstreamFallback()) + class GetEnvVarsTests(unittest.TestCase): """Tests for GetEnvVars project environment variable generation.""" ++++++ git-repo.obsinfo ++++++ --- /var/tmp/diff_new_pack.TjMlN0/_old 2026-08-19 18:00:00.915648810 +0200 +++ /var/tmp/diff_new_pack.TjMlN0/_new 2026-08-19 18:00:00.925649170 +0200 @@ -1,5 +1,5 @@ name: git-repo -version: 2.66 -mtime: 1785880819 -commit: d9da609d8c120bb882a43196a4a6b7f183418304 +version: 2.66.1 +mtime: 1786394224 +commit: b85886fa9f5b4e2189cc5b2f40bd0a80459d4c77
