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

[Patch] subcommand-specific option descriptors [Was: "svn add" acts non-recursively without -N given]

From: Christian Stork <cstork_at_ics.uci.edu>
Date: 2006-02-15 20:26:46 CET

On Wed, Feb 15, 2006 at 10:54:07AM -0600, Ben Collins-Sussman wrote:
> On 2/15/06, Molle Bestefich <molle.bestefich@gmail.com> wrote:

> > "force operation to run" is like saying that "force" means "force"...

> The problem is that we have a bunch of global flags which can mean
> slightly different things when used with different subcommands. But
> the way our commandline client is designed... well, it only allows a
> single generic description of each global flag. If you'd like to
> redesign that bit of code, it would be nice to have context-specific
> descriptions of the flags. :-)

I send the attached patch to the list a while back to get the ball
rolling on this. Back then I was concerned with documenting the
subcommand-specific meanings of -F.

The only response I got was from Max saying that he'd put it on his todo
list.

This was my first real patch so please be gentle. ;-)

[[[

Add subcommand-specific option descriptors in a new field in
svn_cl__cmd_table entries and use them for more sensible help
messages.
To illustrate, entries for -m and -F are added.

* trunk/subversion/include/svn_opt.h (svn_opt_subcommand_desc_t): Add
options_table field for subcommand-specific option info.

* trunk/subversion/libsvn_subr/opt.c (print_command_info): Print
subcommand-specific option descriptions.

* trunk/subversion/clients/cmdline/main.c (svn_cl__cmd_table): Fill
subcommand-specific options_table entries. For now, I only considered
the -m and -F options.

]]]

I know that changing the public type svn_opt_subcommand_desc_t needs a
new name, etc. Let's discuss interface revving if the design of this
patch is accepted.

Note that this patch is duplicating a little bit of information in the
new entries, which might not be a problem since this information
(option name and has_arg flag) should be very static.

Please check if the description for the lock command are correct. I
just assumed so.

Patch against trunk attached. It passes the test suite.

-- 
Chris Stork   <>  Support eff.org!  <>   http://www.ics.uci.edu/~cstork/
OpenPGP fingerprint:  B08B 602C C806 C492 D069  021E 41F3 8C8D 50F9 CA2F


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Wed Feb 15 20:27:36 2006

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.