Commit f1631cd0 authored by Dave Tu's avatar Dave Tu Committed by Commit Bot

[bot_update] Remove extraneous slash in revision parsing.

`parsed_root.path` already contains the leading slash in the the URL, so adding
an additional slash gives an incorrect URL.

Change-Id: I84f04179356bb132a31531232a5c30c7808f7c1b
Reviewed-on: https://chromium-review.googlesource.com/520724Reviewed-by: 's avatarPaweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: David Tu <dtu@chromium.org>
parent 2f5f0b7a
......@@ -858,10 +858,9 @@ def parse_revisions(revisions, root):
parsed_root = urlparse.urlparse(current_root)
if parsed_root.scheme in ['http', 'https']:
# We want to normalize git urls into .git urls.
normalized_root = 'https://%s/%s' % (parsed_root.netloc,
parsed_root.path)
normalized_root = 'https://' + parsed_root.netloc + parsed_root.path
if not normalized_root.endswith('.git'):
normalized_root = '%s.git' % normalized_root
normalized_root += '.git'
elif parsed_root.scheme:
print 'WARNING: Unrecognized scheme %s, ignoring' % parsed_root.scheme
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment