From 11362bd3a5894270983cca9a5adc999222e96b9c Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 28 Dec 2020 13:45:50 +0900 Subject: [PATCH] Imported Upstream version 4.0.2 --- ChangeLog | 5 +++++ PKG-INFO | 4 ++-- pbr.egg-info/PKG-INFO | 4 ++-- pbr/packaging.py | 10 +++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a34af0f..e93f0a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ CHANGES ======= +4.0.2 +----- + + 4.0.1 ----- @@ -12,6 +16,7 @@ CHANGES * builddoc: Treat '[pbr] autodoc\_tree\_excludes' as a multi-line opt * update parse test to use reliable comparison +* Better Sem-Ver header handling * Make docs on env vars a little clearer * Updated from global requirements * Updated from global requirements diff --git a/PKG-INFO b/PKG-INFO index f3b2946..da5c3ce 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,14 +1,14 @@ Metadata-Version: 2.1 Name: pbr -Version: 4.0.1 +Version: 4.0.2 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack Author-email: openstack-dev@lists.openstack.org License: UNKNOWN Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/ -Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ +Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Description: Introduction ============ diff --git a/pbr.egg-info/PKG-INFO b/pbr.egg-info/PKG-INFO index f3b2946..da5c3ce 100644 --- a/pbr.egg-info/PKG-INFO +++ b/pbr.egg-info/PKG-INFO @@ -1,14 +1,14 @@ Metadata-Version: 2.1 Name: pbr -Version: 4.0.1 +Version: 4.0.2 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack Author-email: openstack-dev@lists.openstack.org License: UNKNOWN Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/ -Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ +Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Description: Introduction ============ diff --git a/pbr/packaging.py b/pbr/packaging.py index 38b4982..1ff28da 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -622,10 +622,14 @@ def _get_increment_kwargs(git_dir, tag): version_spec = tag + "..HEAD" else: version_spec = "HEAD" - changelog = git._run_git_command(['log', version_spec], git_dir) - header_len = len(' sem-ver:') + # Get the raw body of the commit messages so that we don't have to + # parse out any formatting whitespace and to avoid user settings on + # git log output affecting out ability to have working sem ver headers. + changelog = git._run_git_command(['log', '--pretty=%B', version_spec], + git_dir) + header_len = len('sem-ver:') commands = [line[header_len:].strip() for line in changelog.split('\n') - if line.lower().startswith(' sem-ver:')] + if line.lower().startswith('sem-ver:')] symbols = set() for command in commands: symbols.update([symbol.strip() for symbol in command.split(',')]) -- 2.34.1