git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: bugfix: allow SVN:: lib users to track the root of the repository

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 11, 2006, 18:11 UTC
Message-ID
<11553198912549-git-send-email-normalperson@yhbt.net>
In-Reply-To
<11553198891741-git-send-email-normalperson@yhbt.net>

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>
---
 git-svn.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index a033237..fb792be 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2614,7 +2614,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;
@@ -2661,6 +2663,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 || [] }
 }
-- 
1.4.2.rc1.g018f
Previous: Eric WongNext: Junio C Hamano
Message 2 of 4 in “git-svn: split the path from the url correctly with limited perms”
  1. git-svn: split the path from the url correctly with limited permsEric Wong, Aug 11, 2006
  2. git-svn: bugfix: allow SVN:: lib users to track the root of the repositoryEric Wong, Aug 11, 2006
  3. Junio C HamanoAug 11, 2006
  4. git-svn: split the path from the url correctly with limited permsEric Wong, Aug 12, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.