You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2007/06/05 06:10:50 UTC

Revert r23264 for the sake of zsh?

I finally got some time this evening to track down one of my major
annoyances with Subversion - and I finally figured it out after a
couple of attempts over a period of several months as to what's going
wrong.

With 1.5 (trunk), tab completion doesn't work - I get:

% svn diff <TAB>
_arguments:comparguments:208: invalid argument: ARG

This pretty much happens for every subcommand.  On a whim, I tried
1.4.3 and it worked fine - that was the missing bit I hadn't tried
before.  I tracked it down to the fact that zsh is looking for 'arg'
literal in our help output as a magic string - it's not case
sensitive.

The culprit revision on our end is:

---
r23264 | nori | 2007-01-26 19:31:07 -0800 (Fri, 26 Jan 2007) | 6 lines

Make all the command line option arguments written in uppercase as "ARG".

* subversion/libsvn_subr/opt.c (svn_opt_format_option):
* subversion/svnserve/main.c (svnserve__options):
  Make "arg" uppercase.
---

Anyone know what the rationale for this was?  The fact that it
absolutely kills zsh is *very* annoying and I view this as a
regression compared to 1.4.  While zsh could (should) fix it upstream,
getting the update so that tab completion works distributed to
everyone is going to be a giant PITA if we leave it to OS vendors,
etc.  What was the compelling need for this change?

Thoughts on reverting?

Oh, a hacky zsh fix is to apply the following patch to the _subversion
completion function file (i.e. replace 'arg' with 'ARG'):
http://people.apache.org/~jerenkrantz/svn-zsh-complete.patch  (Either
patch the distributed _subversion file or plop a new one in a
directory and point fpath to it before compinit is invoked.)  There
probably is a way to get it to do with case-sensitivity - I don't care
to delve into that at the moment for my own needs.

I'm now glad that I figured it out and I can use tab completion again.
 =)  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Revert r23264 for the sake of zsh?

Posted by John Szakmeister <jo...@szakmeister.net>.
Justin Erenkrantz wrote:
[snip]
> Why is the change we made correct?  It seems rather arbitrary.  What
> were we hoping to gain by this change - other than breaking my shell?
> =)  -- justin

I imagine the change was made for consistency.  The help text referred 
to it as 'ARG', and the usage strings use capitalized names for all 
arguments.  Seems like a reasonable change to me... but then I don't use 
zsh. :-)

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Revert r23264 for the sake of zsh?

Posted by Vincent Lefevre <vi...@vinc17.org>.
On 2007-06-05 23:46:24 -0700, Justin Erenkrantz wrote:
> On 6/5/07, Peter Samuelson <pe...@p12n.org> wrote:
>> The completion functionality seems more tightly tied to the Subversion
>> version than to the zsh version.  If that is the case, why not just
>> distribute it in contrib, as you do with the bash completion
>> functionality?
>
> Well, because a lot of OSes (i.e. Mac OS X 10.4) already ship with zsh
> versions that would be broken merely upon upgrade to Subversion 1.5?

However Subversion could be distributed with a fixed completion
function, and zsh code (to put in the user's .zshrc) could be
used to load this function instead of the one provided by zsh
if it is not up-to-date.

-- 
Vincent Lefèvre <vi...@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Revert r23264 for the sake of zsh?

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 6/5/07, Peter Samuelson <pe...@p12n.org> wrote:
> The completion functionality seems more tightly tied to the Subversion
> version than to the zsh version.  If that is the case, why not just
> distribute it in contrib, as you do with the bash completion
> functionality?

Well, because a lot of OSes (i.e. Mac OS X 10.4) already ship with zsh
versions that would be broken merely upon upgrade to Subversion 1.5?

> Barring that, I'd say send a patch for case-insensitive 'ARG' to zsh
> regardless of whether 1.5 will release with this change, as it _is_ a
> correct change and ought to be in 1.6 if not 1.5.
>
> Anyway, I don't like the idea of reverting a consistency fix in the
> help text simply because someone is trying to _parse_ it.  Indeed,
> parsing the help text seems almost absurd too - though I do understand
> the reason for it in this case.  svn --help --xml?  (:

Why is the change we made correct?  It seems rather arbitrary.  What
were we hoping to gain by this change - other than breaking my shell?
=)  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Revert r23264 for the sake of zsh?

Posted by Daniel Rall <dl...@collab.net>.
On Tue, 05 Jun 2007, Peter Samuelson wrote:

> 
> [Justin Erenkrantz]
> > Anyone know what the rationale for this was?  The fact that it
> > absolutely kills zsh is *very* annoying and I view this as a
> > regression compared to 1.4.  While zsh could (should) fix it
> > upstream
> 
> The completion functionality seems more tightly tied to the Subversion
> version than to the zsh version.  If that is the case, why not just
> distribute it in contrib, as you do with the bash completion
> functionality?
> 
> Barring that, I'd say send a patch for case-insensitive 'ARG' to zsh
> regardless of whether 1.5 will release with this change, as it _is_ a
> correct change and ought to be in 1.6 if not 1.5.
> 
> Anyway, I don't like the idea of reverting a consistency fix in the
> help text simply because someone is trying to _parse_ it.
...

This sure does sound like a PITA.  However, I concur with Peter on
this one.

Re: Revert r23264 for the sake of zsh?

Posted by Peter Samuelson <pe...@p12n.org>.
[Justin Erenkrantz]
> Anyone know what the rationale for this was?  The fact that it
> absolutely kills zsh is *very* annoying and I view this as a
> regression compared to 1.4.  While zsh could (should) fix it
> upstream

The completion functionality seems more tightly tied to the Subversion
version than to the zsh version.  If that is the case, why not just
distribute it in contrib, as you do with the bash completion
functionality?

Barring that, I'd say send a patch for case-insensitive 'ARG' to zsh
regardless of whether 1.5 will release with this change, as it _is_ a
correct change and ought to be in 1.6 if not 1.5.

Anyway, I don't like the idea of reverting a consistency fix in the
help text simply because someone is trying to _parse_ it.  Indeed,
parsing the help text seems almost absurd too - though I do understand
the reason for it in this case.  svn --help --xml?  (: