You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Edmund Wong <ed...@kdtc.net> on 2009/07/11 06:57:02 UTC

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Olivier FAURAX wrote:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3436
>                  Issue #|3436
>                  Summary|Short option for --ignore-externals (-i ?)
>                Component|subversion
>                  Version|all
>                 Platform|All
>                      URL|
>               OS/Version|All
>                   Status|NEW
>        Status whiteboard|
>                 Keywords|
>               Resolution|
>               Issue type|ENHANCEMENT
>                 Priority|P5
>             Subcomponent|cmdline client
>              Assigned to|issues@subversion
>              Reported by|ofaurax_neotion
> 
> 
> 
> 
> 
> 
> ------- Additional comments from ofaurax_neotion@tigris.org Wed Jun 24 01:31:46 -0700 2009 -------
> Hello,
> 
> When working with big or lots of external repositories, "svn up" or "svn st" are
> much more fast with "--ignore-externals".
> However, the option is longer than the command itself (!), which is boring when
> working in command line.
> 
> Is it possible to add a short option for --ignore-externals, for example -i or -I ?
> 

Does anyone have any objections about this issue?  If not, how about
objections about me taking this?  If not, is there policy as to which
character to use?  (My tendency is towards '-i'.)


Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2370618

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Peter Samuelson <pe...@p12n.org>.
[Edmund Wong]
> I need to re-read the code, but (and pardon my ignorance) wouldn't a
> multi-character short option will require recoding the
> apr_getopt_option_t struct to allow a 'string' and not a char?

You are correct.  In the --changelist case, the shorter version is
--cl, not -cl.  --cl is a long option, not a short option.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Edmund Wong <ed...@kdtc.net>.
Blair Zajac wrote:
>>
>> Do you have any involvement or perspective on this particular issue
>> yourself?
> 
> Is --ignore-externals being used on the command line much or via scripting the 
> command line client?
> 
> I'm of the mind not to introduce a short option for --ignore-externals, not a 
> short one letter one.
> 

I need to re-read the code, but (and pardon my ignorance) wouldn't a
multi-character short option will require recoding the
apr_getopt_option_t struct to allow a 'string' and not a char?
(Of course, this is a precursory scan on the structure and there
are probably other options available.)

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371135

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Blair Zajac <bl...@orcaware.com>.
Julian Foad wrote:
> Edmund Wong wrote:
>> Olivier FAURAX wrote:
>>> http://subversion.tigris.org/issues/show_bug.cgi?id=3436
>>>                  Issue #|3436
>>>                  Summary|Short option for --ignore-externals (-i ?)
>>> Is it possible to add a short option for --ignore-externals, for
>> example -i or -I ?
>>
>> Does anyone have any objections about this issue?  If not, how about
>> objections about me taking this?  If not, is there policy as to which
>> character to use?  (My tendency is towards '-i'.)
> 
> I would very much encourage you to take an issue such as this one, if
> it's a development that we want. And I see that this one looks like a
> good one to choose for an easy task.
> 
> However, as I expect you are aware, an issue being in the issue tracker
> just means that someone, anyone, put it there; it doesn't mean there is
> any kind of consensus on it.
> 
> We have always been very cautious of using up single-letter options,
> because there are not enough of them available for all the meanings we
> want. There are several options that we might want to abbreviate to '-i'
> or '-I':
> 
> --no-ignores
> --non-interactive
> --ignore-externals
> --ignore-ancestry
> 
> and we might well add more in 1.7, 1.8, 1.9.
> 
> It could well be that --ignore-externals is the most commonly used by
> far, in which case we might want to add a short alias for it. But before
> we jump to any conclusions, we should also ask (the original poster, and
> ourselves) whether the problem would be better solved in a different
> way, perhaps by making "ignore-externals" a configurable option in
> ~/subversion/config and having an inverse option (--with-externals ?)
> available to override it if it only rarely needs to be overridden.
> 
> Looking at the list of options we have, it seems to me that it would
> make sense for many of them to have a customisable default in the config
> file, and both positive and negative forms available on the command
> line. 
> 
> We also have a precedent of abbreviating a long option to a shorter
> "long" option: --changelist is also --cl. Maybe there's a good "long"
> abbreviation for --ignore-externals.
> 
> Questions like this are one reason why an issue should have been
> discussed on the mailing list before it was filed.
> 
> Do you have any involvement or perspective on this particular issue
> yourself?

Is --ignore-externals being used on the command line much or via scripting the 
command line client?

I'm of the mind not to introduce a short option for --ignore-externals, not a 
short one letter one.

Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2370981

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Edmund Wong <ed...@kdtc.net>.
Julian Foad wrote:
> I would very much encourage you to take an issue such as this one, if
> it's a development that we want. And I see that this one looks like a
> good one to choose for an easy task.
> 
> However, as I expect you are aware, an issue being in the issue tracker
> just means that someone, anyone, put it there; it doesn't mean there is
> any kind of consensus on it.

Yes, which is why I made the post just in case any veteran devs
have issues (pardon the pun) with doing anything.  I have 'hacked'
up a patch, but since I'm still learning the ropes here, I figured
it would be a good idea to hold it off and make sure no one
objects to having a short cut for --ignore-externals.

> 
> We have always been very cautious of using up single-letter options,
> because there are not enough of them available for all the meanings we
> want. There are several options that we might want to abbreviate to '-i'
> or '-I':
> 
> --no-ignores
> --non-interactive
> --ignore-externals
> --ignore-ancestry
> 
> and we might well add more in 1.7, 1.8, 1.9.

True, and I definitely understand the hesitation with assigning a
shortcut.

> 
> It could well be that --ignore-externals is the most commonly used by
> far, in which case we might want to add a short alias for it. But before
> we jump to any conclusions, we should also ask (the original poster, and
> ourselves) whether the problem would be better solved in a different
> way, perhaps by making "ignore-externals" a configurable option in
> ~/subversion/config and having an inverse option (--with-externals ?)
> available to override it if it only rarely needs to be overridden.
> 
> Looking at the list of options we have, it seems to me that it would
> make sense for many of them to have a customisable default in the config
> file, and both positive and negative forms available on the command
> line. 
> 
> We also have a precedent of abbreviating a long option to a shorter
> "long" option: --changelist is also --cl. Maybe there's a good "long"
> abbreviation for --ignore-externals.

That's another good option. i.e.  -ie?  Sure it is less than the
current length, but it also complicates matters since short cuts
(as far as I know) are one letter.  Introducing a 2-letter string
into the mix might break the option structure.  (I think it does
break this.)

> Questions like this are one reason why an issue should have been
> discussed on the mailing list before it was filed.
> 
> Do you have any involvement or perspective on this particular issue
> yourself?
> 

I don't have much of any involvement in this issue since I don't
use --ignore-externals.  I guess my enthusiasm for doing 'easy'
fixes overcame my wisdom in choosing the right issues.  Reading
your comments and Blair's,  I think the Issue-poster should
really have discussed it here.   But I guess this is the same
thing, it's just that I was the one who started it and not
him.  :)


Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371130

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Julian Foad wrote on Mon, 27 Jul 2009 at 17:38 +0100:
> >   Or am I just being stupid about this and the simple solution is
> > to take the simplest contraction of the long option and make
> > it an alias of the long option.   If, in the near future,
> > a similar option is proposed, we extend that with another
> > character?
> 
> Not sure exactly what you mean by "we extend that". Yes, we can just
> choose something like "--ie" now. If, in the near or far future, we add
> a new option such as "--ignore-existing" and want a shortish alias for
> it, then we can't choose "--ie" but we will have plenty of "room" to
> choose another reasonable abbreviation for the new option, such as
> "--ix" or "--iexist".
> 

Idea: if we start introducing more short names, we can try having 
prefixes/suffixes/words common to multiple options (e.g., 'ignore', 
'prop') be abbreviated identically everywhere they appear.

e.g., if we have --ignore-externals and --ignore-symlinks, we might
abbreviate them as --I-externals and --I-symlinks (or even --I-sl, and
then --no-symlinks might become --no-sl, etc.).

Point: less things to remember.

> So, for now, I would suggest "--ie".
> 
> - Julian
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376049
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376161

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Edmund Wong <ed...@belfordhk.com>.
Julian Foad wrote:
> Edmund Wong wrote:
> 
> I think you're asking whether there is (or should be) a procedure or
> guidelines for choosing a short name. There is none.

Yes, That's what I was trying to ask.

> 
> My point is just that there is far more "name space" available in two-
> or three-letter "shortish" long option names than in single-letter
> option names, so we are less concerned about "using them up".
> 

I understand that the more characters available, the less concerned
about the namespace being used up.  But as Daniel pointed out another
method, is there a consensus as to the format of this new 'shortish'
long option (or longish short option)?  --ie or --iexist?

Thanks

Edmund
>>   Or am I just being stupid about this and the simple solution is
>> to take the simplest contraction of the long option and make
>> it an alias of the long option.   If, in the near future,
>> a similar option is proposed, we extend that with another
>> character?
> 
> Not sure exactly what you mean by "we extend that". Yes, we can just
> choose something like "--ie" now. If, in the near or far future, we add
> a new option such as "--ignore-existing" and want a shortish alias for
> it, then we can't choose "--ie" but we will have plenty of "room" to
> choose another reasonable abbreviation for the new option, such as
> "--ix" or "--iexist".
> 
> So, for now, I would suggest "--ie".
> 
> - Julian
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376049
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376205

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Julian Foad <ju...@btopenworld.com>.
Edmund Wong wrote:
> I understand it's simple to add a new long option but wouldn't
> that simply be a quick hack without the necessary considerations
> that (from what Julian pointed out) adding any new option (short or
> long) would require (for lack of a better word) a 'way' to
> tell anyone thinking of adding new options of how to go about
> this.  I got from Julian's post that while simple to implement,
> how do we go about in determining the option name?

I think you're asking whether there is (or should be) a procedure or
guidelines for choosing a short name. There is none.

My point is just that there is far more "name space" available in two-
or three-letter "shortish" long option names than in single-letter
option names, so we are less concerned about "using them up".

>   Or am I just being stupid about this and the simple solution is
> to take the simplest contraction of the long option and make
> it an alias of the long option.   If, in the near future,
> a similar option is proposed, we extend that with another
> character?

Not sure exactly what you mean by "we extend that". Yes, we can just
choose something like "--ie" now. If, in the near or far future, we add
a new option such as "--ignore-existing" and want a shortish alias for
it, then we can't choose "--ie" but we will have plenty of "room" to
choose another reasonable abbreviation for the new option, such as
"--ix" or "--iexist".

So, for now, I would suggest "--ie".

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2376049

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Edmund Wong <ed...@kdtc.net>.
Mark Phippard wrote:
>> I believe there is a potential gain if the short option was
>> changed from (int) to (char *) (but limited to 2 characters).
>> Priority wise, I know it's not up there.  It's an aesthetic
>> issue that shortens operators' typing; that's all (AFAIK).
>> But again, I might be short-sighted in terms of feasibility
>> and Subversion theory.
>>
>> Corrections greatly appreciated.
> 
> I do not understand why this is needed.  Why can't you simply create a
> new long option alias like: --iex or even --ie?  That is what was done
> with changelists.
> 

I'm just getting back into the swing of things after having a leave
of absence from Hong Kong.   I hope to get back into the proper
frame of mind with regards to these issues.

I understand it's simple to add a new long option but wouldn't
that simply be a quick hack without the necessary considerations
that (from what Julian pointed out) adding any new option (short or
long) would require (for lack of a better word) a 'way' to
tell anyone thinking of adding new options of how to go about
this.  I got from Julian's post that while simple to implement,
how do we go about in determining the option name?  Or am
I just being stupid about this and the simple solution is
to take the simplest contraction of the long option and make
it an alias of the long option.   If, in the near future,
a similar option is proposed, we extend that with another
character?

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2375739

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Mark Phippard <ma...@gmail.com>.
On Tue, Jul 14, 2009 at 6:24 AM, Edmund Wong<ed...@belfordhk.com> wrote:

> A 'better' way would be to increase it to a multi-character option,
> i.e. -cl.  But that will break the whole option set type,
> apr_getopt_option_t as confirmed by Peter Samuelson.  This would,
> as I felt before, require recoding apr_getopt_option_t to use
> char *opt, rather than the current 'int optch' in apr_getopt.h.
> Or better yet, copy the struct apr_getopt_option_t and extend it
> with a 'longer opt', i.e.  const char * optstr.  Then whatever
> accesses the old structure will need to be changed to access
> the new one.   The outcome of this?  A better option-set structure
> that can increase the option playground (so to speak).  So
> --ignore-externals can be -ie.  --ignore-something-else can be
> -ise.  Of course, a policy should be set to allow a decent set
> of options to be created instead of assigning short-options to
> every option available.   So in the short run, with the multi-char
> option, some/alot of code will need to be fixed.  Long run?
> A larger option field.  Heck, even if we limit it to just
> two characters, that's 26*26 possible options plus the punctation
> ones, i.e. -?.  Of course, some combinations would make no sense
> and probably can decrease that possible list to a manageable
> size.  Of course, fixing the # of characters to 2 is arbitrary.
> I could've said 3 or 4, but when does a short-option become
> a long option?    It would be silly to put -hlp to represent
> help (when -? or -h would've sufficed); again, as stated,
> some combinations make no sense/or are silly.
>
> I believe there is a potential gain if the short option was
> changed from (int) to (char *) (but limited to 2 characters).
> Priority wise, I know it's not up there.  It's an aesthetic
> issue that shortens operators' typing; that's all (AFAIK).
> But again, I might be short-sighted in terms of feasibility
> and Subversion theory.
>
> Corrections greatly appreciated.

I do not understand why this is needed.  Why can't you simply create a
new long option alias like: --iex or even --ie?  That is what was done
with changelists.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371227


Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Edmund Wong <ed...@belfordhk.com>.
Greg Stein wrote:
> On Mon, Jul 13, 2009 at 17:13, Julian Foad<ju...@btopenworld.com> wrote:
>> ...
>> It could well be that --ignore-externals is the most commonly used by
>> far, in which case we might want to add a short alias for it. But before
>> we jump to any conclusions, we should also ask (the original poster, and
>> ourselves) whether the problem would be better solved in a different
>> way, perhaps by making "ignore-externals" a configurable option in
>> ~/subversion/config and having an inverse option (--with-externals ?)
>> available to override it if it only rarely needs to be overridden.
> 
> Ugh. What if I set my config options different from yours? Will my svn
> behave in a subtle and hard-to-understand different way from yours?

Well, either way,  it makes troubleshooting user issues a little bit
more difficult when it comes to environment options or config variable
options.

The following are my $0.02 thoughts.  I don't pretend to know
everything here so I will most likely err in terms of coding and theory;
  but, this gives me a good opportunity to learn the ropes.

I would think that it'd be simple (it actually is) to do a short option
for --ignore-externals.  But that would limit the potential to expand
the option set.  Say, a more important option than --ignore-externals
is created.  Then obviously the short option (say -i) that was assigned
to --ignore-externals is removed and reassigned to the new important
option.  That would break a few scripts that depend on -i being equal
to --ignore-externals.  Then what happens to --ignore-externals?  Should
a short option be assigned to it to replace the removed one?  Either
yes or no will bring us to the same spot; what new short option should
we use(for yes) or wouldn't the no decision have invalidated this issue?
(thus having wasted whoever's time in creating the short option for
--ignore-externals).  ["wasted whoever's time" is a term I'm not
particularly fond of, but for lack of a better phrase, that's the
only one I can think of.  In actual fact, it wouldn't be a waste
of time.  Just a learning experience.]

A 'better' way would be to increase it to a multi-character option,
i.e. -cl.  But that will break the whole option set type,
apr_getopt_option_t as confirmed by Peter Samuelson.  This would,
as I felt before, require recoding apr_getopt_option_t to use
char *opt, rather than the current 'int optch' in apr_getopt.h.
Or better yet, copy the struct apr_getopt_option_t and extend it
with a 'longer opt', i.e.  const char * optstr.  Then whatever
accesses the old structure will need to be changed to access
the new one.   The outcome of this?  A better option-set structure
that can increase the option playground (so to speak).  So
--ignore-externals can be -ie.  --ignore-something-else can be
-ise.  Of course, a policy should be set to allow a decent set
of options to be created instead of assigning short-options to
every option available.   So in the short run, with the multi-char
option, some/alot of code will need to be fixed.  Long run?
A larger option field.  Heck, even if we limit it to just
two characters, that's 26*26 possible options plus the punctation
ones, i.e. -?.  Of course, some combinations would make no sense
and probably can decrease that possible list to a manageable
size.  Of course, fixing the # of characters to 2 is arbitrary.
I could've said 3 or 4, but when does a short-option become
a long option?    It would be silly to put -hlp to represent
help (when -? or -h would've sufficed); again, as stated,
some combinations make no sense/or are silly.

I believe there is a potential gain if the short option was
changed from (int) to (char *) (but limited to 2 characters).
Priority wise, I know it's not up there.  It's an aesthetic
issue that shortens operators' typing; that's all (AFAIK).
But again, I might be short-sighted in terms of feasibility
and Subversion theory.

Corrections greatly appreciated.

Edmund

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371206

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Greg Stein <gs...@gmail.com>.
On Mon, Jul 13, 2009 at 17:13, Julian Foad<ju...@btopenworld.com> wrote:
>...
> It could well be that --ignore-externals is the most commonly used by
> far, in which case we might want to add a short alias for it. But before
> we jump to any conclusions, we should also ask (the original poster, and
> ourselves) whether the problem would be better solved in a different
> way, perhaps by making "ignore-externals" a configurable option in
> ~/subversion/config and having an inverse option (--with-externals ?)
> available to override it if it only rarely needs to be overridden.

Ugh. What if I set my config options different from yours? Will my svn
behave in a subtle and hard-to-understand different way from yours?

This is why we despise environment variables. Config variables are about as bad.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371198

Re: [Issue 3436] New - Short option for --ignore-externals (-i ?)

Posted by Julian Foad <ju...@btopenworld.com>.
Edmund Wong wrote:
> Olivier FAURAX wrote:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=3436
> >                  Issue #|3436
> >                  Summary|Short option for --ignore-externals (-i ?)
> > Is it possible to add a short option for --ignore-externals, for
> example -i or -I ?
> 
> Does anyone have any objections about this issue?  If not, how about
> objections about me taking this?  If not, is there policy as to which
> character to use?  (My tendency is towards '-i'.)

I would very much encourage you to take an issue such as this one, if
it's a development that we want. And I see that this one looks like a
good one to choose for an easy task.

However, as I expect you are aware, an issue being in the issue tracker
just means that someone, anyone, put it there; it doesn't mean there is
any kind of consensus on it.

We have always been very cautious of using up single-letter options,
because there are not enough of them available for all the meanings we
want. There are several options that we might want to abbreviate to '-i'
or '-I':

--no-ignores
--non-interactive
--ignore-externals
--ignore-ancestry

and we might well add more in 1.7, 1.8, 1.9.

It could well be that --ignore-externals is the most commonly used by
far, in which case we might want to add a short alias for it. But before
we jump to any conclusions, we should also ask (the original poster, and
ourselves) whether the problem would be better solved in a different
way, perhaps by making "ignore-externals" a configurable option in
~/subversion/config and having an inverse option (--with-externals ?)
available to override it if it only rarely needs to be overridden.

Looking at the list of options we have, it seems to me that it would
make sense for many of them to have a customisable default in the config
file, and both positive and negative forms available on the command
line. 

We also have a precedent of abbreviating a long option to a shorter
"long" option: --changelist is also --cl. Maybe there's a good "long"
abbreviation for --ignore-externals.

Questions like this are one reason why an issue should have been
discussed on the mailing list before it was filed.

Do you have any involvement or perspective on this particular issue
yourself?

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2370943