diff mbox

[COMMITTED] Add branch_changer.py script to maintainer-scripts

Message ID 5eede3b2-8d88-be7c-a7f7-96d0c6df68de@suse.cz
State New
Headers show

Commit Message

Martin Liška Aug. 15, 2016, 11:47 a.m. UTC
On 08/14/2016 06:35 PM, Gerald Pfeifer wrote:
> The one thing that would be really good to add is documentation on
> the usage of the script and/or examples for relevant invocations.
> 
> Thanks,
> Gerald

Good idea, sending second version of the patch where I added usage samples.

Ready to be installed?
Martin

Comments

Gerald Pfeifer Aug. 15, 2016, 3:40 p.m. UTC | #1
Hi Martin,

On Mon, 15 Aug 2016, Martin Liška wrote:
> Ready to be installed?

you ignored (or I guess: missed) the updated patch that I
included in my previous message.  Can you use that instead
of your original?

As for the examples, I would omit the output of the script,
since otherwise we'll need to adjust that whenever the output
changes, and it's a bit lengthy. ;-)  And potentially use a 
few words to describe the scenario instead for those cases
where there is no --comment options?


Clearly this is an improvement, so let's give Richi a day to
chime in and then go ahead with whatever you have.

Gerald
diff mbox

Patch

From f56db0ac860fd92c0f4112119a05038ea9de7ce9 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 12 Aug 2016 15:27:29 +0200
Subject: [PATCH] Document branch_changer.py script

maintainer-scripts/ChangeLog:

2016-08-12  Martin Liska  <mliska@suse.cz>

	* branch_changer.py: Describe the script. Add sample usage
	of the script.
---
 maintainer-scripts/branch_changer.py | 58 ++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/maintainer-scripts/branch_changer.py b/maintainer-scripts/branch_changer.py
index 5e1681b..607d9ac 100755
--- a/maintainer-scripts/branch_changer.py
+++ b/maintainer-scripts/branch_changer.py
@@ -1,9 +1,67 @@ 
 #!/usr/bin/env python3
 
+# Script is used by maintainers to modify bugzilla entries in a batch mode.
+# Currently, the scripts can remove and add a release from/to PRs that are
+# prefixed with '[x Regression]'. Apart from that, the script can also
+# change a target milestone and optionally enhance list of known-to-fail
+# versions.
+#
+# The script utilizes the Bugzilla API, as documented here:
+# http://bugzilla.readthedocs.io/en/latest/api/index.html
+
 # The script requires simplejson, requests, semantic_version packages, in case
 # of openSUSE:
 # zypper in python3-simplejson python3-requests
 # pip3 install semantic_version
+#
+# Sample usages of the script:
+#
+# $ ./maintainer-scripts/branch_changer.py api_key --new-target-milestone=6.2:6.3 --comment '6.2 has been released....' --add-known-to-fail=6.2 --limit 3
+# PR28628 (Not forcing alignment of arrays in structs  with -fsection-anchors)
+#   changing target milestone: "6.2" to "6.3" (same branch)
+#   adding comment: "6.2 has been released...."
+#   changing known_to_fail: "" to "6.2"
+# PR35514 (Gcc shoud generate symbol type for undefined symbol)
+#   changing target milestone: "6.2" to "6.3" (same branch)
+#   adding comment: "6.2 has been released...."
+#   changing known_to_fail: "" to "6.2"
+# PR39589 (make -Wmissing-field-initializers=2 work with "designated initializers" ?)
+#   changing target milestone: "6.2" to "6.3" (same branch)
+#   adding comment: "6.2 has been released...."
+#   changing known_to_fail: "" to "6.2"
+#
+# Modified PRs: 3
+#
+# $ ./maintainer-scripts/branch_changer.py api_key --new-target-milestone=5.5:6.3 --comment 'GCC 5 branch is being closed' --remove 5 --limit 3
+# PR8270 ([5/6/7 Regression] back-slash white space newline with comments, no warning)
+#   changing summary: "[5/6/7 Regression] back-slash white space newline with comments, no warning" to "[6/7 Regression] back-slash white space newline with comments, no warning"
+# PR12245 ([5/6/7 regression] Uses lots of memory when compiling large initialized arrays)
+#   changing summary: "[5/6/7 regression] Uses lots of memory when compiling large initialized arrays" to "[6/7 regression] Uses lots of memory when compiling large initialized arrays"
+# PR14179 ([5/6/7 Regression] out of memory while parsing array with many initializers)
+#   changing summary: "[5/6/7 Regression] out of memory while parsing array with many initializers" to "[6/7 Regression] out of memory while parsing array with many initializers"
+#
+# Modified PRs: 3
+# PR8270 ([5/6/7 Regression] back-slash white space newline with comments, no warning)
+#   changing target milestone: "5.5" to "6.3" (regresses with the new milestone)
+#   adding comment: "GCC 5 branch is being closed"
+# PR12245 ([5/6/7 regression] Uses lots of memory when compiling large initialized arrays)
+#   changing target milestone: "5.5" to "6.3" (regresses with the new milestone)
+#   adding comment: "GCC 5 branch is being closed"
+# PR14179 ([5/6/7 Regression] out of memory while parsing array with many initializers)
+#   changing target milestone: "5.5" to "6.3" (regresses with the new milestone)
+#   adding comment: "GCC 5 branch is being closed"
+#
+# Modified PRs: 3
+#
+# $ ./maintainer-scripts/branch_changer.py api_key --add=7:8 --limit 3
+# PR8270 ([5/6/7 Regression] back-slash white space newline with comments, no warning)
+#   changing summary: "[5/6/7 Regression] back-slash white space newline with comments, no warning" to "[5/6/7/8 Regression] back-slash white space newline with comments, no warning"
+# PR12245 ([5/6/7 regression] Uses lots of memory when compiling large initialized arrays)
+#   changing summary: "[5/6/7 regression] Uses lots of memory when compiling large initialized arrays" to "[5/6/7/8 regression] Uses lots of memory when compiling large initialized arrays"
+# PR14179 ([5/6/7 Regression] out of memory while parsing array with many initializers)
+#   changing summary: "[5/6/7 Regression] out of memory while parsing array with many initializers" to "[5/6/7/8 Regression] out of memory while parsing array with many initializers"
+#
+# Modified PRs: 3
 
 import requests
 import json
-- 
2.9.2