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

Unified Diff: trychange.py

Issue 2102004: Fix SCM.ReadRootFile when self.gclient_root is not yet defined (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 7 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: trychange.py
===================================================================
--- trychange.py (revision 47310)
+++ trychange.py (working copy)
@@ -158,8 +158,11 @@
logging.info('Found %s at %s' % (filename, self.checkout_root))
return gclient_util.FileRead(filepath)
return None
- root = os.path.abspath(self.gclient_root)
cur = os.path.abspath(self.checkout_root)
+ if self.gclient_root:
+ root = os.path.abspath(self.gclient_root)
+ else:
+ root = gclient_utils.FindGclientRoot(cur)
M-A Ruel 2010/05/15 00:53:14 As I wrote earlier, I still prefer to use root = c
assert cur.startswith(root), (root, cur)
while cur.startswith(root):
filepath = os.path.join(cur, filename)
« 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