Commit Graph

18 Commits

Author SHA1 Message Date
Stephen Finucane 57d7c53739 Update to latest hacking
Change-Id: If73238a39d0934c6f577fc52132fcbc63e8eb25f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-27 16:57:23 +01:00
Stephen Finucane fa0dd5652d Mark strings as raw
Resolves the following deprecation warning:

  DeprecationWarning: invalid escape sequence \.

Change-Id: If0bc30e646a3bb35c02dc73cc31fb146b3ecd6b5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-27 16:57:23 +01:00
Martin Domke de739bb080 Allow git-tags to be SemVer compliant
This fix allows it to use git-tags with a pre-release suffix that
follows the SemVer specification (e.g. 1.2.3-rc1).

Change-Id: Ie2e3c0e4145a105aff0a35c8dc6ec2a0cc1fc04e
2019-05-24 13:22:45 +00:00
Tim Burke 1ee21f6cd8 Ignore Zuul when generating AUTHORS
Change-Id: Id1626580dc76e2b2105b549873e88225186cb4fd
2018-07-30 12:43:28 -07:00
Gage Hugo 2cf1d2eb18 Fix missing comment from previous change
In a previous commit [0] there was an additional character
escaping added at the end that was not added to the list
in the comment for the function. This change adds the missing
character to the list of escaped characters from the previous
change.

[0] https://review.openstack.org/#/c/439897/

Change-Id: I6e83a10ee51f1f18176bf2d17a0092d5a3cc4dd4
2017-04-18 10:24:02 -05:00
Gage Hugo 3cc5af104e Add Changelog build handling for invalid chars
This change adds new handling when building a Changelog file
for specific characters that cause documentation building
warnings/errors to be emitted when sphinx tries to generate
a Changelog html page. The changes include:

- Escaping any '*' in a commit, which sphinx will interpret as the
  start of a new line and throw a warning.
- Escaping any '_' in a commit, which in certain cases, sphinx will
  interpret as an invalid link and create an error.
- Escaping any '`' in a commit, which in certain cases will
  cause sphinx to interpet as a literal, and throw a warning.

After this change, any entries in the changelog that contain
the above "invalid" syntax no longer generate sphinx
warnings/errors and the offending entries now generate correctly.

Change-Id: I672ef4c56486e59a384849a4b182d11129726ae9
2017-03-27 11:37:24 -05:00
Jenkins e8613428c1 Merge "Fix handling of old git log output" 2016-10-17 16:25:36 +00:00
Randall Nortman 626ecb6275 Fix handling of old git log output
Older versions of git produce log output (using --format specifiers)
that doesn't prefix tags with a "tag:" prefix, though they do using
the --decorate log format.  This was a bug in git that was fixed, but
the older git is still in the wild.  This change combines both the new
--format specifier method with the --decorate method to find tags even
if used with the old, buggy git, while (hopefully) avoiding
identifying non-tags as tags.

This is based on I6b557687f2428a528a8aa7f76e84797162488887 but tries to
use a single format string that works across all versions of git.

Because the format string has changed, some of the test data has had to
change to reflect the new format.

Change-Id: I58a1b12e0f4054fd25bddc77fabb6c89239561ff
Closes-Bug: #1570458
Co-Authored-By: James Polley <jp@jamezpolley.com>
2016-08-16 12:17:55 +10:00
dineshbhor a95982f9a0 Replace OpenStack LLC with OpenStack Foundation
Change-Id: I03fac862d7346bdac83503afb5f26119d0ea300d
Closes-Bug: #1214176
2016-07-26 17:37:42 +05:30
Monty Taylor da9ab10220 Split changelog on nulls instead of (
The logic that splits the git log lines to find tags gets confused by
parentheses in the commit message and truncates the line at the first
one. To mitigate this, have git emit a null character and split on that.

As a consequence of doing and testing this, fix the bug where
non-semantic-version tags in the tag history would show up in the
ChangeLog.

Change-Id: I5e522d6d374534f2921aaded42780df97c3d1987
2016-01-13 14:18:53 -05:00
Joshua Harlow 00b8d5a866 Ensure changelog log output is written if it already exists
Change-Id: I85b507fd8ebe4442c420228315013707e32cd35b
2015-10-22 11:18:09 -07:00
Jenkins 7253c18c72 Merge "Fix retrieval of commit data and most recent tag." 2015-08-16 12:13:02 +00:00
Robert Collins 5c0bb9186f Handle git being entirely absent
When we try to find the git directory, if git is not present, treat
that the same as an error from git itself. Sadly tests for this are
nearly impossible to meaningfully write, since we always have git
installed. I can do a mock based test if folk want one.

Change-Id: If6160d1fb3def8133bdd0b66105e60ef93f80f82
Closes-Bug: #1481468
2015-08-10 16:24:14 +12:00
Florian Wilhelm c3fc63c64f Fix retrieval of commit data and most recent tag.
git._iter_log_online() returns None in some cases for instance
when SKIP_WRITE_GIT_CHANGELOG is set to true. This is fixed by
returning an empty list in _iter_log_online.

Also the check if a changelog based on git should be written
was moved from git._iter_log_online to git.write_git_changelog
which makes more sense since some functions were calling
git._iter_log_online to get the changelog for other reasons than
writing it.

Additionally a unittest was added to check that setting the
environment variable SKIP_WRITE_GIT_CHANGELOG to true does not
break anything when retrieving the git version.

Change-Id: Ib12df23ab25b290dd394f9cb1456b8d5da57306a
Closes-Bug: 1467440
2015-08-03 14:44:11 +02:00
Robert Collins 898f71374a Show how long the git querying takes
We get complaints on timing from time to time.

Change-Id: I51bb69f413721197dc37e974b596bae4e8b2bce2
2015-07-16 11:58:15 +12:00
Robert Collins d689d9af9c Issue #1451976: handle commits with non-utf8 text
History may have commits with non utf8 text in them. Rather than
forcing users to rebase, handle it gracefully.

Change-Id: I6f6302c815b02234e27ee31f7ce87eab101b40ea
Closes-Bug: #1451976
2015-05-06 06:37:30 +12:00
Clark Boylan 50a43a18d1 Properly check for git before getting git dir
We cannot get the git dir if git is not installed. Check that git is
installed before querying for the git dir. Return None if the git dir
cannot be found or if git is not installed.

Change-Id: Ic8e0c74a779b23842369a8cf01fcbf37885202ef
Fixes-bug: 1326682
(cherry picked from commit e7d2825d39)
2014-12-21 22:21:32 +00:00
Monty Taylor c01b8dae1e Port in git sha changes from 0.10 line
Stop including git sha in version strings

We include it in pbr.json now. Including it is contentious in the world
of python, and it's up for debate as to whether or not it provides value.

Write and read more complex git sha info

Instead of encoding the git sha into the version string, add it to
a metadata file. This will allow us to get out of the business of
arguing with pip and setuptools about version info. In order to make
this really nice, provide a command line utility called "pbr" that has
subcommands to print out the metadata that we're now including in the
egg-info dir.

Only import sphinx during hook processing

When pbr is imported to handle writing the egg_info file because of
the entry point, it's causing sphinx to get imported. This has a
cascading effect once docutils is trying to be installed on a system
with pbr installed. If some of the imports fail along the way, allow
pbr to continue usefully but without the Sphinx extensions
available. Eventually, when everything is installed, those
extensions will work again when the commands for build_sphinx, etc.
are run separately.

Also slip in a change to reorder the default list of environments
run by tox so the testr database is created using a dbm format
available to all python versions.

Integration test PBR commits

Make sure that if a PBR commit is being tested then we install and
use that source rather than the latest PBR release.

Change-Id: Ie121e795be2eef30822daaa5fe8ab1c2315577ae
(cherry picked from commit 65f4fafd90)
(cherry picked from commit cd7da23937)
Closes-Bug: #1403510
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
2014-12-21 22:20:49 +00:00