threads / patch / 3303

patchUse a relative path for SVN importing

Subject: [PATCH] Use a relative path for SVN importing

## tl;dr

3 messages between Feb 11, 2006 and Feb 13, 2006. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Christian Biesinger· Feb 11, 2006, 15:44 UTC · lore

The absolute path (with the leading slash) breaks SVN importing, because it then looks for /trunk/... instead of /svn/trunk/... (in my case, the repository URL was https://servername/svn/)

Signed-off-by: Christian Biesinger <cbiesinger@web.de>
---
 git-svnimport.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
7718b5a5fec01c0774f6b9cdc84f908e68b403ac
Show changes to git-svnimport.perl +1 −1
diff --git a/git-svnimport.perl b/git-svnimport.perl
index b6799d8..f17d5a2 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -318,7 +318,7 @@ sub get_file($$$) {
 			die $res->status_line." at $url\n";
 		}
 	} else {
-		$name = $svn->file("/$svnpath",$rev);
+		$name = $svn->file("$svnpath",$rev);
 		return undef unless defined $name;
 	}
 
-- 
1.1.6.g486a-dirty
Christian Biesinger· Feb 11, 2006, 17:04 UTC · re: Christian Biesinger · lore

Re: [PATCH] Use a relative path for SVN importing

Christian Biesinger wrote:
> The absolute path (with the leading slash) breaks SVN importing, because it then
> looks for /trunk/... instead of /svn/trunk/... (in my case, the repository URL
> was https://servername/svn/)

I also tested a svn+ssh case and that works too (it also worked before, oddly enough).

Eduardo Pereira Habkost· Feb 13, 2006, 20:52 UTC · re: Christian Biesinger · lore

git-svnimport -d and -D options (was Re: [PATCH] Use a relative path for SVN importing)

Hi,
On Sat, Feb 11, 2006 at 04:44:11PM +0100, Christian Biesinger wrote:
> The absolute path (with the leading slash) breaks SVN importing, because it then
> looks for /trunk/... instead of /svn/trunk/... (in my case, the repository URL
> was https://servername/svn/)

I've hit this bug today, and fortunately I've found the fix from Christian. Thanks! :)

I am wondering if this bug was the initial reason why the -d and -D options where added to git-svnimport.

Is there another real reason why the -d and -D options exist in git-svnimport?

The documentation for the options say that the "wrong" option will die with 40x, but the commit message[1] says something about "internal server error". I don't know which one is right.

Mathias, couldn't be the errors you described in the commit message related to this bug?

[1] http://www.kernel.org/git/?p=git/git.git;a=commit;h=25f6f325d7a8f7cb686a9ffd9fa2c00b3aa85a60
-- 
Eduardo

← back to recent threads