From 045f664a1a8cda103a226af8a9ba2420130a01aa Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Sun, 13 Oct 2019 12:34:06 +0200 Subject: [PATCH] repopick: Support project paths detection on different branches * When some projects are declared in the manifests with specific changes (revision="refs/changes/../....../."), the path detection does not work, while most cases have a unique paths * Allow projects with unique branches to select their paths upon repopick with a warning about the selection Change-Id: Ic873d69f57c78f233db3d0de4ebd529f896799ea --- build/tools/repopick.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/tools/repopick.py b/build/tools/repopick.py index dd6bb2c8..bf27d1d8 100755 --- a/build/tools/repopick.py +++ b/build/tools/repopick.py @@ -366,6 +366,10 @@ if __name__ == '__main__': project_path = project_name_to_data[item['project']][item['branch']] elif args.path: project_path = args.path + elif item['project'] in project_name_to_data and len(project_name_to_data[item['project']]) == 1: + local_branch = list(project_name_to_data[item['project']])[0] + project_path = project_name_to_data[item['project']][local_branch] + print('WARNING: Project {0} has a different branch ("{1}" != "{2}")'.format(project_path, local_branch, item['branch'])) elif args.ignore_missing: print('WARNING: Skipping {0} since there is no project directory for: {1}\n'.format(item['id'], item['project'])) continue