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(+)
@@ -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