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.
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
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.
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>
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>
- 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>