X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-svnimport.perl;h=4d5371ca901cb7579e454443958e8ca360763dbe;hb=5bc4ce589646faf72c7a77a5d32d9496ccc8d456;hp=639aa41861a734aab225479be7524c972191da70;hpb=f2fea68a0fc29c6378748853abb01aed1c462a50;p=git.git diff --git a/git-svnimport.perl b/git-svnimport.perl index 639aa418..4d5371ca 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -616,9 +616,7 @@ sub commit { } if(($action->[0] eq "A") || ($action->[0] eq "R")) { my $node_kind = node_kind($branch,$path,$revision); - if($action->[1]) { - copy_path($revision,$branch,$path,$action->[1],$action->[2],$node_kind,\@new,\@parents); - } elsif ($node_kind eq $SVN::Node::file) { + if ($node_kind eq $SVN::Node::file) { my $f = get_file($revision,$branch,$path); if ($f) { push(@new,$f) if $f; @@ -627,8 +625,15 @@ sub commit { print STDERR "$revision: $branch: could not fetch '$opath'\n"; } } elsif ($node_kind eq $SVN::Node::dir) { - get_ignore(\@new, \@old, $revision, - $branch,$path); + if($action->[1]) { + copy_path($revision, $branch, + $path, $action->[1], + $action->[2], $node_kind, + \@new, \@parents); + } else { + get_ignore(\@new, \@old, $revision, + $branch, $path); + } } } elsif ($action->[0] eq "D") { push(@old,$path); @@ -851,7 +856,7 @@ sub commit_all { $opt_l = $svn->{'maxrev'} if not defined $opt_l or $opt_l > $svn->{'maxrev'}; -if ($svn->{'maxrev'} < $current_rev) { +if ($opt_l < $current_rev) { print "Up to date: no new revisions to fetch!\n" if $opt_v; unlink("$git_dir/SVN2GIT_HEAD"); exit;