X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/d4356ac6143757131b58c95ca5c6a7b386cc6087..594aa463c1852f77b89bdce853da4e7052d7cdd2:/stgit/commands/patches.py?ds=inline diff --git a/stgit/commands/patches.py b/stgit/commands/patches.py index 140699d..54fac21 100644 --- a/stgit/commands/patches.py +++ b/stgit/commands/patches.py @@ -16,29 +16,30 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ import sys, os -from optparse import OptionParser, make_option from pydoc import pager - +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 applied patches modifying a file' -usage = """%prog [options] [] +from stgit import argparse, stack, git +help = 'Show the applied patches modifying a file' +kind = 'stack' +usage = ['[options] []'] +description = """ Show the applied patches modifying the given files. Without arguments, it shows the patches affected by the local tree modifications. The '--diff' option also lists the patch log and the diff for the given files.""" -directory = DirectoryHasRepository() -options = [make_option('-d', '--diff', - help = 'show the diff for the given files', - action = 'store_true'), - make_option('-b', '--branch', - help = 'use BRANCH instead of the default one')] +args = [argparse.known_files] +options = [ + opt('-d', '--diff', action = 'store_true', + short = 'Show the diff for the given files'), + opt('-b', '--branch', args = [argparse.stg_branches], + short = 'Use BRANCH instead of the default branch')] + +directory = DirectoryHasRepository(log = False) diff_tmpl = \ '-------------------------------------------------------------------------------\n' \