]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a generated timestamp to the fallback directory header
authorteor <teor2345@gmail.com>
Wed, 27 Dec 2017 10:10:46 +0000 (21:10 +1100)
committerteor <teor2345@gmail.com>
Fri, 5 Jan 2018 02:27:47 +0000 (13:27 +1100)
This can act as a revision counter, as requested by atagar in 24742.

Part of 24725.

scripts/maint/updateFallbackDirs.py

index 54b50c377980fcbe62b3f190139bfd1726ba4700..4c0a30a5ef38cb5e6c79cc750d703ef1b4ad80b5 100755 (executable)
@@ -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