Commit graph

31 commits

Author SHA1 Message Date
Thomas Haller 6ac3431827
find-backports: fix selecting backport candidates in find-backports
Due to a bug we would wrongly skip over patches that should
be backported. Fix it.
2020-08-14 16:56:21 +02:00
Thomas Haller eee82e0481
find-backports: add new find-backports scripts in Python
The existing find-backports.sh script seems to not work well.
For example, it does not include fixes for patches that are in
the common history of the current branch and upstream. This script is
supposed to work better.
2020-08-05 13:29:23 +02:00
Thomas Haller 22a98cc79e rh-utils: accept version number as argument for find-backports.sh
find-backports.sh only works because we craft commit messages with
necessary information. In particular the "Fixes" and cherry-picked-from
messages. That means, it relies on our git history to maintained in
a suitable manner so that the script can gather the necessary
information.

Likewise, we have a particular scheme how we do releases, how versions
are numbered, how stable branches and release tags are called, etc.

Exploit that, to allow for simpler calling convention for
find-backports.sh script:

  $ contrib/rh-utils/find-backports.sh 1.14

will automatically complete to

  $ contrib/rh-utils/find-backports.sh 1.14.0 nm-1-14 master
2018-11-22 11:38:09 +01:00
Thomas Haller a257ae8cac rh-utils: support multiple upstream refs for find-backports.sh
$ contrib/rh-utils/find-backports.sh 1.12.0 origin/nm-1-12 origin/master origin/nm-1-14
2018-10-23 10:12:37 +02:00
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