@@ -304,8 +304,12 @@ sub C {
304
304
my ($self , $m , $deletions ) = @_ ;
305
305
my ($dir , $file ) = split_path($m -> {file_b });
306
306
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 });
307
311
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 });
309
313
print " \t C\t $m ->{file_a} => $m ->{file_b}\n " unless $: :_q;
310
314
$self -> chg_file($fbat , $m );
311
315
$self -> close_file($fbat ,undef ,$self -> {pool });
@@ -323,8 +327,10 @@ sub R {
323
327
my ($self , $m , $deletions ) = @_ ;
324
328
my ($dir , $file ) = split_path($m -> {file_b });
325
329
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 });
326
332
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 });
328
334
print " \t R\t $m ->{file_a} => $m ->{file_b}\n " unless $: :_q;
329
335
$self -> apply_autoprops($file , $fbat );
330
336
$self -> chg_file($fbat , $m );
0 commit comments