# [PATCH] Use a relative path for SVN importing

3 messages from 2006-02-11 to 2006-02-13. Participants: Christian Biesinger, Eduardo Pereira Habkost.
Thread: https://gitlist.dev/t/3303

## Christian Biesinger, 2006-02-11 15:44

Subject: [PATCH] Use a relative path for SVN importing
Message-ID: <1139672651713-git-send-email-cbiesinger@web.de>
URL: https://gitlist.dev/e/1139672651713-git-send-email-cbiesinger%40web.de

```
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
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, 2006-02-11 17:04

Subject: Re: [PATCH] Use a relative path for SVN importing
Message-ID: <43EE1908.1000300@web.de>
URL: https://gitlist.dev/e/43EE1908.1000300%40web.de
In-Reply-To: <1139672651713-git-send-email-cbiesinger@web.de>

```
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, 2006-02-13 20:52

Subject: git-svnimport -d and -D options (was Re: [PATCH] Use a relative path for SVN importing)
Message-ID: <20060213205243.GF4323@duckman.conectiva>
URL: https://gitlist.dev/e/20060213205243.GF4323%40duckman.conectiva
In-Reply-To: <1139672651713-git-send-email-cbiesinger@web.de>

```
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

```
