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

minimize_url in git-svn?

From
Junio C Hamano <junkio@cox.net>
Date
May 8, 2007, 09:58 UTC
Message-ID
<7v4pmn4oxj.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<464023D4.5060101@midwinter.com>
I was trying to run git-svn against this:
	https://repo.socialtext.net:8999/svn/socialtext/trunk

This is an open source project [*1*] and the trunk is supposed to be readable by everybody, but it seems that anything outside that area needs authentication. If I mimick the example in git-svn.txt manual page to clone from there, it creates trunk, trunk/.git, and then asks for password:

	$ URL=https://repo.socialtext.net:8999/svn/socialtext/trunk
	$ git-svn clone $URL
        Authentication realm: <https://repo.socialtext.net:8999> Auth for SVN
	Password for 'junio': ^C

I've narrowed it down to this part of git-svn. If I tell it not to bother "minimiz"ing the URL, it seems to import without stepping outside of the URL it was given.

--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1038,7 +1038,8 @@
 		}
 		$self->{repo_id} = $existing;
 	} else {
-		my $min_url = Git::SVN::Ra->new($url)->minimize_url;
+		my $ra = Git::SVN::Ra->new($url);
+		my $min_url = $url; # $ra->minimize_url;
 		$existing = find_existing_remote($min_url, $r);
 		if ($existing) {
 			unless ($no_write) {

Two and half questions.

 * What does minimize do, and why is it necessary?

 * The resulting git-svn remote tracking branch (and 'master')
   seems to check out fine, but I do not know what damage the
   hack to avoid minimizing is causing.  Are there any?  I see
   many 0{40} lines in trunk/.git/svn/git-svn/.rev_db.* file,
   and also many lines in unhandled.log file (+empty_dir,
   +file_prop, and +dir_prop).  Are these something to worry
   about?

 * Assuming there aren't any damage, or maybe some damage that
   would cause minor decreased functionality/interoperability,
   would it perhaps make sense to optionally allow skipping the
   minimizing to avoid this problem?  Would it make sense, or is
   the setting at socialtext site too esoteric and it isn't
   worth to worry about?


[Footnote]

*1* http://www.socialtext.net/stoss/index.cgi?developing_with_a_dev_env
Previous: Steven GrimmNext: Johannes Schindelin
Message 5 of 9 in “importing multi-project svn repositories”
  1. David HansonMay 6, 2007
  2. Steven GrimmMay 7, 2007
  3. Dave HansonMay 8, 2007
  4. Deprecate git-svnimport?Steven Grimm, May 8, 2007
  5. minimize_url in git-svn?Junio C Hamano, May 8, 2007
  6. Johannes SchindelinMay 8, 2007
  7. Eric WongMay 8, 2007
  8. Junio C HamanoMay 9, 2007
  9. git-svn: don't attempt to minimize URLs by defaultEric Wong, May 13, 2007

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.