From e0b16a22a01c54a00a9e4a0c53dddfce3b0d59d6 Mon Sep 17 00:00:00 2001 From: Xin Li Date: Sun, 26 Sep 2021 23:20:32 -0700 Subject: superproject: support a new revision attribute. Tested: $ ./run_tests Verified that a manifest that specified superproject revision would use the specified revision, and superproject will use the default revision. Note that this is a slight behavior change from earlier repo versions, which would always use the branch name of the manifest itself. However, the new behavior would be more consisitent with regular "project" element and would allow superproject be used even if it is not enabled for the particular manifest branch, so we have decided to make the change as it would provide more flexibility and better matches what other elements would do. Bug: [google internal] b/187868160 Change-Id: I35255ee347aff6e65179f7879d52931f168b477e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317643 Tested-by: Xin Li Reviewed-by: Raman Tenneti Reviewed-by: Mike Frysinger --- tests/test_git_superproject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_git_superproject.py') diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index e9b824d6..a24fc7f0 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py @@ -157,7 +157,7 @@ class SuperprojectTestCase(unittest.TestCase): """) self._superproject = git_superproject.Superproject(manifest, self.repodir, self.git_event_log) - with mock.patch.object(self._superproject, '_GetBranch', return_value='junk'): + with mock.patch.object(self._superproject, '_branch', 'junk'): sync_result = self._superproject.Sync() self.assertFalse(sync_result.success) self.assertTrue(sync_result.fatal) -- cgit v1.2.3-54-g00ecf