diff options
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/git-svn.perl b/git-svn.perl index 54d235693..4a56f1871 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1501,10 +1501,13 @@ sub svn_checkout_tree { apply_mod_line_blob($m); svn_check_prop_executable($m); } elsif ($m->{chg} eq 'T') { - sys(qw(svn rm --force),$m->{file_b}); - apply_mod_line_blob($m); - sys(qw(svn add), $m->{file_b}); svn_check_prop_executable($m); + apply_mod_line_blob($m); + if ($m->{mode_a} =~ /^120/ && $m->{mode_b} !~ /^120/) { + sys(qw(svn propdel svn:special), $m->{file_b}); + } else { + sys(qw(svn propset svn:special *),$m->{file_b}); + } } elsif ($m->{chg} eq 'A') { svn_ensure_parent_path( $m->{file_b} ); apply_mod_line_blob($m); @@ -2659,11 +2662,12 @@ sub libsvn_connect { } sub libsvn_get_file { - my ($gui, $f, $rev) = @_; + my ($gui, $f, $rev, $chg) = @_; my $p = $f; if (length $SVN_PATH > 0) { return unless ($p =~ s#^\Q$SVN_PATH\E/##); } + print "\t$chg\t$f\n" unless $_q; my ($hash, $pid, $in, $out); my $pool = SVN::Pool->new; @@ -2766,8 +2770,7 @@ sub libsvn_fetch { $pool->clear; } foreach (@amr) { - print "\t$_->[0]\t$_->[1]\n" unless $_q; - libsvn_get_file($gui, $_->[1], $rev) + libsvn_get_file($gui, $_->[1], $rev, $_->[0]); } close $gui or croak $?; return libsvn_log_entry($rev, $author, $date, $msg, [$last_commit]); @@ -2845,8 +2848,7 @@ sub libsvn_traverse { if (defined $files) { push @$files, $file; } else { - print "\tA\t$file\n" unless $_q; - libsvn_get_file($gui, $file, $rev); + libsvn_get_file($gui, $file, $rev, 'A'); } } } @@ -3137,7 +3139,7 @@ sub copy_remote_ref { my $ref = "refs/remotes/$GIT_SVN"; if (safe_qx('git-ls-remote', $origin, $ref)) { sys(qw/git fetch/, $origin, "$ref:$ref"); - } else { + } elsif ($_cp_remote && !$_upgrade) { die "Unable to find remote reference: ", "refs/remotes/$GIT_SVN on $origin\n"; } |