* [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches
@ 2012-10-30 16:15 Simon Glass
2012-10-31 16:12 ` Stefan Roese
2012-11-07 23:20 ` Anatolij Gustschin
0 siblings, 2 replies; 3+ messages in thread
From: Simon Glass @ 2012-10-30 16:15 UTC (permalink / raw)
To: u-boot
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>
---
tools/patman/series.py | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/tools/patman/series.py b/tools/patman/series.py
index a283a2d..d2971f4 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -145,10 +145,11 @@ class Series(dict):
Return:
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
- Changes in v1:
+ Changes in v3: None
+ Changes in v2:
- Fix the widget
- Jog the dial
@@ -162,12 +163,16 @@ class Series(dict):
if commit and this_commit != commit:
continue
out.append(text)
- if out:
- out = ['Changes in v%d:' % change] + out
- if need_blank:
- out = [''] + out
- final += out
- need_blank = True
+ line = 'Changes in v%d:' % change
+ have_changes = len(out) > 0
+ if have_changes:
+ out.insert(0, line)
+ else:
+ out = [line + ' None']
+ if need_blank:
+ out.insert(0, '')
+ final += out
+ need_blank = have_changes
if self.changes:
final.append('')
return final
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches
2012-10-30 16:15 [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches Simon Glass
@ 2012-10-31 16:12 ` Stefan Roese
2012-11-07 23:20 ` Anatolij Gustschin
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2012-10-31 16:12 UTC (permalink / raw)
To: u-boot
On 10/30/2012 05:15 PM, Simon Glass wrote:
> 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>
Nice! That was quick! Thirsty? ;)
Tested-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches
2012-10-30 16:15 [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches Simon Glass
2012-10-31 16:12 ` Stefan Roese
@ 2012-11-07 23:20 ` Anatolij Gustschin
1 sibling, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2012-11-07 23:20 UTC (permalink / raw)
To: u-boot
Hi,
On Tue, 30 Oct 2012 09:15:16 -0700
Simon Glass <sjg@chromium.org> wrote:
> 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>
> ---
> tools/patman/series.py | 21 +++++++++++++--------
> 1 files changed, 13 insertions(+), 8 deletions(-)
Applied to staging/agust at denx.de. Thanks!
Anatolij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-07 23:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 16:15 [U-Boot] [PATCH] patman: Issue empty change logs for unchanged patches Simon Glass
2012-10-31 16:12 ` Stefan Roese
2012-11-07 23:20 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox