patman: Issue empty change logs for unchanged patches
Often a particular patch may change only for some versions of a series. For versions where there is no change, issue a change log indicating that (for example 'Changes in v4: None'). For such lines, don't add a blank line afterwards, to conserve space. Use list.insert() instead of list = [item] + list. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
24dede480c
commit
27e976004e
|
@ -145,10 +145,11 @@ class Series(dict):
|
||||||
Return:
|
Return:
|
||||||
The change log as a list of strings, one per line
|
The change log as a list of strings, one per line
|
||||||
|
|
||||||
Changes in v2:
|
Changes in v4:
|
||||||
- Jog the dial back closer to the widget
|
- Jog the dial back closer to the widget
|
||||||
|
|
||||||
Changes in v1:
|
Changes in v3: None
|
||||||
|
Changes in v2:
|
||||||
- Fix the widget
|
- Fix the widget
|
||||||
- Jog the dial
|
- Jog the dial
|
||||||
|
|
||||||
|
@ -162,12 +163,16 @@ class Series(dict):
|
||||||
if commit and this_commit != commit:
|
if commit and this_commit != commit:
|
||||||
continue
|
continue
|
||||||
out.append(text)
|
out.append(text)
|
||||||
if out:
|
line = 'Changes in v%d:' % change
|
||||||
out = ['Changes in v%d:' % change] + out
|
have_changes = len(out) > 0
|
||||||
if need_blank:
|
if have_changes:
|
||||||
out = [''] + out
|
out.insert(0, line)
|
||||||
final += out
|
else:
|
||||||
need_blank = True
|
out = [line + ' None']
|
||||||
|
if need_blank:
|
||||||
|
out.insert(0, '')
|
||||||
|
final += out
|
||||||
|
need_blank = have_changes
|
||||||
if self.changes:
|
if self.changes:
|
||||||
final.append('')
|
final.append('')
|
||||||
return final
|
return final
|
||||||
|
|
Loading…
Reference in New Issue