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

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 2052533002: Update the VS toolchain hash computation caching. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: 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 37a3207d8836d5840a6630a3afe9f71d0bacd5aa..d7d20b820354009696bee0cdb6c17d49fbeba65b 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -165,6 +165,10 @@ def CalculateHash(root, expected_hash):
digest.update(path_without_hash.lower())
with open(path, 'rb') as f:
digest.update(f.read())
+
+ # Save the timestamp file if the calculated hash is the expected one.
+ if digest.hexdigest() == expected_hash:
+ SaveTimestampsAndHash(root, digest.hexdigest())
return digest.hexdigest()
« 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