X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/43e97a2036d951afaf5bc0cffd9633f4c634fc7d..948dae344afd7633b7a074beb36113c1b46527eb:/stgit/commands/series.py diff --git a/stgit/commands/series.py b/stgit/commands/series.py index e66f1bd..105eeb9 100644 --- a/stgit/commands/series.py +++ b/stgit/commands/series.py @@ -33,6 +33,9 @@ prefixed with a '>'. Empty patches are prefixed with a '0'.""" options = [make_option('-b', '--branch', help = 'use BRANCH instead of the default one'), + make_option('-c', '--count', + help = 'print the number of patches in the series', + action = 'store_true'), make_option('-d', '--description', help = 'show a short description for each patch', action = 'store_true'), @@ -73,6 +76,10 @@ def func(parser, options, args): applied = crt_series.get_applied() unapplied = crt_series.get_unapplied() + if options.count: + print len(applied) + len(unapplied) + return + if options.short: if len(applied) > 5: applied = applied[-6:]