-def usage():
- sys.stderr.write("Usage: %s <action> [options]\n\n" % \
- (os.path.basename(sys.argv[0])))
- sys.stderr.write("Where <action> is one of:\n")
- sys.stderr.write(
-""" apply <ID> : Apply a patch (in the current dir, using -p1)
- git-am <ID> : Apply a patch to current git branch using "git am"
- get <ID> : Download a patch and save it locally
- info <ID> : Display patchwork info about a given patch ID
- projects : List all projects
- states : Show list of potential patch states
- list [str] : List patches, using the optional filters specified
- below and an optional substring to search for patches
- by name
- search [str] : Same as 'list'
- view <ID> : View a patch
- update [-s state] [-c commit-ref] <ID>
- : Update patch\n""")
- sys.stderr.write("""\nFilter options for 'list' and 'search':
- -s <state> : Filter by patch state (e.g., 'New', 'Accepted', etc.)
- -p <project> : Filter by project name (see 'projects' for list)
- -w <who> : Filter by submitter (name, e-mail substring search)
- -d <who> : Filter by delegate (name, e-mail substring search)
- -n <max #> : Restrict number of results
- -m <messageid>: Filter by Message-Id\n""")
- sys.stderr.write("""\nActions that take an ID argument can also be \
-invoked with:
- -h <hash> : Lookup by patch hash\n""")
- sys.exit(1)
-