diff --git a/README.rst b/README.rst index 17cadfc..4274238 100644 --- a/README.rst +++ b/README.rst @@ -773,6 +773,13 @@ Example:: ./bugs-fixed-since.py -r ../neutron --start=8.0.0 +Use ``--stop`` option to list bugs mentioned in stable branch messages stopping +from a specified commit. + +Example:: + + ./bugs-fixed-since.py -B -r ../neutron --start=8.0.0 --stop=origin/stable/mitaka + Use ``-B`` option to ignore patches that were already backported into all stable branches. diff --git a/bugs-fixed-since.py b/bugs-fixed-since.py index d02b66f..67f55a8 100755 --- a/bugs-fixed-since.py +++ b/bugs-fixed-since.py @@ -38,6 +38,10 @@ def _parse_args(): parser.add_argument( '--start', '-s', required=True, help='git hash to start search from') + parser.add_argument( + '--stop', '-st', + help='git hash to stop search to', + ) parser.add_argument( '--skip-backported', '-B', action='store_true', @@ -99,7 +103,7 @@ def main(): # make sure that we work with the latest code repo.remotes.origin.fetch() - latest = repo.refs['origin/master'].commit + latest = repo.refs[args.stop if args.stop else 'origin/master'].commit rev = '%s..%s' % (args.start, latest.hexsha) # avoid duplicates