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

Unified Diff: gclient_scm.py

Issue 209963002: gclient: Fix nested checkout bug when validating .gclient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 76b4d8dd22bd5c360b2a603a8f91a655ab296182..242b2c45c7a455156ad7513df8041659a9219035 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -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):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698