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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 2092753003: Limit the number of extra/missing files that get printed. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: More Pythonic Created 4 years, 6 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: win_toolchain/get_toolchain_if_necessary.py
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index d7d20b820354009696bee0cdb6c17d49fbeba65b..8d2dab5d8d439f27ad6ee2ccaa63220cfaf5a616 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -140,16 +140,20 @@ def CalculateHash(root, expected_hash):
timestamps_data_files.append(f[0])
missing_files = [f for f in timestamps_data_files if f not in file_list]
if len(missing_files):
scottmg 2016/06/23 16:45:24 These two duplicated blocks almost look like they
Sébastien Marchand 2016/06/23 17:41:45 Yeah, I thought about this but it seemed a little
- print ('Some files are missing from the %s version of the toolchain:' %
- expected_hash)
- for f in missing_files:
+ print ('%d files missing from the %s version of the toolchain:' %
+ (len(missing_files), expected_hash))
+ for f in missing_files[:10]:
print '\t%s' % f
+ if len(missing_files) > 10:
+ print '\t...'
extra_files = [f for f in file_list if f not in timestamps_data_files]
if len(extra_files):
- print ('There\'s some extra files in the %s version of the toolchain:' %
- expected_hash)
- for f in extra_files:
+ print ('%d extra files in the %s version of the toolchain:' %
+ (len(extra_files), expected_hash))
+ for f in extra_files[:10]:
print '\t%s' % f
+ if len(extra_files) > 10:
+ print '\t...'
if matches:
return timestamps_data['sha1']
« 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