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

[Patch] Re: -F help text

From: Christian Stork <cstork_at_ics.uci.edu>
Date: 2005-09-23 21:28:23 CEST

On Sun, Sep 18, 2005 at 01:38:45PM +0100, Max Bowsher wrote:
> Christian Stork wrote:
> >'svn help ci' says
> >...
> > -m [--message] arg : specify commit message ARG
> > -F [--file] arg : read data from file ARG
> > ^^^^

> >Why "data" and not the more specific "commit message"?

> Because our CLI option handling framework is currently incapable of showing
> different help messages depending on the subcommand involved, and -F is
> used for both "svn commit -F commit_message_file", and "svn propset -F
> property_value_file".
> Hence the vague "data".

> Yes, this is a bit silly - but no one has yet got around to improving the
> code.

This is 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 Fri Sep 23 21:31:24 2005

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.