[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: Augie Fackler <durin42_at_gmail.com>
Date: 2007-07-18 14:21:28 CEST

On Jul 18, 2007, at 5:11 AM, Erik Huelsmann wrote:

> On 7/17/07, David Glasser <glasser@mit.edu> wrote:
>> 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.
>
> Well, I feel a little bit differently: I think we can refuse to handle
> double quotes in paths. It's no where near a common case. OTOH, a path
> with spaces is nearly *the* common case on Windows ("Documents and
> Settings", "Program Files"?)

I'm sure I've actually seen files with double quotes in subversion
repositories - assume users do stupid things. Also, double-quoting
things might not work as expected on Windows, but I don't have a
Windows machine set up to test.

Since the editor callback is only ever called upon to edit a
temporary file that is going to not contain any special characters,
this will work. I actually borrowed the entire concept of the fix
from the corresponding code for propedit in the client. Consistency
seemed reasonable. I'm actually thinking of taking a similar approach
to implement a callback for calling out to a specialized merging
program (though, that will require 3 tempfiles and not 1).

> <snip tokenizing and why it's not an option>

>
> bye,
>
> Erik.

Thanks,
Augie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 18 14:20:46 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.