diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-06-16 15:00:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-06-16 15:00:35 -0400 |
commit | 205084631257751b655c5bf33a1f290e2741bf27 (patch) | |
tree | 2064abd0e920e7920423f45dc0bd631d2ed6bf5c /scripts/maint/format_changelog.py | |
parent | 2f4fcfc8d14bfae233b1485fd171cc48d6d79fdb (diff) | |
download | tor-205084631257751b655c5bf33a1f290e2741bf27.tar.gz tor-205084631257751b655c5bf33a1f290e2741bf27.zip |
Bring remaining 0.2.5.5-alpha entries into changelog
Diffstat (limited to 'scripts/maint/format_changelog.py')
-rwxr-xr-x | scripts/maint/format_changelog.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/maint/format_changelog.py b/scripts/maint/format_changelog.py index 86f5c50398..f67e89b602 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) |