Skip to content

Commit

Permalink
repopick: Support project paths detection on different branches
Browse files Browse the repository at this point in the history
 * 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
  • Loading branch information
AdrianDC authored and joeyhuab committed Dec 5, 2019
1 parent 435cb3a commit d2ab0d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/tools/repopick.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ def cmp_reviews(review_a, review_b):
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
Expand Down

0 comments on commit d2ab0d6

Please sign in to comment.