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

Unified Diff: gcl.py

Issue 379021: Fix GetCachedFile(use_root=True)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 1 month 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: gcl.py
===================================================================
--- gcl.py (revision 31536)
+++ gcl.py (working copy)
@@ -155,9 +155,11 @@
url_path = dir_info["URL"]
content = ""
while True:
- # First, look for a locally modified version of the file.
- local_path = os.path.join(local_dir, local_base)
- r = gclient_scm.CaptureSVNStatus((local_path,))
+ # First, look for a locally modified version of the file if we can.
+ r = ""
+ if not use_root:
+ local_path = os.path.join(local_dir, local_base)
+ r = gclient_scm.CaptureSVNStatus((local_path,))
rc = -1
if r:
(status, file) = r[0]
@@ -166,7 +168,7 @@
content = ReadFile(local_path)
rc = 0
else:
- # Then look in the repository.
+ # Look in the repository if we didn't find something local.
svn_path = url_path + "/" + filename
content, rc = RunShellWithReturnCode(["svn", "cat", svn_path])
« 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