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

Re: svn commit: r29544 - in trunk/subversion: libsvn_subr svn

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 26 Feb 2008 16:42:22 -0500

David Glasser wrote:
> On Fri, Feb 22, 2008 at 12:52 PM, <cmpilato_at_tigris.org> wrote:
>> Author: cmpilato
>> Date: Fri Feb 22 12:52:02 2008
>> New Revision: 29544
>> Log:
>> Poor man's long-option aliasing, introducing --cl as an alias for
>> --changelist.
>> * subversion/svn/main.c
>> (svn_cl__options): Add --cl as a long-opt alias, and note this alias
>> in --changelist's description.
>> * subversion/libsvn_subr/opt.c
>> (print_command_info, print_command_info2): Don't print options with
>> NULL descriptions.
> Hmm, this man is a little too poor for me. If I'm looking for what an
> option does, then I'm looking in the left column with everything else,
> and am unlikely to notice the one option name that's in the right
> column.
> Possible solutions, from most to least hacky:
> - Remove some of the spaces from the second line, so it looks like
> --changelist ARG : operate only on members of changelist ARG
> [alias: --cl ARG]

Honestly, I think this makes the UI worse.

A newbie to this functionality isn't going to be looking *only* on the
left-hand side -- he'll be looking for something vaguely changelist related
in the left, and then confirm his find (of --changelist) by reading the
description on the right, where he'll see the alias text. I don't
personally feel the need to change the way things are, especially as this
isn't some kind of correctness matter.

> - Make an opt_changelist_abbr like
> {"cl", opt_changelist_abbr, 1, "same as --changelist ARG"}
> and
> #define CHANGELIST_OPTS opt_changelist, _optchangelist_abbr
> and
> s/opt_changelist/CHANGELIST_OPTS/ inside the subcommand table
> and
> make main treat the values as the same.

As long as the options lists maintain their sort ordering on output, then
this is fine with me. I wouldn't want to see the likes of:

    --changelist ARG ...
    --depth ARG ...
    --revision (-r) ARG ...
    --quiet (-q) ...
    --cl ARG ...
    --force ...

> - Throw out apr_getopt_t and rewrite everything to support long option
> aliases (ha).

Um. No.

> - Add long option aliases to APR.

Fine (but it won't help us in 1.5).

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-02-26 22:42:34 CET

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.