[tor-commits] [tor/master] Add a generated timestamp to the fallback directory header

nickm at torproject.org nickm at torproject.org
Fri Jan 5 21:47:34 UTC 2018


commit 9864fcd4e30e9afa2fa7a8bc25cf8399432a5796
Author: teor <teor2345 at gmail.com>
Date:   Wed Dec 27 21:10:46 2017 +1100

    Add a generated timestamp to the fallback directory header
    
    This can act as a revision counter, as requested by atagar in 24742.
    
    Part of 24725.
---
 scripts/maint/updateFallbackDirs.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/maint/updateFallbackDirs.py b/scripts/maint/updateFallbackDirs.py
index 54b50c377..4c0a30a5e 100755
--- a/scripts/maint/updateFallbackDirs.py
+++ b/scripts/maint/updateFallbackDirs.py
@@ -2217,6 +2217,10 @@ def list_fallbacks(whitelist, blacklist):
   print "/* type=fallback */"
   print ("/* version={} */"
          .format(cleanse_c_multiline_comment(FALLBACK_FORMAT_VERSION)))
+  now = datetime.datetime.utcnow()
+  timestamp = now.strftime('%Y%m%d%H%M%S')
+  print ("/* timestamp={} */"
+         .format(cleanse_c_multiline_comment(timestamp)))
   # end the header with a separator, to make it easier for parsers
   print SECTION_SEPARATOR_COMMENT
 





More information about the tor-commits mailing list