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

Unified Diff: scm.py

Issue 6578029: Fix scm.SVN.GetCheckoutRoot() so it is not confused by intermixed checkouts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 10 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 | tests/scm_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm.py
diff --git a/scm.py b/scm.py
index f0b956ab4254ca026ac3374b78e97585d1f83077..856370504bdd45cce91152e06ade84bd6119f36d 100644
--- a/scm.py
+++ b/scm.py
@@ -806,14 +806,19 @@ class SVN(object):
"""
directory = os.path.abspath(directory)
try:
- cur_dir_repo_root = SVN.CaptureInfo(directory)['Repository Root']
+ info = SVN.CaptureInfo(directory)
+ cur_dir_repo_root = info['Repository Root']
+ url = info['URL']
except gclient_utils.Error:
return None
while True:
parent = os.path.dirname(directory)
try:
- if SVN.CaptureInfo(parent)['Repository Root'] != cur_dir_repo_root:
+ info = SVN.CaptureInfo(parent)
+ if (info['Repository Root'] != cur_dir_repo_root or
+ info['URL'] != os.path.dirname(url)):
break
+ url = info['URL']
except gclient_utils.Error:
break
directory = parent
« no previous file with comments | « no previous file | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698