diff options
author | Dan Pasanen <invisiblek@cyanogenmod.org> | 2016-08-25 09:39:27 -0500 |
---|---|---|
committer | Adrian DC <radian.dc@gmail.com> | 2016-12-04 12:04:36 +0100 |
commit | 9aa34c95a61c57512cc7973740c34ab3e61983c5 (patch) | |
tree | ecd738d1ea9afef547e4a6ec4622975bc644db98 /tools | |
parent | e06132cf62d6e7686e43bc9ad82fb8f0dc126f6f (diff) | |
download | build-9aa34c95a61c57512cc7973740c34ab3e61983c5.zip build-9aa34c95a61c57512cc7973740c34ab3e61983c5.tar.gz build-9aa34c95a61c57512cc7973740c34ab3e61983c5.tar.bz2 |
repopick: try to use remote's default revision
* If the project doesn't have a revision specified, try
to see if it's remote has one specified before falling back
to the global default.
RM-290
Change-Id: I05129413b154e5d08d0fa9ef0ce853631b7e1562
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/repopick.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/repopick.py b/tools/repopick.py index a53c043..2b0aab4 100755 --- a/tools/repopick.py +++ b/tools/repopick.py @@ -209,6 +209,7 @@ if __name__ == '__main__': manifest = subprocess.check_output(['repo', 'manifest']) xml_root = ElementTree.fromstring(manifest) projects = xml_root.findall('project') + remotes = xml_root.findall('remote') default_revision = xml_root.findall('default')[0].get('revision').split('/')[-1] #dump project data into the a list of dicts with the following data: @@ -219,7 +220,11 @@ if __name__ == '__main__': path = project.get('path') revision = project.get('revision') if revision is None: - revision = default_revision + for remote in remotes: + if remote.get('name') == project.get('remote'): + revision = remote.get('revision') + if revision is None: + revision = default_revision if not name in project_name_to_data: project_name_to_data[name] = {} |