summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-27 22:58:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-27 22:58:35 (GMT)
commit53f3478d42d00a34bfb031f41a4a9a3a225d312f (patch)
tree60b2488df3585068312dd83e94cf63f23d412233
parent36ec9e21738097b07c9219624a3f4def4a0cecc5 (diff)
parent2394e94e831991348688831a384b088a424c7ace (diff)
downloadgit-53f3478d42d00a34bfb031f41a4a9a3a225d312f.zip
git-53f3478d42d00a34bfb031f41a4a9a3a225d312f.tar.gz
git-53f3478d42d00a34bfb031f41a4a9a3a225d312f.tar.bz2
Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn: git-svn: workaround for a bug in svn serf backend
-rw-r--r--perl/Git/SVN/Editor.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl/Git/SVN/Editor.pm b/perl/Git/SVN/Editor.pm
index b3bcd47..34e8af9 100644
--- a/perl/Git/SVN/Editor.pm
+++ b/perl/Git/SVN/Editor.pm
@@ -304,8 +304,12 @@ sub C {
my ($self, $m, $deletions) = @_;
my ($dir, $file) = split_path($m->{file_b});
my $pbat = $self->ensure_path($dir, $deletions);
+ # workaround for a bug in svn serf backend (v1.8.5 and below):
+ # store third argument to ->add_file() in a local variable, to make it
+ # have the same lifetime as $fbat
+ my $upa = $self->url_path($m->{file_a});
my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
+ $upa, $self->{r});
print "\tC\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
$self->chg_file($fbat, $m);
$self->close_file($fbat,undef,$self->{pool});
@@ -323,8 +327,10 @@ sub R {
my ($self, $m, $deletions) = @_;
my ($dir, $file) = split_path($m->{file_b});
my $pbat = $self->ensure_path($dir, $deletions);
+ # workaround for a bug in svn serf backend, see comment in C() above
+ my $upa = $self->url_path($m->{file_a});
my $fbat = $self->add_file($self->repo_path($m->{file_b}), $pbat,
- $self->url_path($m->{file_a}), $self->{r});
+ $upa, $self->{r});
print "\tR\t$m->{file_a} => $m->{file_b}\n" unless $::_q;
$self->apply_autoprops($file, $fbat);
$self->chg_file($fbat, $m);