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

Unified Diff: tools/checkdeps/checkdeps.py

Issue 8416016: Fix checkdeps.py to check all the source directories in git checkouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 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: tools/checkdeps/checkdeps.py
diff --git a/tools/checkdeps/checkdeps.py b/tools/checkdeps/checkdeps.py
index b175beaf92cf209e92f59f6eeba322d33c56484a..dca995b1ac43f85830a4d89620e00d76550c2c6b 100755
--- a/tools/checkdeps/checkdeps.py
+++ b/tools/checkdeps/checkdeps.py
@@ -414,10 +414,12 @@ def GetGitSourceDirectory(root):
git_source_directory = set()
popen_out = os.popen("cd %s && git ls-files --full-name ." %
pipes.quote(root))
+ git_source_directory.add(root)
for line in popen_out.readlines():
dir_name = os.path.join(root, os.path.dirname(line))
- git_source_directory.add(dir_name)
- git_source_directory.add(root)
+ while dir_name not in git_source_directory:
satorux1 2011/10/27 22:03:48 if dir_name is initially "foo/bar/baz", we'll add
kinaba 2011/10/27 22:30:14 Yes.
+ git_source_directory.add(dir_name)
+ dir_name = os.path.dirname(dir_name)
return git_source_directory
« 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