X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fcee87cf868f18a3d684c3ba71232574f92c7b11..bae29dddde41058567a5ef9b44c160dd76b1c025:/stgit/commands/series.py diff --git a/stgit/commands/series.py b/stgit/commands/series.py index 8559d25..032b89e 100644 --- a/stgit/commands/series.py +++ b/stgit/commands/series.py @@ -25,9 +25,18 @@ from stgit import stack, git help = 'print the patch series' -usage = '%prog' +usage = """%prog [options] -options = [] +Show all the patches in the series. The applied patches are prefixed +with a '+' and the unapplied ones with a '-'. The current patch is +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('-e', '--empty', + help = 'check whether patches are empty ' + '(much slower)', + action = 'store_true') ] def func(parser, options, args): @@ -39,19 +48,19 @@ def func(parser, options, args): applied = crt_series.get_applied() if len(applied) > 0: for p in applied [0:-1]: - if crt_series.empty_patch(p): + if options.empty and crt_series.empty_patch(p): print '0', p else: print '+', p p = applied[-1] - if crt_series.empty_patch(p): + if options.empty and crt_series.empty_patch(p): print '0>%s' % p else: print '> %s' % p for p in crt_series.get_unapplied(): - if crt_series.empty_patch(p): + if options.empty and crt_series.empty_patch(p): print '0', p else: print '-', p