[svk-users] SVK mirror sync problem - quoted spaces in url

Werner, Péter list.svk at 0x.hu
Tue Apr 1 13:44:36 EDT 2008


Hi,

I had problems in the past with URL-s including spaces.
I had to patch SVN::Mirror.

  WP
-------------- next part --------------
--- SVN-Mirror-0.73.orig/lib/SVN/Mirror/Ra.pm	2007-03-19 23:59:12.000000000 +0100
+++ SVN-Mirror-0.73/lib/SVN/Mirror/Ra.pm	2007-10-07 08:37:36.000000000 +0200
@@ -168,6 +168,9 @@
     $self->{config} ||= SVN::Core::config_get_config(undef, $self->{pool});
     $self->{auth} ||= $self->_new_auth;
 
+    # escape URI (% is already escaped)
+    $arg{'url'} =~ s/([^-_:.%\/a-zA-Z0-9])/sprintf("%%%02X", ord($1))/eg if defined $arg{'url'};
+
     SVN::Ra->new( url => $self->{rsource},
 		  auth => $self->{auth},
 		  config => $self->{config},


More information about the svk-users mailing list