Looks good, +1.
I might've used an error message more like "Specify paths to unlock", but
what's there is fine too.
On Tue, 11 Dec 2007, C. Michael Pilato wrote:
> This bug just frustrated some CollabNet Operations folk who made the wrong
> assumption about what 'svnadmin rmlocks' does. I'm providing a patch
> because I'm off in a branch doing other things at the moment. I believe
> this fix should go into trunk and be backported to 1.4.x.
> C. Michael Pilato <email@example.com>
> CollabNet <> www.collab.net <> Distributed Development On Demand
> Make 'svnadmin rmlocks' complain if no paths-to-unlock were provided
> (as is required by the displayed usage). This should alleviated
> future occurrences of folks believing this subcommand will simply
> remove all the locks in the repository.
> * subversion/svnadmin/main.c
> (subcommand_rmlocks): Throw an error if there were no paths to
> unlock provided.
> Index: subversion/svnadmin/main.c
> --- subversion/svnadmin/main.c (revision 28402)
> +++ subversion/svnadmin/main.c (working copy)
> @@ -1191,7 +1191,12 @@
> /* Parse out any options. */
> SVN_ERR(svn_opt_parse_all_args(&args, os, pool));
> - /* All the rest of the arguments are lock names. */
> + /* Our usage requires at least one FS path. */
> + if (args->nelts == 0)
> + return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0,
> + _("No paths to unlock provided"));
> + /* All the rest of the arguments are paths from which to remove locks. */
> for (i = 0; i < args->nelts; i++)
> const char *lock_path = APR_ARRAY_IDX(args, i, const char *);
Received on Tue Dec 11 21:49:03 2007
- application/pgp-signature attachment: stored