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

Re: [PATCH] svnversion - current working directory

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-05-19 01:51:11 CEST

On Wed, 2005-18-05 at 17:18 -0500, C. Michael Pilato wrote:
    8< snip >8
> > - _("usage: svnversion [OPTIONS] WC_PATH [TRAIL_URL]\n\n"
> > + _("usage: svnversion [OPTIONS] [WC_PATH] [TRAIL_URL]\n\n"
>
> I think this is too ambiguous, now. Does 'svnversion foo' now mean
> WC_PATH == FOO, or TRAIL_URL == FOO?
>
> You might have to either break it into two lines:
>
> usage: svnversion [OPTIONS]
> svnversion [OPTIONS] WC_PATH [TRAIL_URL]
>
> Or teach the code to use the likes of svn_path_is_url() to determine,
> in the 1-argument case, if that one argument was a working copy path
> or a URL.

Would this be the suggested way? Is that more complexity for a simple
piece of code?

> I wish I'd noticed the TRAIL_URL before ... the UI side-effects have
> me less excited about this change.

I see what you mean. Yes, WC_PATH *must* be declared in order for
TRAIL_URL to engage. The location of the argument determines its
meaning.

Perhaps this:
    usage: svnversion [OPTIONS] [ WC_PATH [TRAIL_URL] ]

Which is a more compact version of your two line example above.
Or would this be too confusing for users? :-D <-- Big Toothy Grin

Could we leave the usage syntax as is while including the note at the
bottom of the verbose help message with this new line:

" If invoked without arguments, WC_PATH will be the current directory."

Cheers,
Chris

-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
19:32:27 up 7 days, 22:01, 1 user, load average: 0.04, 0.03, 0.01 
http://www.gnu.org/philosophy/no-word-attachments.html

Received on Thu May 19 01:51:38 2005

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