@@ -304,8 +304,12 @@ sub C {
304304 my ($self , $m , $deletions ) = @_ ;
305305 my ($dir , $file ) = split_path($m -> {file_b });
306306 my $pbat = $self -> ensure_path($dir , $deletions );
307+ # workaround for a bug in svn serf backend (v1.8.5 and below):
308+ # store third argument to ->add_file() in a local variable, to make it
309+ # have the same lifetime as $fbat
310+ my $upa = $self -> url_path($m -> {file_a });
307311 my $fbat = $self -> add_file($self -> repo_path($m -> {file_b }), $pbat ,
308- $self -> url_path( $m -> { file_a }) , $self -> {r });
312+ $upa , $self -> {r });
309313 print " \t C\t $m ->{file_a} => $m ->{file_b}\n " unless $: :_q;
310314 $self -> chg_file($fbat , $m );
311315 $self -> close_file($fbat ,undef ,$self -> {pool });
@@ -323,8 +327,10 @@ sub R {
323327 my ($self , $m , $deletions ) = @_ ;
324328 my ($dir , $file ) = split_path($m -> {file_b });
325329 my $pbat = $self -> ensure_path($dir , $deletions );
330+ # workaround for a bug in svn serf backend, see comment in C() above
331+ my $upa = $self -> url_path($m -> {file_a });
326332 my $fbat = $self -> add_file($self -> repo_path($m -> {file_b }), $pbat ,
327- $self -> url_path( $m -> { file_a }) , $self -> {r });
333+ $upa , $self -> {r });
328334 print " \t R\t $m ->{file_a} => $m ->{file_b}\n " unless $: :_q;
329335 $self -> apply_autoprops($file , $fbat );
330336 $self -> chg_file($fbat , $m );
0 commit comments