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

Re: svn usage text

From: Bruce Korb <bkorb_at_cruzio.com>
Date: 2000-10-14 17:06:37 CEST

Karl Fogel wrote:
> Bruce, et al., don't know if you intended that just to be a simple
> example of using AutoOpt, or also an start on the actual Subversion
> options. If the latter, then:

I intended it as a simple example of using autoopts.
The "final solution" I would expect to behave much as you
described. In fact, the usage text was intended to show
just that. Here it is with the ``-x'' flag dropped:

> $ autogen clopts.def
> $ gcc -DTEST_SVN_OPTS -o clopts clopts.c -lopts
> $ ./clopts -?
> svn - Subversion - Ver. Sat Oct 14 07:53:44 PDT 2000
> USAGE: clopts [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
> <command> [ <cmd-specific-opts> ... ] [ <cmd-args> ]
> Flg Arg Option-Name Description
> YES xml-file XML Interfacing file
> -d YES target-dir destination directory
> -s YES ancestor-path source directory
> -r Num revision Target revision
> -f no force force a deletion
> -v opt version Output version information and exit
> -? no help Display usage information and exit
> -! no more-help Extended usage information passed thru pager
>
> Options may be specified by doubled hyphens and their name
> or by a single hyphen and the flag character/option value.
>
> WHERE: ``<command>'' may be any of:
>
> checkout update add delete commit
>
> or their aliases. For specific help on one of these commands,
> use ``--help'' as a command specific option.

> The option parsing for the client is going to require a lot of thought
> to get right (or so I am expecting), so don't be shocked if you find
> yourselves spending a surprising amount of time and discussion on it.

I agree. Interfaces have to be carefully considered.
And, in that consideration, several of the above options
need to be moved to the cmd-specific-opts definitions anyway.

If there is no objection, I will advance the proposal in my
next missive, where it will not be cluttered up with orthoginal
disussion.

Jim Blandy wrote:
>
> Golly. Is argument parsing so challenging that we need to introduce a
> full-rebuild-time dependency on yet another tool?

It is a nuisance if you want:

1. automated usage support
2. environment variables
3. multiple rc files
4. an automated man page
5. an automated ``invoking'' section for the info doc
6. automated support for other things. See:
    http://AutoGen.SourceForge.net/autoopts

Years ago I hated not having these things available
for my little "quickie" programs and I hated keeping everything
up-to-date. So, this has evolved over a period of about 8 years.

Also, I'm not insisting. Just proposing. :-)
Received on Sat Oct 21 14:36:11 2006

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