summaryrefslogtreecommitdiffstats
path: root/tools/repopick.py
diff options
context:
space:
mode:
authorrbox <androidrbox@gmail.com>2014-11-22 20:59:45 -0700
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 17:50:25 -0700
commit3b35530041937ac15bf941275d498c75e510fe47 (patch)
treeeb0e211a0b3b4cc89500e664aafdde341ad226ef /tools/repopick.py
parent0792a21ceb5e3db8cb27415b4f44b118e315adea (diff)
downloadbuild-3b35530041937ac15bf941275d498c75e510fe47.zip
build-3b35530041937ac15bf941275d498c75e510fe47.tar.gz
build-3b35530041937ac15bf941275d498c75e510fe47.tar.bz2
repopick: handle variant hal branching
Change-Id: Ib0dee19abc13a7fb8d8e42c09b73c1b4f35ca938
Diffstat (limited to 'tools/repopick.py')
-rwxr-xr-xtools/repopick.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/repopick.py b/tools/repopick.py
index 2600bde..13be690 100755
--- a/tools/repopick.py
+++ b/tools/repopick.py
@@ -264,6 +264,7 @@ for change in args.change_number:
# Extract information from the JSON response
date_fluff = '.000000000'
project_name = data['project']
+ project_branch = data['branch']
change_number = data['_number']
status = data['status']
current_revision = data['revisions'][data['current_revision']]
@@ -290,6 +291,27 @@ for change in args.change_number:
# - check that the project path exists
if project_name in project_name_to_path:
project_path = project_name_to_path[project_name];
+
+ if project_path.startswith('hardware/qcom/'):
+ split_path = project_path.split('/')
+ # split_path[2] might be display or it might be display-caf, trim the -caf
+ split_path[2] = split_path[2].split('-')[0]
+
+ # Need to treat hardware/qcom/{audio,display,media} specially
+ if split_path[2] == 'audio' or split_path[2] == 'display' or split_path[2] == 'media':
+ split_branch = project_branch.split('-')
+
+ # display is extra special
+ if split_path[2] == 'display' and len(split_path) == 3:
+ project_path = '/'.join(split_path)
+ else:
+ project_path = '/'.join(split_path[:-1])
+
+ if len(split_branch) == 4 and split_branch[0] == 'cm' and split_branch[2] == 'caf':
+ project_path += '-caf/msm' + split_branch[3]
+ # audio and media are different from display
+ elif split_path[2] == 'audio' or split_path[2] == 'media':
+ project_path += '/default'
elif args.ignore_missing:
print('WARNING: Skipping %d since there is no project directory for: %s\n' % (change_number, project_name))
continue;