diff options
author | sbz <sbz@FreeBSD.org> | 2012-08-30 18:23:01 +0800 |
---|---|---|
committer | sbz <sbz@FreeBSD.org> | 2012-08-30 18:23:01 +0800 |
commit | 19be475a58805f614bd68ed6f503d3836a03708c (patch) | |
tree | a48e0d220f4cce8eed0be99c9d6e3d1a3efa1cf5 | |
parent | 0c6c0e4d70288f1f170cf6e049da183f99567759 (diff) | |
download | freebsd-ports-gnome-19be475a58805f614bd68ed6f503d3836a03708c.tar.gz freebsd-ports-gnome-19be475a58805f614bd68ed6f503d3836a03708c.tar.zst freebsd-ports-gnome-19be475a58805f614bd68ed6f503d3836a03708c.zip |
- Fix documentation
Submitted by: culot, gahr
-rw-r--r-- | Tools/scripts/README | 2 | ||||
-rw-r--r-- | Tools/scripts/README.getpatch | 42 | ||||
-rwxr-xr-x | Tools/scripts/getpatch | 10 |
3 files changed, 27 insertions, 27 deletions
diff --git a/Tools/scripts/README b/Tools/scripts/README index 293450719e2e..23ce3c7ac200 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -24,7 +24,7 @@ distclean - compare md5 sums of distfiles in ports/distfiles with currently unmatched entries explicit_lib_depends.sh - shows the current explicit dependency list of libs for a given installed port -getpatch - downloads patch attachments on Bug Tracking Systems +getpatch - downloads patch attachments from a Bug Tracking Systems getpr - downloads a problem report from GNATS and attempts to extract the patch, shar, uuencoded file from it. this probably needs to be checked for potential security problems. diff --git a/Tools/scripts/README.getpatch b/Tools/scripts/README.getpatch index ed84cc19dae6..e601e1bfb4f9 100644 --- a/Tools/scripts/README.getpatch +++ b/Tools/scripts/README.getpatch @@ -1,37 +1,39 @@ GETPATCH(1) FreeBSD General Commands Manual GETPATCH(1) NAME - getpatch - An utility to download patch attachments on Bug Tracking Systems + getpatch - A utility to download patch attachments on Bug Tracking Systems SYNOPSIS getpatch [-h] [--mode gnats|bz] [--last] [--stdout] <pr-id> DESCRIPTION - getpatch is an utility to download patch attachments on Bug Tracking - Systems such Gnats and Bugzilla. It currently supports retrieving multiple + 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. - Its written in python witout any extra dependencies. Compare to getpr - utility it does web scrapping on BTS web interface in order to retrieve - patchs attached. + It's written in python witout 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 + -h Prints a multi-line help message and exits. - --mode Specify BTS mode. Supported are "gnats" or "bz". + --mode Specifies the BTS. Currently "gnats" and "bz" are. + supported. - --last Only retrieve last iteration patch attached. + --last Only retrieves the latest iteration of a patch. - --stdout Output patch to stdout file descriptor. + --stdout Dumps the patch to stdout file descriptor. - Options can be used after or before the <pr-id> on the command line. + Options can be used after or before the <pr-id> argument on the command line. FILES ${PORTSDIR}/Tools/scripts/getpatch EXAMPLES - Retrieve all patchs attached on pr ports/166692 on a Gnats BTS: + Retrieve all patches attached to PR ports/166692 from a Gnats BTS: getpatch --mode gnats ports/166692 @@ -39,21 +41,21 @@ EXAMPLES getpatch 166692 - Gnats is the default mode and category isn't mandatory. + Gnats is the default BTS and category isn't mandatory. - Retrieve all patchs on a Bugzilla BTS: + Retrieve all patches attached to PR ports/166692 from a Bugzilla BTS: getpatch --mode bz ports/166692 - Retrieve only last iteration of the patch: + Retrieve only the latest iteration of the patch: getpatch --last ports/166692 - Retrieve patch on standard output + Retrieve a patch on dump it to standard output getpatch --stdout ports/166692 - On fly patching can be done in a port directory this way: + From inside a port's directory, patching on the fly can be done as follows: For a diff @@ -65,16 +67,16 @@ EXAMPLES cd ${PORTSDIR}/category/port sh <(getpatch 166692 --stdout) - Redirection <() depends on the shell you're using, validated with zsh and bash. + 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 output. + getpatch exits 0 on success or 1 if a help message was displayed. SEE ALSO getpr, prpatch AUTHORS - Sofian Brabez <sbz@freebsd.org> + Sofian Brabez <sbz@FreeBSD.org> BUGS If you're using getpatch and you encounter a bug or want an improvement diff --git a/Tools/scripts/getpatch b/Tools/scripts/getpatch index c7ad347cd57d..74ebf83abf4a 100755 --- a/Tools/scripts/getpatch +++ b/Tools/scripts/getpatch @@ -158,16 +158,16 @@ class BzGetPatch(GetPatch): def main(): parser = argparse.ArgumentParser( - description='Gets patch attachments from Bug Tracking System' + description='Gets patch attachments from a Bug Tracking System' ) parser.add_argument('pr', metavar='pr', type=str, nargs=1, help='Pr id number') parser.add_argument('--mode', type=str, choices=['gnats','bz'], default='gnats', help='available modes to retrieve patch') parser.add_argument('--last', action='store_true', - help='only retrieve last iteration of the patch') + help='only retrieve the latest iteration of a patch') parser.add_argument('--stdout', action='store_true', - help='output patch on stdout') + help='dump patch on stdout') if len(sys.argv) == 1: parser.print_help() @@ -179,13 +179,11 @@ def main(): pr = str(args.pr[0]) if '/' in pr and pr is not None: - category = pr.split('/')[0] - pr = pr.split('/')[1] + category, pr = pr.split('/') Clazz = globals()['%sGetPatch' % args.mode.capitalize()] gp = Clazz(pr, category) gp.get(only_last=args.last, output_stdout=args.stdout) if __name__ == '__main__': - main() |