@matheusbsbs / matheus-bagliano / commits / d542aedb94
Fork 0

git-svn: remove check_path calls before calling do_update

These checks were needed before git-svn got smarter about match_paths() and using path information returned by get_log(). We also have extra checking against fetching revisions out-of-order these days; so we don't have to worry about that as much. We also check for tree deletions in match_paths() and skip those as well. Signed-off-by: Eric Wong <normalperson@yhbt.net>

Eric Wong committed Feb 9, 2007 at 02:19 UTC d542aedb9424872474e896a6d20407745d4bd627
1 file changed +3 -8
git-svn.perl
+3 -8
@@ -1138,6 +1138,9 @@ sub do_git_commit {
1138
1139 sub match_paths {
1140 my ($self, $paths, $r) = @_;
1141 + if (my $path = $paths->{"/$self->{path}"}) {
1142 + return ($path->{action} eq 'D') ? 0 : 1;
1143 + }
1144 $self->{path_regex} ||= qr/^\/\Q$self->{path}\E\/?/;
1145 if (grep /$self->{path_regex}/, keys %$paths) {
1146 return 1;
@@ -2394,14 +2397,6 @@ sub gs_do_update {
2397 my $new = ($rev_a == $rev_b);
2398 my $path = $gs->{path};
2399
2397 - my $ta = $self->check_path($path, $rev_a);
2398 - my $tb = $new ? $ta : $self->check_path($path, $rev_b);
2399 - return 1 if ($tb != $SVN::Node::dir && $ta != $SVN::Node::dir);
2400 - if ($ta == $SVN::Node::none) {
2401 - $rev_a = $rev_b;
2402 - $new = 1;
2403 - }
2404 -
2400 my $pool = SVN::Pool->new;
2401 $editor->set_path_strip($path);
2402 my (@pc) = split m#/#, $path;