X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/f82e85bcc0c4e0a6e2012d6b8b48d9c0ea8009c6..1f5b9c9a8202a1fd62cc0c88d17de681c1e85a62:/stgit/commands/series.py diff --git a/stgit/commands/series.py b/stgit/commands/series.py index a843307..ec1aaaf 100644 --- a/stgit/commands/series.py +++ b/stgit/commands/series.py @@ -39,6 +39,9 @@ options = [make_option('-b', '--branch', 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', action = 'store_true') ] @@ -66,6 +69,13 @@ def func(parser, options, args): 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