Allow reno to handle the OpenStack process of deleting stable branches
and replacing them with eol tags.
Change-Id: I41ab682f081e7fd39ea534b7e2180c2109ca34ef
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Log warnings if the input doesn't match the type of data
expected. Eventually we may want to enforce these rules by raising
exceptions, but for now it should be enough to help someone debug their
problem to just print a warning.
Change-Id: I9016041bf13e9047d1894d2284b57b0a94554977
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Provide a stable API for writing to the cache file for projects that
don't want to invoke the shell command.
Change-Id: Iba80e313b6dba8182aebcba3f7bf99460226d75d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
If the user forgets to add the .yaml extension, we ignore the
file. Instead of doing that silently, report that we see something and
that we're ignoring it.
Change-Id: I18130951a09a216339d3b63dc7decc67e766ee2d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Users may do this, and it doesn't make sense to explode when a valid
section is stated but empty.
Change-Id: I1b30be6122893563cdc4c41172e28ed5a69a0e3c
Closes-Bug: #1588992
We had handling for renamed notes but not for deleted files. Add
handling with tests.
Change-Id: I20e40c6e60eee7840018abec07d23bc0be7cf696
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Compute the name of the file the loader is going to look for and write
to that if no other output is given. Use '-' to write to stdout.
Change-Id: I3f2cebb1c7a8e77cf8ed8d78c8ab85ccdd4ee325
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Define a loader API on top of the cache and scanner APIs and update the
list, report, and sphinxext modules to use that instead of calling the
scanner directly.
Change-Id: I2899c2ae9bb46919a375ffe4f195b239cff389ef
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Generate YAML data based on the query arguments. A future patch will
read the cache, if present, instead of scanning the git history.
Change-Id: I711577b40d6030e670a0620a38809e61b9ebf512
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We have the same query arguments to 2 commands and the next patch will
add a third. Refactor things to make that more consistent.
Change-Id: I757fe90c2afaa316a8067956fa375871536e77cd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Fix the logic for dealing with entropy in the unit tests so we consume
less.
Change-Id: I1faebfd5de0b9ae150bc2298df5d797fbbf83c07
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Change the default for the collapse flag to True and provide options
for setting it to false.
Change-Id: Ia17f39dc3bb576f26f159eee3903445a2f541c14
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Add an option to the scanner to tell it not to include all of the
history, but to stop at a specific version (inclusive). This will allow
us to configure release series history pages to only show versions that
are part of that series (otherwise, scanning stable/newton will include
mitaka releases from the master branch, for example).
Change-Id: I53b4b95e13c99d0a19f53e2f3e836ffe67428211
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Add a new flag to combine pre-release notes into their final release
version after that version is tagged. The flag defaults to False to
preserve the current behavior.
Change-Id: I6b9c058289f0baa3e39048b3fa78f6af81bdd83b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We had two different regexes being used for detecting tags. Unify them
into a single expression that works in both situations.
Convert that expression to use "verbose" mode to include some inline
documentation for the parts of the pattern.
Add more details to the existing debug output when new tags are found.
Add more debug output at the end to show how many files were actually
detected.
Change-Id: I7104f459c948011f198fed04303ea5cafb59f223
Closes-Bug: #1537451
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Only show error output from external commands in debug mode. This
suppresses "fatal" messages that are fatal to git, but not reno, for
example.
Change-Id: Ic9a9fcf30fd2f9ff2c0a837de45dd062b7a900e8
Related-Bug: 1534613
Use topological sort instead of date sort so that release notes appear
in the release where they are merged, rather than the one closest to the
same commit time, which might be much older.
In order to support listing tags on versions of git with different
output formats, we also limit the tags we care about to things that look
like version numbers (some sequence of digits, dots, and maybe "a" or
"b" for alpha & beta).
Change-Id: I95278eab25f331262a4c9eeac2260ca7290b5421
Closes-Bug: #1522153
Set up an example directory to hold example notes and add one showing
how to use complex formatting.
Change-Id: I7b3e27c394789cc1ff832ca0bf26f3244b058eb7
Scanning only changes with reno files in them means we miss some of the
git tags in the repository history, so include all patches in the git
log output and then filter them in reno based on patches that include
any release notes files.
Closes-bug: #1517175
Change-Id: I36c0a54e20d47fff9af2b7f82c5380d97345a625
get_random_string would often fail in decoding the result of
os.urandom. It would fail because the result of urandom is a bunch
of random bytes and not valid text (i.e., not a valid utf-8
representation).
Turns out that it's unnecessary to decode the result of os.urandom.
It returns six.binary_type whether on py2 or py3, and
binascii.hexlify() takes a six.binary_type as the argument.
binascii.hexlify() returns six.binary_type and we want
get_random_string() to return six.text_type, so convert.
Also, fixed the docstrings to use """.
Closes-Bug: 1514981
Change-Id: I60c31f2c47614beb3ed3c143d7815fdc15f5a0e0
Catch errors related to files we can't figure out what to do with and
report them to stderr as we skip the files.
Change-Id: I0793151e12406a544394645a3f220f3c3196d2c3