Skip to content

Commit d5e7c0c

Browse files
committed
Merge git://bogomips.org/git-svn
* git://bogomips.org/git-svn: svn test: escape peg revision separator using empty peg rev git svn: work around SVN 1.7 mishandling of svn:special changes
2 parents 1266686 + 44bc5ac commit d5e7c0c

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

perl/Git/SVN/Editor.pm

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,30 @@ sub M {
345345
$self->close_file($fbat,undef,$self->{pool});
346346
}
347347

348-
sub T { shift->M(@_) }
348+
sub T {
349+
my ($self, $m, $deletions) = @_;
350+
351+
# Work around subversion issue 4091: toggling the "is a
352+
# symlink" property requires removing and re-adding a
353+
# file or else "svn up" on affected clients trips an
354+
# assertion and aborts.
355+
if (($m->{mode_b} =~ /^120/ && $m->{mode_a} !~ /^120/) ||
356+
($m->{mode_b} !~ /^120/ && $m->{mode_a} =~ /^120/)) {
357+
$self->D({
358+
mode_a => $m->{mode_a}, mode_b => '000000',
359+
sha1_a => $m->{sha1_a}, sha1_b => '0' x 40,
360+
chg => 'D', file_b => $m->{file_b}
361+
});
362+
$self->A({
363+
mode_a => '000000', mode_b => $m->{mode_b},
364+
sha1_a => '0' x 40, sha1_b => $m->{sha1_b},
365+
chg => 'A', file_b => $m->{file_b}
366+
});
367+
return;
368+
}
369+
370+
$self->M($m, $deletions);
371+
}
349372

350373
sub change_file_prop {
351374
my ($self, $fbat, $pname, $pval) = @_;

t/t9118-git-svn-funky-branch-names.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_expect_success 'setup svnrepo' '
2828
svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
2929
"$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
3030
svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
31-
"$svnrepo/pr ject/branches/not-a%40{0}reflog" &&
31+
"$svnrepo/pr ject/branches/not-a@{0}reflog@" &&
3232
start_httpd
3333
'
3434

0 commit comments

Comments
 (0)