[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: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2007-07-17 08:31:57 CEST

On 7/11/07, Augie Fackler <durin42@gmail.com> wrote:
> Greetings all,
>
> The attached patch fixes a bug in the interactive merge callback so
> that it can handle files with shell-unsafe characters safely. I
> discovered this when doing merges for Adium and got a conflict in a
> file at the path 'Plugins/Dual Window Interface/
> AIMessageWindowController.h' which opened my editor on 'Plugins/Dual'
> rather than the appropriate temporary file inside .svn. With this
> patch, everything works as expected.

Hi Augie,

Thanks for the patch!

I've looked through it and I'm sad to have to say your approach won't
really work: Subversion is a library in a (possibly) multithreaded
program. Changing the working dir is not acceptable, because threads
my influence each other when doing that, getting in each others way.

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.

Can you test if this works?

Thanks in advance.

bye,

Erik.
> Thanks,
> Augie Fackler
>
> [[[
> Fix issue #2816: Interactive Merge Callback Handles Paths Safely
>
> * subversion/svn/util.c
> (svn_cl__edit_file_externally) Change to the directory containing the
> temporary file and edit from there, then change back to the user's
> working
> directory.
> ]]]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 17 08:31:15 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.