This is an archive of the discontinued Mercurial Phabricator instance.

contrib: import the relnotes script from the release-tools repo
ClosedPublic

Authored by durin42 on Aug 15 2018, 10:02 PM.

Details

Summary

I figure this makes more sense to keep in the main repo, as it's a
guide of sorts on how to use the releasenotes extension in the
presence of commits that don't get relnotes annotations.

Ported to Python 3, cleaned up some logic in a few places, but for the
most part it's what we've been using for years.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Aug 15 2018, 10:02 PM
av6 added a subscriber: av6.Aug 16 2018, 3:12 AM

I've commented on things that can be improved, but they shouldn't stop this from landing.

contrib/relnotes
52

I assume it's for Python 2.4. Maybe needs more versions we don't support anymore?

58–59

These look the same.

83

color is not an extension anymore. pager is still an extension, but also exists in core.

89–98

Nit: this block looks too mundane to take 10 lines. The one below is even longer.

durin42 marked 3 inline comments as done.Aug 20 2018, 2:31 PM
durin42 updated this revision to Diff 10461.
durin42 added inline comments.Aug 20 2018, 2:32 PM
contrib/relnotes
89–98

Leaving unfixed because I did the formatting with black, and I'd rather just use that than have style discussions.

pulkit accepted this revision.Aug 29 2018, 3:53 PM

Amended this to make test-check* happy.

diff --git a/contrib/relnotes b/contrib/relnotes
--- a/contrib/relnotes
+++ b/contrib/relnotes
@@ -40,9 +40,9 @@ rules = {
     r"(typo|hint|note|style:|correct doc)": -20,
     r"_": -10,
     r"(argument|absolute_import|attribute|assignment|mutable)": -15,
-    r"(unused|useless|unnecessary|duplicate|deprecated|naming|scope|True|False)": -10,
+    r"(unused|useless|unnecessary|duplicate|deprecated|scope|True|False)": -10,
     r"(redundant|pointless|confusing|uninitialized|meaningless|dead)": -10,
-    r": (drop|remove|inherit|rename|simplify|inline)": -10,
+    r": (drop|remove|inherit|rename|simplify|naming|inline)": -10,
     r"(docstring|document .* method)": -20,
     r"(factor|extract|prepare|split|replace| import)": -20,
     r": add.*(function|method|implementation|test|example)": -10,
@@ -175,6 +175,5 @@ def main():
     for d in sorted(apis):
         print(" * %s" % d)
 
-
 if __name__ == "__main__":
     main()
This revision was automatically updated to reflect the committed changes.