Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 045f664a authored by Adrian DC's avatar Adrian DC Committed by Łukasz Patron
Browse files

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
parent 4f0ad572
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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