diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-02 17:26:58 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-02 17:26:58 -0800 |
commit | 278fcd7debf19c1efee18b32f8867becb18d1a22 (patch) | |
tree | 2cb716a1c55fc0f9af01138cd5d0ba843218fb03 /git-svn.perl | |
parent | 3683dc5a9afaf88d00e55c9e6c67a2160ca7fc9c (diff) | |
parent | 6173c197c9a23fa8594f18fd2c856407d4af31c1 (diff) | |
download | git-278fcd7debf19c1efee18b32f8867becb18d1a22.tar.gz |
Merge branch 'maint'
* maint:
git-svn: avoid fetching files twice in the same revision
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/git-svn.perl b/git-svn.perl index 3891122d73..d0bd0bdeb8 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2982,7 +2982,7 @@ sub libsvn_fetch_delta { sub libsvn_fetch_full { my ($last_commit, $paths, $rev, $author, $date, $msg) = @_; open my $gui, '| git-update-index -z --index-info' or croak $!; - my @amr; + my %amr; my $p = $SVN->{svn_path}; foreach my $f (keys %$paths) { my $m = $paths->{$f}->action(); @@ -3001,7 +3001,7 @@ sub libsvn_fetch_full { my $t = $SVN->check_path($f, $rev, $pool); if ($t == $SVN::Node::file) { if ($m =~ /^[AMR]$/) { - push @amr, [ $m, $f ]; + $amr{$f} = $m; } else { die "Unrecognized action: $m, ($f r$rev)\n"; } @@ -3009,13 +3009,13 @@ sub libsvn_fetch_full { my @traversed = (); libsvn_traverse($gui, '', $f, $rev, \@traversed); foreach (@traversed) { - push @amr, [ $m, $_ ] + $amr{$_} = $m; } } $pool->clear; } - foreach (@amr) { - libsvn_get_file($gui, $_->[1], $rev, $_->[0]); + foreach (keys %amr) { + libsvn_get_file($gui, $_, $rev, $amr{$_}); } close $gui or croak $?; return libsvn_log_entry($rev, $author, $date, $msg, [$last_commit]); |