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

Bug in svncopy.pl with svn+ssh://-URLs

From: Ganssauge, Gottfried <Gottfried.Ganssauge_at_haufe.de>
Date: 2005-12-06 11:28:41 CET

svncopy.pl does not properly handle svn+ssh URLs.
This depends on the fact that + is a meta character within Perl's
regular expressions.
The following patch quotes the variable used in order to prevent
interpretation as an RE.

Cheers,

Gottfried

--- /home/ganssaug/bin/svncopy.pl 2005-12-02 18:12:56.698204000
+0100
+++ /VCS/local/bin/svncopy 2005-12-06 11:04:38.340124000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/VCS/local/bin/perl
 #
 # svncopy.pl -- Utility script for copying with branching/tagging.
 #
@@ -55,7 +55,7 @@
 #

 # Specify the location of the svn command.
-my $svn = '/usr/bin/svn';
+my $svn = '/VCS/local/bin/svn';

 # Input parameters
 my $testscript = 0;
@@ -464,7 +464,7 @@
                 {
                   my $dest_dir = DestinationSubdir( $source,
$destination );
                   #info( "Checking against '$source'\n" );
- if ( $ext_val =~ s|^$source|$dest_dir| )
+ if ( $ext_val =~ s|^\Q$source|$dest_dir| )
                     {
                       $external = "$ext_dir$spacing$ext_val";
                       info( " - updated '$old_external' to
'$external'\n" );
Received on Tue Dec 6 16:43:11 2005

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