freebsd-ports/Tools/scripts/README.getpatch
Sofian Brabez f88bb82d5f - Use literal instead of constructor to avoid CALL_FUNCTION bytecode instruction
- Add add_patch method [1]
- Update README wording and fix typo

PR:		ports/175984 [1]
Submitted by:	Christoph Mallon <christoph.mallon at gmx.de>
2013-05-09 22:02:15 +00:00

85 lines
2.3 KiB
Text

GETPATCH(1) FreeBSD General Commands Manual GETPATCH(1)
NAME
getpatch - Utility to download patch attachments on Bug Tracking Systems
SYNOPSIS
getpatch [-h] [--mode gnats|bz] [--last] [--stdout] <pr-id>
DESCRIPTION
getpatch is a utility to download patch attachments from Bug Tracking
Systems such Gnats and Bugzilla. It supports retrieving multiple
attachments from the command line.
It's written in python without any extra dependencies. In addition to the
functionalities offered by other similar tools suchs as getpr, it does web
scrapping on the BTS web interface in order to retrieve the patches attached
to PR.
The following command line options are supported:
-h Prints a multi-line help message and exits.
--mode Specifies the BTS. Currently "gnats" and "bz" are
supported.
--last Only retrieves the latest iteration of a patch.
--stdout Dumps the patch to stdout file descriptor.
Options can be used after or before the <pr-id> argument on the command line.
FILES
${PORTSDIR}/Tools/scripts/getpatch
EXAMPLES
Retrieve all patches attached to PR ports/166692 from Gnats BTS:
getpatch --mode gnats ports/166692
or
getpatch 166692
Gnats is the default BTS and category isn't mandatory.
Retrieve all patches attached to PR ports/166692 from Bugzilla BTS:
getpatch --mode bz ports/166692
Retrieve only the latest iteration of the patch:
getpatch --last ports/166692
Retrieve a patch and dump it to standard output
getpatch --stdout ports/166692
From inside a port's directory, patching on the fly can be done as follows:
For a diff
cd ${PORTSDIR}/category/port
patch -p0 < <(getpatch 166692 --stdout)
For a shar
cd ${PORTSDIR}/category/port
sh <(getpatch 166692 --stdout)
Redirection <() depends on the shell you're using; validated with zsh and bash.
DIAGNOSTICS
getpatch exits 0 on success or 1 if a help message was displayed.
SEE ALSO
getpr
AUTHORS
Sofian Brabez <sbz@FreeBSD.org>
BUGS
If you're using getpatch and you encounter a bug or want an improvement
don't hesitate to mail me.
FreeBSD 14 August 2012 FreeBSD