OLD | NEW |
| 1 #!/usr/bin/env python |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
4 | 5 |
5 """Traverses the source tree, parses all found DEPS files, and constructs | 6 """Traverses the source tree, parses all found DEPS files, and constructs |
6 a dependency rule table to be used by subclasses. | 7 a dependency rule table to be used by subclasses. |
7 | 8 |
8 The format of the deps file: | 9 The format of the deps file: |
9 | 10 |
10 First you have the normal module-level deps. These are the ones used by | 11 First you have the normal module-level deps. These are the ones used by |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 popen_out = os.popen('cd %s && git ls-files --full-name .' % | 339 popen_out = os.popen('cd %s && git ls-files --full-name .' % |
339 subprocess.list2cmdline([self.base_directory])) | 340 subprocess.list2cmdline([self.base_directory])) |
340 for line in popen_out.readlines(): | 341 for line in popen_out.readlines(): |
341 dir_name = os.path.join(self.base_directory, os.path.dirname(line)) | 342 dir_name = os.path.join(self.base_directory, os.path.dirname(line)) |
342 # Add the directory as well as all the parent directories. Use | 343 # Add the directory as well as all the parent directories. Use |
343 # forward slashes and lower case to normalize paths. | 344 # forward slashes and lower case to normalize paths. |
344 while dir_name != self.base_directory: | 345 while dir_name != self.base_directory: |
345 self.git_source_directories.add(NormalizePath(dir_name)) | 346 self.git_source_directories.add(NormalizePath(dir_name)) |
346 dir_name = os.path.dirname(dir_name) | 347 dir_name = os.path.dirname(dir_name) |
347 self.git_source_directories.add(NormalizePath(self.base_directory)) | 348 self.git_source_directories.add(NormalizePath(self.base_directory)) |
OLD | NEW |