Chromium Code Reviews| Index: gclient.py |
| diff --git a/gclient.py b/gclient.py |
| index 2ad86d3cd9c32af785ba8e1aad8b0097e6cf62ca..5411382ca366744390dd3da1fc0fe3d654783418 100644 |
| --- a/gclient.py |
| +++ b/gclient.py |
| @@ -1128,8 +1128,16 @@ solutions = [ |
| # Fix path separator on Windows. |
| entry_fixed = entry.replace('/', os.path.sep) |
| e_dir = os.path.join(self.root_dir, entry_fixed) |
| + |
| + def _IsParentOfAny(parent, path_list): |
| + parent_plus_slash = parent + '/' |
| + for path in path_list: |
|
M-A Ruel
2013/03/08 15:39:41
return any(
path[:len(parent_plus_slash)] == p
jochen (gone - plz use gerrit)
2013/03/08 15:51:32
Done.
|
| + if path[:len(parent_plus_slash)] == parent_plus_slash: |
| + return True |
| + return False |
| + |
| # Use entry and not entry_fixed there. |
| - if entry not in entries and os.path.exists(e_dir): |
| + if not _IsParentOfAny(entry, entries) and os.path.exists(e_dir): |
| file_list = [] |
| scm = gclient_scm.CreateSCM(prev_url, self.root_dir, entry_fixed) |
| scm.status(self._options, [], file_list) |