Chromium Code Reviews| 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) |