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

Side by Side Diff: tools/checkdeps/builddeps.py

Issue 25604004: Add #!/usr/bin/env python to builddeps.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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))
OLDNEW
« 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