From 3387cfb3a69657a8a7e2e40eabbb56c514c797d4 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 2 Mar 2017 14:28:06 -0500 Subject: [PATCH] fix sphinxext scanner when it has a list of versions to include Only stop at the branch base if we have not been told explicitly which versions to include. Change-Id: I2488f614e6d2fec0cb7babce1258ae0c64e77e2d Signed-off-by: Doug Hellmann --- .../notes/fix-sphinxext-scanner-0aa012ada66db773.yaml | 8 ++++++++ reno/sphinxext.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-sphinxext-scanner-0aa012ada66db773.yaml diff --git a/releasenotes/notes/fix-sphinxext-scanner-0aa012ada66db773.yaml b/releasenotes/notes/fix-sphinxext-scanner-0aa012ada66db773.yaml new file mode 100644 index 0000000..097c097 --- /dev/null +++ b/releasenotes/notes/fix-sphinxext-scanner-0aa012ada66db773.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixes a problem with the sphinx extension that caused it to + produce an error if it had a list of versions to include that were + not within the set that seemed to be on the branch because of the + branch-base detection logic. Now if a list of versions is + included, the scan always includes the full history. \ No newline at end of file diff --git a/reno/sphinxext.py b/reno/sphinxext.py index 3079f70..9269b19 100644 --- a/reno/sphinxext.py +++ b/reno/sphinxext.py @@ -66,7 +66,9 @@ class ReleaseNotesDirective(rst.Directive): # out how Sphinx passes a "false" flag later. # 'collapse-pre-releases' in self.options opt_overrides['collapse_pre_releases'] = True - opt_overrides['stop_at_branch_base'] = True + # Only stop at the branch base if we have not been told + # explicitly which versions to include. + opt_overrides['stop_at_branch_base'] = (version_opt is None) if 'earliest-version' in self.options: opt_overrides['earliest_version'] = self.options.get( 'earliest-version')