summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce1a79b)
raw | patch | inline | side by side (parent: ce1a79b)
author | Eric Wong <normalperson@yhbt.net> | |
Thu, 20 Jul 2006 08:43:01 +0000 (01:43 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 24 Jul 2006 06:35:24 +0000 (23:35 -0700) |
Log output from SVN doesn't list all the new files that were
added if a new directory was copied from an existing place in
the repository. This means we'll have to do some extra work and
traverse new directories ourselves.
This has been updated from the original patch to defer traversed
adds until all removals have been done. Please disregard the
original.
Thanks to Ben Williamson for the excellent bug report and
testing.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
added if a new directory was copied from an existing place in
the repository. This means we'll have to do some extra work and
traverse new directories ourselves.
This has been updated from the original patch to defer traversed
adds until all removals have been done. Please disregard the
original.
Thanks to Ben Williamson for the excellent bug report and
testing.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 89ad840dbf46f722cc0be75b3d6b5f0b6dbf051d..6453771f9c2ce27dcecb7bf208cd60feb4881aa3 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
} else {
die "Unrecognized action: $m, ($f r$rev)\n";
}
+ } elsif ($t == $SVN::Node::dir && $m =~ /^[AR]$/) {
+ my @traversed = ();
+ libsvn_traverse($gui, '', $f, $rev, \@traversed);
+ foreach (@traversed) {
+ push @amr, [ $m, $_ ]
+ }
}
$pool->clear;
}
}
sub libsvn_traverse {
- my ($gui, $pfx, $path, $rev) = @_;
+ my ($gui, $pfx, $path, $rev, $files) = @_;
my $cwd = "$pfx/$path";
my $pool = SVN::Pool->new;
$cwd =~ s#^/+##g;
foreach my $d (keys %$dirent) {
my $t = $dirent->{$d}->kind;
if ($t == $SVN::Node::dir) {
- libsvn_traverse($gui, $cwd, $d, $rev);
+ libsvn_traverse($gui, $cwd, $d, $rev, $files);
} elsif ($t == $SVN::Node::file) {
- print "\tA\t$cwd/$d\n" unless $_q;
- libsvn_get_file($gui, "$cwd/$d", $rev);
+ my $file = "$cwd/$d";
+ if (defined $files) {
+ push @$files, $file;
+ } else {
+ print "\tA\t$file\n" unless $_q;
+ libsvn_get_file($gui, $file, $rev);
+ }
}
}
$pool->clear;
}
my ($paths, $rev, $author, $date, $msg) = @_;
open my $gui, '| git-update-index -z --index-info' or croak $!;
- my $pool = SVN::Pool->new;
- libsvn_traverse($gui, '', $SVN_PATH, $rev, $pool);
- $pool->clear;
+ libsvn_traverse($gui, '', $SVN_PATH, $rev);
close $gui or croak $?;
return libsvn_log_entry($rev, $author, $date, $msg);
}