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

Re: [PATCH] fix for interactive merge-callback not supporting spaces in file paths

From: David Glasser <glasser_at_mit.edu>
Date: 2007-07-17 16:04:38 CEST

On 7/17/07, Erik Huelsmann <ehuels@gmail.com> wrote:
> Isn't it an option to add additional quotes around the path argument, changing
>
> cmd = apr_psprintf(pool, "%s %s", editor, path);
>
> to
>
> cmd = apr_psprintf(pool, "%s \"%s\"", editor, path);
>
> ? The editor should already be appropriately quoted.

I feel like this change would be just the first step down the
rabbit-hole. Next we need to deal with the possibility of double
quotes in the path, etc.

It's a tricky little problem. Why don't we tokenize the editor
argument with apr_tokenize_to_argv and then use something like
apr_proc_create which takes an argv error instead? That's what
libsvn_ra_svn does (see its client.c(find_tunnel_agent)).

--dave

-- 
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 17 16:03:52 2007

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