summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-01 16:56:20 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-01 16:56:20 -0500
commitf09d03c384b85d64dfe2abca156cd63bf7597979 (patch)
treea876ca82404004ca909053ac8524cc7460c4be7e /scripts
parentd7a713a41e2b115e8aabe9744e8010000bec202a (diff)
downloadtor-f09d03c384b85d64dfe2abca156cd63bf7597979.tar.gz
tor-f09d03c384b85d64dfe2abca156cd63bf7597979.zip
use sortChanges to fold changes files into changelog. No additional editing or formatting yet.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/maint/sortChanges.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/scripts/maint/sortChanges.py b/scripts/maint/sortChanges.py
index 7e25cefd53..d6ec0e269d 100755
--- a/scripts/maint/sortChanges.py
+++ b/scripts/maint/sortChanges.py
@@ -16,10 +16,36 @@ def fetch(fn):
s = "%s\n" % s.rstrip()
return s
+CSR='Code simplification and refactoring'
+
+REPLACEMENTS = {
+ # plurals
+ 'Minor bugfix' : 'Minor bugfixes',
+ 'Major bugfix' : 'Major bugfixes',
+ 'Minor feature' : 'Minor features',
+ 'Major feature' : 'Major features',
+ 'Removed feature' : 'Removed features',
+ 'Code simplification and refactorings' : CSR,
+ 'Code simplifications and refactoring' : CSR,
+ 'Code simplifications and refactorings' : CSR,
+
+ # wrong words
+ 'Minor fix' : 'Minor bugfixes',
+ 'Major fix' : 'Major bugfixes',
+ 'Minor fixes' : 'Minor bugfixes',
+ 'Major fixes' : 'Major bugfixes',
+ 'Minor enhancement' : 'Minor features',
+ 'Minor enhancements' : 'Minor features',
+ 'Major enhancement' : 'Major features',
+ 'Major enhancements' : 'Major features',
+}
+
def score(s,fname=None):
m = re.match(r'^ +o ([^\n]*)\n(.*)', s, re.M|re.S)
if not m:
print >>sys.stderr, "Can't score %r from %s"%(s,fname)
+ heading = m.group(1)
+ heading = REPLACEMENTS.get(heading, heading)
lw = m.group(1).lower()
if lw.startswith("major feature"):
score = 0
@@ -36,7 +62,7 @@ def score(s,fname=None):
else:
score = 100
- return (score, lw, m.group(1), m.group(2))
+ return (score, lw, heading, m.group(2))
def splitChanges(s):
this_entry = []