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

[PATCH 1/2] git-svn: avoid printing filenames of files we're not tracking

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 5, 2006, 05:51 UTC
Message-ID
<11627058712379-git-send-email-normalperson@yhbt.net>

This is purely an aesthetic change, we already skip importing of files that don't affect the subdirectory we import.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 37ecc51..cc3335a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2662,11 +2662,12 @@ sub libsvn_connect {
 }
 
 sub libsvn_get_file {
-	my ($gui, $f, $rev) = @_;
+	my ($gui, $f, $rev, $chg) = @_;
 	my $p = $f;
 	if (length $SVN_PATH > 0) {
 		return unless ($p =~ s#^\Q$SVN_PATH\E/##);
 	}
+	print "\t$chg\t$f\n" unless $_q;
 
 	my ($hash, $pid, $in, $out);
 	my $pool = SVN::Pool->new;
@@ -2769,8 +2770,7 @@ sub libsvn_fetch {
 		$pool->clear;
 	}
 	foreach (@amr) {
-		print "\t$_->[0]\t$_->[1]\n" unless $_q;
-		libsvn_get_file($gui, $_->[1], $rev)
+		libsvn_get_file($gui, $_->[1], $rev, $_->[0]);
 	}
 	close $gui or croak $?;
 	return libsvn_log_entry($rev, $author, $date, $msg, [$last_commit]);
@@ -2848,8 +2848,7 @@ sub libsvn_traverse {
 			if (defined $files) {
 				push @$files, $file;
 			} else {
-				print "\tA\t$file\n" unless $_q;
-				libsvn_get_file($gui, $file, $rev);
+				libsvn_get_file($gui, $file, $rev, 'A');
 			}
 		}
 	}
-- 
1.4.3.3.ga126
Next: Eric Wong
Message 1 of 2 in “git-svn: avoid printing filenames of files we're not tracking”
  1. 1/2 git-svn: avoid printing filenames of files we're not trackingEric Wong, Nov 5, 2006
  2. 2/2 git-svn: don't die on rebuild when --upgrade is specifiedEric Wong, Nov 5, 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.