[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svnperms.py Print usage and exit when invoked without args

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2003-09-10 04:41:08 CEST

Jim Sokoloff wrote:
> LOG MESSAGE:
>
> Print usage and exit when invoked with no parameters
>
> Index: svnperms.py
> ===================================================================
> --- svnperms.py (revision 7021)
> +++ svnperms.py (working copy)
> @@ -249,6 +249,11 @@
> obj.transaction = None
> obj.revision = None
> obj.author = None
> +
> + if (len(opts) == 0):
> + sys.stdout.write(USAGE)
> + sys.exit(-1)
> +
> for opt, val in opts:
> if opt == "-f":
> obj.filename = val

Thanks for the patch, Jim. I committed an effectively similar change in
r7028 which reports missing-but-required options back to the user in
addition to printing usage, a steal at the cost of only a couple more
CPU cycles.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 10 04:42:23 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.