summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-08-11 18:11:29 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-11 23:21:51 (GMT)
commit308906fa6e98132cab839a4f42701386fba368ef (patch)
tree9e8373841bc2502d1da46bd51b98ab8c95177dda
parent17a10f3709c211769c9fada79bd1608aa64f6080 (diff)
downloadgit-308906fa6e98132cab839a4f42701386fba368ef.zip
git-308906fa6e98132cab839a4f42701386fba368ef.tar.gz
git-308906fa6e98132cab839a4f42701386fba368ef.tar.bz2
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>
-rwxr-xr-xgit-svn.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 3327ad3..7d9839e 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2580,7 +2580,9 @@ sub libsvn_connect {
sub libsvn_get_file {
my ($gui, $f, $rev) = @_;
my $p = $f;
- return unless ($p =~ s#^\Q$SVN_PATH\E/##);
+ if (length $SVN_PATH > 0) {
+ return unless ($p =~ s#^\Q$SVN_PATH\E/##);
+ }
my ($hash, $pid, $in, $out);
my $pool = SVN::Pool->new;
@@ -2627,6 +2629,7 @@ sub libsvn_log_entry {
if (defined $_authors && ! defined $users{$author}) {
die "Author: $author not defined in $_authors file\n";
}
+ $msg = '' if ($rev == 0 && !defined $msg);
return { revision => $rev, date => "+0000 $Y-$m-$d $H:$M:$S",
author => $author, msg => $msg."\n", parents => $parents || [] }
}