Commit bda475e2 authored by borenet@google.com's avatar borenet@google.com

gclient: Fix nested checkout bug when validating .gclient

BUG=355492

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@258989 0039d316-1c4b-4281-b951-d872f2087c98
parent 6a9b1684
......@@ -142,16 +142,12 @@ class SCMWrapper(object):
def GetActualRemoteURL(self):
"""Attempt to determine the remote URL for this SCMWrapper."""
try:
if os.path.exists(os.path.join(self.checkout_path, '.git')):
return shlex.split(scm.GIT.Capture(
['config', '--local', '--get-regexp', r'remote.*.url'],
self.checkout_path))[1]
except Exception:
pass
try:
if os.path.exists(os.path.join(self.checkout_path, '.svn')):
return scm.SVN.CaptureLocalInfo([], self.checkout_path)['URL']
except Exception:
pass
return None
def DoesRemoteURLMatch(self):
......
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