Allow '.' in user name on gclient ssh connection

For example, my id is 'kangil.han', but it fails during parsing.
So this patch fixes it.

Review URL: https://codereview.chromium.org/27484002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228937 0039d316-1c4b-4281-b951-d872f2087c98
parent 1ef44afb
......@@ -33,7 +33,7 @@ def SplitUrlRevision(url):
"""Splits url and returns a two-tuple: url, rev"""
if url.startswith('ssh:'):
# Make sure ssh://user-name@example.com/~/test.git@stable works
regex = r'(ssh://(?:[-\w]+@)?[-\w:\.]+/[-~\w\./]+)(?:@(.+))?'
regex = r'(ssh://(?:[-.\w]+@)?[-\w:\.]+/[-~\w\./]+)(?:@(.+))?'
components = re.search(regex, url).groups()
else:
components = url.split('@', 1)
......
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