Commit a0e66ea6 authored by sebmarchand's avatar sebmarchand Committed by Commit bot

Limit the number of extra/missing files that get printed.

The message now look like this:

2 files missing from the 9ff97version of the toolchain:
        vs2013_files\9ff97\win_sdk\Include\10.0.10240.0\ucrt\assert.h
        vs2013_files\9ff97\win_sdk\Include\10.0.10240.0\ucrt\complex.h
22 extra files in the 9ff97version of the toolchain:
        vs2013_files\9ff97\win_sdk\Include\10.0.10240.0\ucrt\assert_.h
        vs2013_files\9ff97\win_sdk\Include\10.0.10240.0\ucrt\complex_.h
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\string\wmemmove_s.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\asctime.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\clock.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\ctime.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\days.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\difftime.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\ftime.cpp
        vs2013_files\9ff97\win_sdk\Source\10.0.10240.0\ucrt\time\gmtime.cpp
        ...

R=thakis@chromium.org

Review-Url: https://codereview.chromium.org/2092753003
parent 37b270d7
......@@ -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):
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']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment