Skip to content

Commit a906ce6

Browse files
author
Junio C Hamano
committed
Merge branch 'kh/svn'
* kh/svn: git-svnimport: Don't assume that copied files haven't changed
2 parents 90238fb + e67c662 commit a906ce6

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

git-svnimport.perl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,7 @@ sub commit {
616616
}
617617
if(($action->[0] eq "A") || ($action->[0] eq "R")) {
618618
my $node_kind = node_kind($branch,$path,$revision);
619-
if($action->[1]) {
620-
copy_path($revision,$branch,$path,$action->[1],$action->[2],$node_kind,\@new,\@parents);
621-
} elsif ($node_kind eq $SVN::Node::file) {
619+
if ($node_kind eq $SVN::Node::file) {
622620
my $f = get_file($revision,$branch,$path);
623621
if ($f) {
624622
push(@new,$f) if $f;
@@ -627,8 +625,15 @@ sub commit {
627625
print STDERR "$revision: $branch: could not fetch '$opath'\n";
628626
}
629627
} elsif ($node_kind eq $SVN::Node::dir) {
630-
get_ignore(\@new, \@old, $revision,
631-
$branch,$path);
628+
if($action->[1]) {
629+
copy_path($revision, $branch,
630+
$path, $action->[1],
631+
$action->[2], $node_kind,
632+
\@new, \@parents);
633+
} else {
634+
get_ignore(\@new, \@old, $revision,
635+
$branch, $path);
636+
}
632637
}
633638
} elsif ($action->[0] eq "D") {
634639
push(@old,$path);

0 commit comments

Comments
 (0)