summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorRaman Tenneti <rtenneti@google.com>2021-01-14 19:17:50 -0800
committerRaman Tenneti <rtenneti@google.com>2021-01-21 19:41:52 +0000
commit6a872c9daeec58dda61786e6f65591330709f6ad (patch)
treedcd22dcc29c91de8a097cf7075400bb463ef40e0 /project.py
parentdf6c506a8af47c19e853c96ba15e4446f93304b2 (diff)
downloadgit-repo-6a872c9daeec58dda61786e6f65591330709f6ad.tar.gz
sync: Added --use-superproject option and support for superproject.v2.12
Added "--use-superporject" option to sync.py to fetch project SHAs from superproject. If there are any missing projects in superprojects, it prints the missing entries and exits. If there are no missing entries, it will use SHAs from superproject to fetch the projects from git. Tested the code with the following commands. $ ./run_tests tests/test_manifest_xml.py $ ./run_tests -v tests/test_git_superproject.py $ ./run_tests -v Tested the sync code by copying all the repo changes into my Android AOSP checkout and adding <superporject> tag to default.xml. With local modification to the code to print the status, .../WORKING_DIRECTORY$ repo sync --use-superproject repo: executing 'git clone' url: sso://android/platform/superproject repo: executing 'git ls-tree' Success: [] Bug: https://crbug.com/gerrit/13709 Tested-by: Raman Tenneti <rtenneti@google.com> Change-Id: Id18665992428dd684c04b0e0b3a52f46316873a0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/293822 Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/project.py b/project.py
index 6c6534d8..17c75b4d 100644
--- a/project.py
+++ b/project.py
@@ -1197,6 +1197,9 @@ class Project(object):
1197 raise ManifestInvalidRevisionError('revision %s in %s not found' % 1197 raise ManifestInvalidRevisionError('revision %s in %s not found' %
1198 (self.revisionExpr, self.name)) 1198 (self.revisionExpr, self.name))
1199 1199
1200 def SetRevisionId(self, revisionId):
1201 self.revisionId = revisionId
1202
1200 def Sync_LocalHalf(self, syncbuf, force_sync=False, submodules=False): 1203 def Sync_LocalHalf(self, syncbuf, force_sync=False, submodules=False):
1201 """Perform only the local IO portion of the sync process. 1204 """Perform only the local IO portion of the sync process.
1202 Network access is not required. 1205 Network access is not required.