From 71b135774715455b4e8e31467a891954762e2f25 Mon Sep 17 00:00:00 2001 From: "kangil.han@samsung.com" Date: Wed, 16 Oct 2013 17:28:11 +0000 Subject: [PATCH] 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 --- gclient_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gclient_utils.py b/gclient_utils.py index 80eb816b1..e77137f3e 100644 --- a/gclient_utils.py +++ b/gclient_utils.py @@ -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)