##// END OF EJS Templates
relnotes: more improvements
av6 -
r41581:bb817917 default draft
parent child Browse files
Show More
@@ -14,6 +14,7 b' rules = {'
14 r"\(issue": 100,
14 r"\(issue": 100,
15 r"\(BC\)": 100,
15 r"\(BC\)": 100,
16 r"\(API\)": 100,
16 r"\(API\)": 100,
17 r"\(SEC\)": 100,
17 # core commands, bump up
18 # core commands, bump up
18 r"(commit|files|log|pull|push|patch|status|tag|summary)(|s|es):": 20,
19 r"(commit|files|log|pull|push|patch|status|tag|summary)(|s|es):": 20,
19 r"(annotate|alias|branch|bookmark|clone|graft|import|verify).*:": 20,
20 r"(annotate|alias|branch|bookmark|clone|graft|import|verify).*:": 20,
@@ -21,6 +22,7 b' rules = {'
21 r"(mq|shelve|rebase):": 20,
22 r"(mq|shelve|rebase):": 20,
22 # newsy
23 # newsy
23 r": deprecate": 20,
24 r": deprecate": 20,
25 r": new.*(extension|flag|module)": 10,
24 r"( ability|command|feature|option|support)": 10,
26 r"( ability|command|feature|option|support)": 10,
25 # experimental
27 # experimental
26 r"hg-experimental": 20,
28 r"hg-experimental": 20,
@@ -29,22 +31,23 b' rules = {'
29 # bug-like?
31 # bug-like?
30 r"(fix|don't break|improve)": 7,
32 r"(fix|don't break|improve)": 7,
31 r"(not|n't|avoid|fix|prevent).*crash": 10,
33 r"(not|n't|avoid|fix|prevent).*crash": 10,
34 r"vulnerab": 10,
32 # boring stuff, bump down
35 # boring stuff, bump down
33 r"^contrib": -5,
36 r"^contrib": -5,
34 r"debug": -5,
37 r"debug": -5,
35 r"help": -5,
38 r"help": -5,
39 r"minor": -5,
36 r"(doc|metavar|bundle2|obsolete|obsmarker|rpm|setup|debug\S+:)": -15,
40 r"(doc|metavar|bundle2|obsolete|obsmarker|rpm|setup|debug\S+:)": -15,
37 r"(check-code|check-commit|check-config|import-checker)": -20,
41 r"(check-code|check-commit|check-config|import-checker)": -20,
38 r"(flake8|lintian|pyflakes|pylint)": -20,
42 r"(flake8|lintian|pyflakes|pylint)": -20,
39 # cleanups and refactoring
43 # cleanups and refactoring
40 r"(cleanup|white ?space|spelling|quoting)": -20,
44 r"(clean ?up|white ?space|spelling|quoting)": -20,
41 r"(flatten|dedent|indent|nesting|unnest)": -20,
45 r"(flatten|dedent|indent|nesting|unnest)": -20,
42 r"(typo|hint|note|comment|TODO|FIXME)": -20,
46 r"(typo|hint|note|comment|TODO|FIXME)": -20,
43 r"(style:|convention|one-?liner)": -20,
47 r"(style:|convention|one-?liner)": -20,
44 r"_": -10,
45 r"(argument|absolute_import|attribute|assignment|mutable)": -15,
48 r"(argument|absolute_import|attribute|assignment|mutable)": -15,
46 r"(scope|True|False)": -10,
49 r"(scope|True|False)": -10,
47 r"(unused|useless|unnecessary|superfluous|duplicate|deprecated)": -10,
50 r"(unused|useless|unnecessar|superfluous|duplicate|deprecated)": -10,
48 r"(redundant|pointless|confusing|uninitialized|meaningless|dead)": -10,
51 r"(redundant|pointless|confusing|uninitialized|meaningless|dead)": -10,
49 r": (drop|remove|delete|rip out)": -10,
52 r": (drop|remove|delete|rip out)": -10,
50 r": (inherit|rename|simplify|naming|inline)": -10,
53 r": (inherit|rename|simplify|naming|inline)": -10,
@@ -54,9 +57,12 b' rules = {'
54 r": (move|extract) .* (to|into|from|out of)": -20,
57 r": (move|extract) .* (to|into|from|out of)": -20,
55 r": implement ": -5,
58 r": implement ": -5,
56 r": use .* implementation": -20,
59 r": use .* implementation": -20,
60 r": use .* instead of": -20,
61 # code
62 r"_": -10,
63 r"__": -5,
64 r"\(\)": -5,
57 r"\S\S\S+\.\S\S\S\S+": -5,
65 r"\S\S\S+\.\S\S\S\S+": -5,
58 r": use .* instead of": -20,
59 r"__": -5,
60 # dumb keywords
66 # dumb keywords
61 r"\S+/\S+:": -10,
67 r"\S+/\S+:": -10,
62 r"\S+\.\S+:": -10,
68 r"\S+\.\S+:": -10,
@@ -92,6 +98,15 b' groupings = ['
92 (r"shelve|unshelve", "extensions"),
98 (r"shelve|unshelve", "extensions"),
93 ]
99 ]
94
100
101 def wikify(desc):
102 desc = desc.replace("(issue", "(Bts:issue")
103 desc = re.sub(r"\b([0-9a-f]{12})\b", r"Cset:\1", desc)
104 # stop ParseError from being recognized as a (nonexistent) wiki page
105 desc = re.sub(r" ([A-Z][a-z]+[A-Z][a-z]+)\b", r" !\1", desc)
106 # prevent wiki markup of magic methods
107 desc = re.sub(r"\b(\S*__\S*)\b", r"`\1`", desc)
108 return desc
109
95 def main():
110 def main():
96 desc = "example: %(prog)s 4.7.2 --stoprev 4.8rc0"
111 desc = "example: %(prog)s 4.7.2 --stoprev 4.8rc0"
97 ap = argparse.ArgumentParser(description=desc)
112 ap = argparse.ArgumentParser(description=desc)
@@ -148,10 +163,8 b' def main():'
148 if re.search(rule, desc):
163 if re.search(rule, desc):
149 score += val
164 score += val
150
165
151 desc = desc.replace("(issue", "(Bts:issue")
152
153 if score >= cutoff:
166 if score >= cutoff:
154 commits.append(desc)
167 commits.append(wikify(desc))
155 # Group unflagged notes.
168 # Group unflagged notes.
156 groups = {}
169 groups = {}
157 bcs = []
170 bcs = []
General Comments 0
You need to be logged in to leave comments. Login now