Skip to content

Commit 308906f

Browse files
Eric WongJunio C Hamano
authored andcommitted
git-svn: bugfix: allow SVN:: lib users to track the root of the repository
I'm not sure if anybody has hit this (besides me), but this fixes the problem where I ran into while attempting to import a small repo at the root level: I ended up with all the commits, but with no file/tree changes at all throughout the entire history. Also, fix a warning if the commit message is not defined for revision 0. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 17a10f3 commit 308906f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-svn.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,9 @@ sub libsvn_connect {
25802580
sub libsvn_get_file {
25812581
my ($gui, $f, $rev) = @_;
25822582
my $p = $f;
2583-
return unless ($p =~ s#^\Q$SVN_PATH\E/##);
2583+
if (length $SVN_PATH > 0) {
2584+
return unless ($p =~ s#^\Q$SVN_PATH\E/##);
2585+
}
25842586

25852587
my ($hash, $pid, $in, $out);
25862588
my $pool = SVN::Pool->new;
@@ -2627,6 +2629,7 @@ sub libsvn_log_entry {
26272629
if (defined $_authors && ! defined $users{$author}) {
26282630
die "Author: $author not defined in $_authors file\n";
26292631
}
2632+
$msg = '' if ($rev == 0 && !defined $msg);
26302633
return { revision => $rev, date => "+0000 $Y-$m-$d $H:$M:$S",
26312634
author => $author, msg => $msg."\n", parents => $parents || [] }
26322635
}

0 commit comments

Comments
 (0)