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

[PATCH v2] git-svn: Print revision while searching for earliest use of path

From
Deskin Miller <deskinm@umich.edu>
Date
Feb 9, 2009, 00:33 UTC
Message-ID
<1234139598-13703-1-git-send-email-deskinm@umich.edu>
In-Reply-To
<86d4c5e00902050542n74b10bfdw5e9249ac23fdc9e7@mail.gmail.com>

When initializing a git-svn repository from a Subversion repoository, it is common to be interested in a path which did not exist in the initial commit to Subversion. In a large repository, the initial fetch may take some looking for the earliest existence of the path time while the user receives no additional feedback. Print the highest revision number scanned thus far to let the user know something is still happening.

Signed-off-by: Deskin Miller <deskinm@umich.edu>
---
I'd never looked closely enough at gs_fetch_loop_common to grok what was
going on, and my previous experience with svn's get_log led me to think
that git-svn would slurp up log info for all commits at once.  Silly of
me.

Eric, things are much cleaner doing as you suggest. I added a carriage-return at the end of the message because I like it that way, and the line will be overwritten once it actually starts fetching data from svn. I don't feel strongly about it though, so if it's better to make it a newline, please feel free to change it and apply.

Deskin Miller
 git-svn.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 79888a0..601e2a3 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4348,6 +4348,9 @@ sub gs_fetch_loop_common {
 		}
 		$self->get_log([$longest_path], $min, $max, 0, 1, 1,
 		               sub { $revs{$_[1]} = _cb(@_) });
+		if ($err) {
+			print "Checked through r$max\r";
+		}
 		if ($err && $max >= $head) {
 			print STDERR "Path '$longest_path' ",
 				     "was probably deleted:\n",
-- 
1.6.1.399.g0d272
Previous: Deskin MillerNext: Eric Wong
Message 4 of 5 in “git-svn: Print revision while searching for earliest use of path”
  1. git-svn: Print revision while searching for earliest use of pathDeskin Miller, Feb 5, 2009
  2. Eric WongFeb 5, 2009
  3. Deskin MillerFeb 5, 2009
  4. git-svn: Print revision while searching for earliest use of pathDeskin Miller, Feb 9, 2009
  5. Eric WongFeb 9, 2009

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.