subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1848836 - /subversion/site/tools/generate-message-id-map.py
Date Thu, 13 Dec 2018 10:40:05 GMT
Author: julianfoad
Date: Thu Dec 13 10:40:05 2018
New Revision: 1848836

URL: http://svn.apache.org/viewvc?rev=1848836&view=rev
Log:
* tools/generate-message-id-map.py: New.

Added:
    subversion/site/tools/generate-message-id-map.py   (with props)

Added: subversion/site/tools/generate-message-id-map.py
URL: http://svn.apache.org/viewvc/subversion/site/tools/generate-message-id-map.py?rev=1848836&view=auto
==============================================================================
--- subversion/site/tools/generate-message-id-map.py (added)
+++ subversion/site/tools/generate-message-id-map.py Thu Dec 13 10:40:05 2018
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# Regenerate 'publish/.message-ids.tsv'
+#
+# - Search files under 'publish/' for URLs of messages in the haxx.se
+#   archives. Compile a list of <URL><TAB><MESSAGE-ID>.
+# - Commit the result if it has changed.
+#
+# Run this in a Subversion 'site' working copy.
+#
+
+import subprocess
+
+fn = "publish/.message-ids.tsv"
+
+old_lines = open(fn).readlines()
+new_lines = subprocess.check_output(['tools/haxx-url-to-message-id.sh', 'publish']).splitlines(True)
+old_lines_cmp = [l for l in old_lines if not l.startswith('#')]
+new_lines_cmp = [l for l in new_lines if not l.startswith('#')]
+if old_lines_cmp != new_lines_cmp:
+  with open(fn, 'w') as f:
+    f.writelines(new_lines)
+  subprocess.check_call(['svn', 'ci', '-q',
+                         '-m', '* ' + fn + ': Automatically regenerated.',
+                         fn])

Propchange: subversion/site/tools/generate-message-id-map.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/site/tools/generate-message-id-map.py
------------------------------------------------------------------------------
    svn:executable = *

Propchange: subversion/site/tools/generate-message-id-map.py
------------------------------------------------------------------------------
    svn:mime-type = text/x-python



Mime
View raw message