Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: gclient_utils.py

Issue 233333003: Make it possible to refer to github-style URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Added another test for the LateOverride to work correctly with scp-style urls. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient.py ('k') | tests/gclient_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index c394862f76645aaef15b9352f68a3585be422998..d082fb7e706c7e808e7de9d0a519a8c5df9a58d7 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -75,7 +75,10 @@ def SplitUrlRevision(url):
regex = r'(ssh://(?:[-.\w]+@)?[-\w:\.]+/[-~\w\./]+)(?:@(.+))?'
components = re.search(regex, url).groups()
else:
- components = url.split('@', 1)
+ components = url.rsplit('@', 1)
+ if re.match(r'^\w+\@', url) and '@' not in components[0]:
+ components = [url]
+
if len(components) == 1:
components += [None]
return tuple(components)
« no previous file with comments | « gclient.py ('k') | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698