[Bps-public-commit] r15847 - in SVN-Mirror/trunk: lib/SVN lib/SVN/Mirror
clkao at bestpractical.com
clkao at bestpractical.com
Mon Sep 8 07:36:31 EDT 2008
Author: clkao
Date: Mon Sep 8 07:36:31 2008
New Revision: 15847
Modified:
SVN-Mirror/trunk/ (props changed)
SVN-Mirror/trunk/lib/SVN/Mirror.pm
SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm
Log:
r369 at mtl: clkao | 2006-09-29 04:20:05 +0800
Fix url escape issues for replaced copied source.
Modified: SVN-Mirror/trunk/lib/SVN/Mirror.pm
==============================================================================
--- SVN-Mirror/trunk/lib/SVN/Mirror.pm (original)
+++ SVN-Mirror/trunk/lib/SVN/Mirror.pm Mon Sep 8 07:36:31 2008
@@ -1,6 +1,6 @@
#!/usr/bin/perl
package SVN::Mirror;
-our $VERSION = '0.70';
+our $VERSION = '0.71';
use SVN::Core;
use SVN::Repos;
use SVN::Fs;
Modified: SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm
==============================================================================
--- SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm (original)
+++ SVN-Mirror/trunk/lib/SVN/Mirror/Ra.pm Mon Sep 8 07:36:31 2008
@@ -1,6 +1,6 @@
package SVN::Mirror::Ra;
@ISA = ('SVN::Mirror');
-$VERSION = '0.70';
+$VERSION = '0.71';
use strict;
use SVN::Core;
use SVN::Repos;
@@ -367,7 +367,6 @@
sub { $newrev = $_[0];
$self->committed ($revmap, $date, $rev, @_) }));
- # $editor->{_debug}++;
$self->{working} = $rev;
$editor->{mirror} = $self;
@@ -458,6 +457,7 @@
? $self->{cb_copy_notify}->($self, $local_path, $rpath, $rrev)
: (undef, undef)
}
+ $src_lpath =~ s/%/%25/g if defined $src_lpath;
@$href{qw/local_source_path source_node_kind/} =
( $src_lpath, $source_node_kind );
@@ -498,7 +498,7 @@
}
}
}
- if ( ($self->{skip_to} && $self->{skip_to} <= $rev) ||
+ if (($self->{skip_to} && $self->{skip_to} <= $rev) ||
grep { my $href = $editor->{mod_lists}{$_};
!( ( ($href->{action} eq 'A' || $href->{action} eq 'R')
&& ((defined $href->{local_rev}
@@ -844,8 +844,7 @@
return unless exists $self->{mod_lists}{$path};
my ($cp_path, $cp_rev) =
@{$self->{mod_lists}{$path}}{qw/local_source_path local_rev/};
- use URI::Escape;
- return (uri_escape($cp_path), $cp_rev);
+ return ($cp_path, $cp_rev);
}
sub open_root {
@@ -1117,7 +1116,6 @@
$method = "open_directory" if $path eq $self->{target};
my $tran_path = $self->_translate_rel_path ($path);
-
$method = 'open_directory'
if $tran_path eq $self->{mirror}{target_path};
@@ -1147,10 +1145,13 @@
# current rev, which is unusable if we are reconstructing the
# copy.
my $item = $self->{mod_lists}{$path};
- my $ra = $self->{mirror}->_new_ra( url => "$self->{mirror}{source_root}$item->{remote_path}" );
+ my $remote_path = $item->{remote_path};
+ $remote_path =~ s/%/%25/g;
+ my $ra = $self->{mirror}->_new_ra( url => "$self->{mirror}{source_root}$remote_path" );
my $compeditor = SVN::Mirror::Ra::CompositeEditor->new
( master_editor => $self,
anchor => $path, anchor_baton => $dir_baton );
+ $path =~ s/%/%25/g;
my ($reporter) =
$ra->do_diff($self->{mirror}{working}, '', 1, 1,
"$self->{mirror}{source}/$path", $compeditor);
@@ -1249,13 +1250,16 @@
if ($crazy_replace) {
my $item = $self->{mod_lists}{$path};
- my ($anchor, $target) = "$self->{mirror}{rsource_root}$item->{remote_path}" =~ m{(.*)/([^/]+)};
+ my $remote_path = $item->{remote_path};
+ $remote_path =~ s/%/%25/g;
+ my ($anchor, $target) = "$self->{mirror}{rsource_root}$remote_path" =~ m{(.*)/([^/]+)};
my $ra = $self->{mirror}->_new_ra( url => $anchor );
my $compeditor = SVN::Mirror::Ra::CompositeEditor->new
( master_editor => $self,
anchor => $path, anchor_baton => $pb,
target => $target, target_baton => $file_baton );
+ $path =~ s/%/%25/g;
my ($reporter) =
$ra->do_diff($self->{mirror}{working}, $target, 1, 1,
"$self->{mirror}{rsource}/$path", $compeditor);
More information about the Bps-public-commit
mailing list