Commit graph

27 commits

Author SHA1 Message Date
Thomas Haller
0987f7f61e rh-utils: add script find-backports.sh
When backporting commits, we should do `git cherry-pick -x`,
so that the commit message contains:
    (cherry picked from commit $SHA)

Similarly, when fixing an actual bug of a previous commit, we
mark the faulty commit with:
    Fixes: $SHA

This script walks through a commit range of a stable branch,
and finds all $BACKPORTED_COMMITS (the sources from where we
cherry-picked).
Then it walks through a commit range of upstream/unstable branch,
and searches for $FIXES of the $BACKPORTED_COMMITS.

Then it prints all $FIXES, that are not yet backported. You probably
should backport those commits as well.
2015-08-17 14:10:45 +02:00
Thomas Haller
2427fbcb11 contrib/bzutil: fix parsing of related bugs in commit message
Also accept for example: "... see also related bug 4223".

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-12 20:33:29 +02:00
Thomas Haller
49fbca646b contrib/bzutil: print default config file name on missing paramter
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:22 +02:00
Thomas Haller
0e889246ce contrib/bzutil: extend parsing of Related: bugs in commit message
Allow more ways to specify "related" bugs, that work better
inside a sentance. The following formats are now detected too:

  - "related to bgo#XXXXX"
  - "related to bug bgo#XXXXX"
  - "related to http://..."
  - "related to bug http://..."
  - and possibly newline instead of a single white space

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:22 +02:00
Thomas Haller
680c1659a5 contrib/bzutil: fix parsing Related bugs
If one commit message references the same bug more then once,
the "Related" flag must be preserved.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
7c15f0c91c contrib/bzutil: add filter shortcut "fixed"
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
76b478d6ff contrib/bzutil: optimize evaluation of filters to fetch bugzilla only when needed
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
25a57149aa contrib/bzutil: add filter FilterId and allow negation of filters
There is already the command line option --bz to add additional bugs
to the output. The option --no-bz is to black list bugs.
The new filter 'bz' allows you something similar, but contrary to
--no-bz which acts at an earlier stage, this filters bugs after they are
parsed from refs.

Also, allow every filter to be negated by prepending it with ~ or !.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
d4be2c2da7 contrib/bzutil: allow ignoring "Related: " bugs when parsing commit message
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
ffe6264379 contrib/bzutil: also parse git-notes for bugzilla references
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
07abf88a0b contrib/bzutil: add --resolves option to bzutil.py, print '--bz' args and reorder output
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
3c552a9f7d contrib/bzutil: add new --filter shorthands (rhel, fc, rhel6, rhel6.5, etc.)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
d27c81961e contrib/bzutil: print list of excluded bugs from --no-bz
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
de3985a0ce contrib/bzutil: support simpler syntax to specify --filter option
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
fb9b95b570 contrib/bzutil: add show blocker flag in short output
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:21 +02:00
Thomas Haller
9d55787907 contrib/bzutil: add predefined --filters "rhel6", "rhel7" and "open"
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
e6a32515f9 contrib/bzutil: support selecting fields in --filter directly without 'match'
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
910f165ee5 contrib/bzutil: make 'match' filter to use regular expression
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
773d82be7a contrib/bzutil: add --filter option
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
af3a3d457b contrib/rh-utils: add url to webservice API as code comment
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
e44280ad12 contrib/rh-utils: implement setting of BZ properties
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
a1c9fdcd03 contrib/rh-utils: improve logging output and show product+version
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
204801283f contrib/rh-utils: show result count in output
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
40c9e31d9a contrib/rh-utils: improve help output by showing examples
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
61a69d5ef7 contrib/rh-utils: add --no-bz option to bzutil.py
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
1594ea0971 contrib/rh-utils: improve bzutil.py
- refactor handling of configuration values (supports environment variables
  to override configuration values and accepts missing config file)
- add different modes how to list and group the output
- add different levels of verbosity
- add --rh-search and --rh-search-since flag

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00
Thomas Haller
36d086af43 contrib: move/rename files
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-03 10:40:20 +02:00