summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f82e85b)
When working in the middle of a very long series, I often find it useful
to have a list of the patches right around the current patch. Add an
option to "stg series" called "--short" to provide this short list.
Signed-off-by: Chuck Lever <cel@netapp.com>
make_option('-e', '--empty',
help = 'check whether patches are empty '
'(much slower)',
make_option('-e', '--empty',
help = 'check whether patches are empty '
'(much slower)',
+ action = 'store_true'),
+ make_option('-s', '--short',
+ help = 'list just the patches around the topmost patch',
applied = crt_series.get_applied()
unapplied = crt_series.get_unapplied()
applied = crt_series.get_applied()
unapplied = crt_series.get_unapplied()
+
+ if options.short:
+ if len(applied) > 5:
+ applied = applied[-6:]
+ if len(unapplied) > 5:
+ unapplied = unapplied[:5]
+
patches = applied + unapplied
max_len = 0
patches = applied + unapplied
max_len = 0