aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-06-16 15:00:10 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-16 15:00:35 -0400
commit205084631257751b655c5bf33a1f290e2741bf27 (patch)
tree2064abd0e920e7920423f45dc0bd631d2ed6bf5c /scripts
parent2f4fcfc8d14bfae233b1485fd171cc48d6d79fdb (diff)
downloadtor-205084631257751b655c5bf33a1f290e2741bf27.tar
tor-205084631257751b655c5bf33a1f290e2741bf27.tar.gz
Bring remaining 0.2.5.5-alpha entries into changelog
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/format_changelog.py18
-rwxr-xr-xscripts/maint/sortChanges.py9
2 files changed, 23 insertions, 4 deletions
diff --git a/scripts/maint/format_changelog.py b/scripts/maint/format_changelog.py
index 86f5c5039..f67e89b60 100755
--- a/scripts/maint/format_changelog.py
+++ b/scripts/maint/format_changelog.py
@@ -270,7 +270,16 @@ class ChangeLog(object):
CL = ChangeLog()
parser = head_parser
-sys.stdin = open('ChangeLog', 'r')
+if len(sys.argv) == 1:
+ fname = 'ChangeLog'
+else:
+ fname = sys.argv[1]
+
+fname_new = fname+".new"
+
+sys.stdin = open(fname, 'r')
+
+nextline = None
for line in sys.stdin:
line = line.rstrip()
@@ -286,13 +295,14 @@ for line in sys.stdin:
CL.lint()
-sys.stdout = open('ChangeLog.new', 'w')
+sys.stdout = open(fname_new, 'w')
CL.dump()
-print nextline
+if nextline is not None:
+ print nextline
for line in sys.stdin:
sys.stdout.write(line)
-os.rename('ChangeLog.new', 'ChangeLog')
+os.rename(fname_new, fname)
diff --git a/scripts/maint/sortChanges.py b/scripts/maint/sortChanges.py
index f70490bad..726a723f9 100755
--- a/scripts/maint/sortChanges.py
+++ b/scripts/maint/sortChanges.py
@@ -1,4 +1,13 @@
#!/usr/bin/python
+# Copyright (c) 2014, The Tor Project, Inc.
+# See LICENSE for licensing information
+
+"""This script sorts a bunch of changes files listed on its command
+ line into roughly the order in which they should appear in the
+ changelog.
+
+ TODO: collation support.
+"""
import re
import sys