Mercurial > hg
comparison tests/test-releasenotes-parsing.t @ 33012:5814db57941c
releasenotes: improve parsing around bullet points
Earlier, on parsing the bullet points from existing release notes the bullet
points after the first one weren't written correctly to the notes file. This
patch makes changes to parsereleasenotesfromfile() function that introduces a new
bullet_points data structure that tracks the bullets and associated subparagraph.
It also makes necessary changes to the tests related to merging of bullets.
author | Rishabh Madan <rishabhmadan96@gmail.com> |
---|---|
date | Fri, 23 Jun 2017 17:15:53 +0200 |
parents | 91e355a0408b |
children | 3748098d072a |
comparison
equal
deleted
inserted
replaced
33011:8299eb9b08c7 | 33012:5814db57941c |
---|---|
57 > * Third bullet point. It has a single line. | 57 > * Third bullet point. It has a single line. |
58 > EOF | 58 > EOF |
59 section: feature | 59 section: feature |
60 bullet point: | 60 bullet point: |
61 paragraph: First bullet point. It has a single line. | 61 paragraph: First bullet point. It has a single line. |
62 bullet point: | |
62 paragraph: Second bullet point. It consists of multiple lines. | 63 paragraph: Second bullet point. It consists of multiple lines. |
64 bullet point: | |
63 paragraph: Third bullet point. It has a single line. | 65 paragraph: Third bullet point. It has a single line. |
64 | 66 |
65 Bullet point without newline between items | 67 Bullet point without newline between items |
66 | 68 |
67 $ hg debugparsereleasenotes - << EOF | 69 $ hg debugparsereleasenotes - << EOF |
75 > * Fourth bullet point | 77 > * Fourth bullet point |
76 > EOF | 78 > EOF |
77 section: feature | 79 section: feature |
78 bullet point: | 80 bullet point: |
79 paragraph: First bullet point | 81 paragraph: First bullet point |
82 bullet point: | |
80 paragraph: Second bullet point And it has multiple lines | 83 paragraph: Second bullet point And it has multiple lines |
84 bullet point: | |
81 paragraph: Third bullet point | 85 paragraph: Third bullet point |
86 bullet point: | |
82 paragraph: Fourth bullet point | 87 paragraph: Fourth bullet point |
83 | 88 |
84 Sub-section contents are read | 89 Sub-section contents are read |
85 | 90 |
86 $ hg debugparsereleasenotes - << EOF | 91 $ hg debugparsereleasenotes - << EOF |
128 > * Fix 2 | 133 > * Fix 2 |
129 > EOF | 134 > EOF |
130 section: feature | 135 section: feature |
131 bullet point: | 136 bullet point: |
132 paragraph: Feature 1 | 137 paragraph: Feature 1 |
138 bullet point: | |
133 paragraph: Feature 2 | 139 paragraph: Feature 2 |
134 section: fix | 140 section: fix |
135 bullet point: | 141 bullet point: |
136 paragraph: Fix 1 | 142 paragraph: Fix 1 |
143 bullet point: | |
137 paragraph: Fix 2 | 144 paragraph: Fix 2 |
138 | 145 |
139 Mixed sub-sections and bullet list | 146 Mixed sub-sections and bullet list |
140 | 147 |
141 $ hg debugparsereleasenotes - << EOF | 148 $ hg debugparsereleasenotes - << EOF |
164 paragraph: Some words about the first feature. | 171 paragraph: Some words about the first feature. |
165 subsection: Feature 2 | 172 subsection: Feature 2 |
166 paragraph: Some words about the second feature. That span multiple lines. | 173 paragraph: Some words about the second feature. That span multiple lines. |
167 bullet point: | 174 bullet point: |
168 paragraph: Bullet item 1 | 175 paragraph: Bullet item 1 |
176 bullet point: | |
169 paragraph: Bullet item 2 | 177 paragraph: Bullet item 2 |