diff options
author | Tim Rozet <trozet@redhat.com> | 2017-09-23 19:46:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-23 19:46:31 +0000 |
commit | e55f718f8a4450ab3efd89c9cb0ad9fabfc3ab90 (patch) | |
tree | d0accd1fb330c2e4e03f59e2d3f29bb50a2b2dcd | |
parent | 7e062540b6865c0751d6e982b496acc0bbc8b6b7 (diff) | |
parent | 31889bc1a97c009b6730c7308794b94f04cd08a4 (diff) |
Merge "Fixes clone fork change URL" into stable/euphrates
-rw-r--r-- | apex/build/build_utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apex/build/build_utils.py b/apex/build/build_utils.py index 14327a90..66a63d37 100644 --- a/apex/build/build_utils.py +++ b/apex/build/build_utils.py @@ -16,6 +16,8 @@ import re import shutil import sys +from urllib.parse import quote_plus + def clone_fork(args): ref = None @@ -35,7 +37,9 @@ def clone_fork(args): change_id = m.group(1) logging.info("Using change ID {} from {}".format(change_id, args.repo)) rest = GerritRestAPI(url=args.url) - change_str = "changes/{}?o=CURRENT_REVISION".format(change_id) + change_path = "{}~{}~{}".format(args.repo, quote_plus(args.branch), + change_id) + change_str = "changes/{}?o=CURRENT_REVISION".format(change_path) change = rest.get(change_str) try: assert change['status'] not in 'ABANDONED' 'CLOSED',\ @@ -104,5 +108,6 @@ def main(): parser.print_help() exit(1) + if __name__ == "__main__": main() |