X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/850c3a89476ba8608b2deeba109fa7def2607655..a0ce5562122f6536329de1dc4f3e460032e02cca:/stgit/commands/files.py diff --git a/stgit/commands/files.py b/stgit/commands/files.py index d240872..318a4a3 100644 --- a/stgit/commands/files.py +++ b/stgit/commands/files.py @@ -17,32 +17,30 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ import sys, os -from optparse import OptionParser, make_option - +from stgit.argparse import opt from stgit.commands.common import * from stgit.utils import * from stgit.out import * -from stgit import stack, git - - -help = 'show the files modified by a patch (or the current patch)' -usage = """%prog [options] [[:]] +from stgit import argparse, stack, git +help = 'Show the files modified by a patch (or the current patch)' +kind = 'patch' +usage = ['[options] [[:]]'] +description = """ List the files modified by the given patch (defaulting to the current one). Passing the '--stat' option shows the diff statistics for the given patch. Note that this command doesn't show the files modified in the working tree and not yet included in the patch by a 'refresh' command. Use the 'diff' or 'status' commands for these files.""" -directory = DirectoryHasRepository() -options = [make_option('-s', '--stat', - help = 'show the diff stat', - action = 'store_true'), - make_option('--bare', - help = 'bare file names (useful for scripting)', - action = 'store_true') - ] + make_diff_opts_option() +options = [ + opt('-s', '--stat', action = 'store_true', + short = 'Show the diffstat'), + opt('--bare', action = 'store_true', + short = 'Bare file names (useful for scripting)'), + ] + argparse.diff_opts_option() +directory = DirectoryHasRepository() def func(parser, options, args): """Show the files modified by a patch (or the current patch)