Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: svn completion under Cygwin

On 2008-09-23 at 00:51 +0200, Vadim Zeitlin wrote:
>  But, once again, the problem with svn completion under Cygwin is *not* due
> to CR LF trouble but to the fact that the native Win32 svn.exe outputs the
> file paths with backslashes and not slashes as the completion code expects.
> Let me repost my trivial patch which fixes the completion for me:

Do you have IPv6 connectivity?  If so, can you please tell me what you
see for the fifth line of output from:
  svn ls http://svn.spodhuis.org/svn/scratch-db/trunk

On Unix, the output is:
----------------------------8< cut here >8------------------------------
foo bar/
----------------------------8< cut here >8------------------------------

So clearly \ is a valid character in a directory name for svn; I can
update files inside such a directory, etc.

I suspect that we need an _svn_osfixup() filter after the svn command,
where that would, for the Windows OSes (I forget the values of $OSTYPE
there) apply changes.  But before that can be written, what 'foo\bar'
maps to needs to be determined, so that we can reverse it.

> -    _cache_svn_status[$dir]="$(_call_program files svn status -N $dir)"
> +    _cache_svn_status[$dir]="$(_call_program files svn status -N $dir) | tr '\\' '/'"

I'm somewhat surprised that this works, without the 'tr' being inside
the $(...), but know little enough about completion.


Messages sorted by: Reverse Date, Date, Thread, Author