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

Re: [PATCH] svncopy.pl fails with spaces in file paths.

From: Martin Tomes <lists_at_tomes.org>
Date: 2005-07-27 10:10:58 CEST

Michael W Thelen wrote:
> Martin Tomes wrote:
>> - SVNCall( "propset", "--file", $tmpfile, "svn:externals",
>> $work_dir );
>> + SVNCall( "propset", "--file", '"' . $tmpfile . '"',
>> "svn:externals",
>> + '"' . $work_dir . '"' );
> I have not used svncopy.pl, but it looks like anything that calls
> SVNCall with a pathname may fail for the same reason. Would it be
> better to guard the parameters inside the SVNCall subroutine itself,
> with something like this?
>
> ==================================================================
> --- contrib/client-side/svncopy.pl.in (revision 21885)
> +++ contrib/client-side/svncopy.pl.in (local)
> @@ -686,7 +686,7 @@
> {
> my ( $command, @options ) = @_;
>
> - my @commandline = ( $svn, $command, @svn_options, @options );
> + my @commandline = ( $svn, $command, @svn_options, map {"\"$_\""}
> @options );
>
> info( " > ", join( " ", @commandline ), "\n" );

I did think of doing that but wasn't brave enough to make that change!
If any of our readers understand svncopy.pl and are willing to endorse
this approach would they please step forward.

-- 
Martin Tomes
echo 'martin at tomes x org x uk'\
  | sed -e 's/ x /\./g' -e 's/ at /@/'
Visit http://www.subversionary.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 27 10:11:49 2005

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.