{"thread":{"id":"6257","subject":"[PATCH] git-svnimport: clean svn path when accessing SVN repo","startedAt":"2006-12-07T15:26:33Z","lastAt":"2007-01-07T00:22:10Z","messageCount":19,"participants":["Sasha Khapyorsky","Daniel Drake","Dongsheng Song","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"298625","messageId":"1165505193.26874.13.camel@systems03.lan.brontes3d.com","threadId":"6257","inReplyTo":null,"subject":"git-svnimport breakage as of git-1.4.4","fromName":"Daniel Drake","fromEmail":"ddrake@brontes3d.com","sentAt":"2006-12-07T15:26:33Z","receivedAt":"2006-12-07T15:26:33Z","isPatch":false,"sender":{"key":"ddrake@brontes3d.com","avatar":null},"body":"Hi,\n\ngit-svnimport broken between git-1.4.3.5 and git-1.4.4\n\nI have found that commit 83936a29e275bc0c04f60d3333e4951a9e16b1fc is the\ncause of this.\n\nI am using git-svnimport to work with a repo with this layout:\n\nhttps://server/repo/trunk\nhttps://server/repo/tags/x.y.z\nhttps://server/repo/branches/somebranch\n\nStarting a fresh import:\n\n# git-svnimport -v -i -C repo -r https://server repo\n\nFetching from 1 to 10707 ...\nTree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nCommitted change 1:/ 2004-12-22 22:53:27)\nCommitting initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nCommit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c\nWriting to refs/heads/origin\nDONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c\nRA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':\nPROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://server)\nat /usr/bin/git-svnimport line 358\n\n\nAccording to the server logs, git is requesting /trunk/.cvsignore rather\nthan /repo/trunk/.cvsignore\n\nI'm happy to test patches and whatnot but don't have time to investigate\nfurther right now.\n\nThanks!\n-- \nDaniel Drake\nBrontes Technologies, A 3M Company\n"},{"id":"298332","messageId":"20061208203230.GA9193@sashak.voltaire.com","threadId":"6257","inReplyTo":"1165505193.26874.13.camel@systems03.lan.brontes3d.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-08T20:32:30Z","receivedAt":"2006-12-08T20:32:30Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"Hi,\n\nOn 10:26 Thu 07 Dec     , Daniel Drake wrote:\n> \n> git-svnimport broken between git-1.4.3.5 and git-1.4.4\n> \n> I have found that commit 83936a29e275bc0c04f60d3333e4951a9e16b1fc is the\n> cause of this.\n> \n> I am using git-svnimport to work with a repo with this layout:\n> \n> https://server/repo/trunk\n> https://server/repo/tags/x.y.z\n> https://server/repo/branches/somebranch\n> \n> Starting a fresh import:\n> \n> # git-svnimport -v -i -C repo -r https://server repo\n\nIs this 'server' public? Can I rerun this git-svnimport?\n\nIf not, please try the patch:\n\n\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex cbaa8ab..b9de446 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -210,6 +210,12 @@ $svn .= \"/$svn_dir\" if defined $svn_dir;\n my $svn2 = SVNconn->new($svn);\n $svn = SVNconn->new($svn);\n \n+if($svn_dir) {\n+\t$svn_dir =~ s#/*$#/#;\n+} else {\n+\t$svn_dir = \"\";\n+}\n+\n my $lwp_ua;\n if($opt_d or $opt_D) {\n \t$svn_url = URI->new($svn_url)->canonical;\n@@ -906,7 +912,7 @@ sub commit_all {\n \tmy ($changed_paths, $revision, $author, $date, $message, $pool) = @_;\n \tmy %p;\n \twhile(my($path,$action) = each %$changed_paths) {\n-\t\t$p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];\n+\t\t$p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];\n \t}\n \t$changed_paths = \\%p;\n \n\nThanks,\n"},{"id":"295679","messageId":"4b3406f0612091949qc75cb10x13f09e2017d71d91@mail.gmail.com","threadId":"6257","inReplyTo":"20061208203230.GA9193@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Dongsheng Song","fromEmail":"dongsheng.song@gmail.com","sentAt":"2006-12-10T03:49:28Z","receivedAt":"2006-12-10T03:49:28Z","isPatch":false,"sender":{"key":"dongsheng.song@gmail.com","avatar":null},"body":"I met the broken too, when I downgrade to 1.4.3.4, it's fine.\n\nI have not test your patch, but you can try your self,\n\nhttp://tortoisesvn.tigris.org/svn/tortoisesvn\n\nand the master branch(today) fail between r6000~r7000 too\n\n2006/12/9, Sasha Khapyorsky <sashak@voltaire.com>:\n> Hi,\n>\n> On 10:26 Thu 07 Dec     , Daniel Drake wrote:\n> >\n> > git-svnimport broken between git-1.4.3.5 and git-1.4.4\n> >\n>\n> Is this 'server' public? Can I rerun this git-svnimport?\n>\n> If not, please try the patch:\n"},{"id":"295302","messageId":"20061210114735.GA11107@sashak.voltaire.com","threadId":"6257","inReplyTo":"4b3406f0612091949qc75cb10x13f09e2017d71d91@mail.gmail.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-10T11:47:35Z","receivedAt":"2006-12-10T11:47:35Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 11:49 Sun 10 Dec     , Dongsheng Song wrote:\n> I met the broken too, when I downgrade to 1.4.3.4, it's fine.\n> \n> I have not test your patch, but you can try your self,\n> \n> http://tortoisesvn.tigris.org/svn/tortoisesvn\n> \n> and the master branch(today) fail between r6000~r7000 too\n\nThanks for the link. but I cannot access - this requires\nusername/password authentication.\n\n"},{"id":"293936","messageId":"1165847230.13854.2.camel@systems03.lan.brontes3d.com","threadId":"6257","inReplyTo":"20061208203230.GA9193@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Daniel Drake","fromEmail":"ddrake@brontes3d.com","sentAt":"2006-12-11T14:27:10Z","receivedAt":"2006-12-11T14:27:10Z","isPatch":false,"sender":{"key":"ddrake@brontes3d.com","avatar":null},"body":"On Fri, 2006-12-08 at 22:32 +0200, Sasha Khapyorsky wrote:\n> > # git-svnimport -v -i -C repo -r https://server repo\n> \n> Is this 'server' public? Can I rerun this git-svnimport?\n\nSorry, it is not.\n\n> @@ -906,7 +912,7 @@ sub commit_all {\n>  \tmy ($changed_paths, $revision, $author, $date, $message, $pool) = @_;\n>  \tmy %p;\n>  \twhile(my($path,$action) = each %$changed_paths) {\n> -\t\t$p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];\n> +\t\t$p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];\n\nThis is not valid perl - I think you wanted $svn_dir . $path\n\nAfter making that modification it's not fixed though:\n\nFetching from 1 to 10742 ...\nTree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nCommitted change 1:/ 2004-12-22 22:53:27)\nCommitting initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nCommit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c\nWriting to refs/heads/origin\nDONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c\nperl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion\n`is_canonical (path, len)' failed.\nAborted\n\n-- \nDaniel Drake\nBrontes Technologies, A 3M Company\n"},{"id":"294593","messageId":"4b3406f0612111200o65352771r454d5ced0ac99f08@mail.gmail.com","threadId":"6257","inReplyTo":"20061210114735.GA11107@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Dongsheng Song","fromEmail":"dongsheng.song@gmail.com","sentAt":"2006-12-11T20:00:31Z","receivedAt":"2006-12-11T20:00:31Z","isPatch":false,"sender":{"key":"dongsheng.song@gmail.com","avatar":null},"body":"Sorry, I assume you have see http://tortoisesvn.tigris.org/:\n\nusername : guest\npassword : \"\"\n\n2006/12/10, Sasha Khapyorsky <sashak@voltaire.com>:\n> On 11:49 Sun 10 Dec     , Dongsheng Song wrote:\n> > I met the broken too, when I downgrade to 1.4.3.4, it's fine.\n> >\n> > I have not test your patch, but you can try your self,\n> >\n> > http://tortoisesvn.tigris.org/svn/tortoisesvn\n> >\n> > and the master branch(today) fail between r6000~r7000 too\n>\n> Thanks for the link. but I cannot access - this requires\n> username/password authentication.\n>\n> Sasha\n"},{"id":"296698","messageId":"20061211204904.GC1003@sashak.voltaire.com","threadId":"6257","inReplyTo":"1165847230.13854.2.camel@systems03.lan.brontes3d.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-11T20:49:04Z","receivedAt":"2006-12-11T20:49:04Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 09:27 Mon 11 Dec     , Daniel Drake wrote:\n> On Fri, 2006-12-08 at 22:32 +0200, Sasha Khapyorsky wrote:\n> > > # git-svnimport -v -i -C repo -r https://server repo\n> > \n> > Is this 'server' public? Can I rerun this git-svnimport?\n> \n> Sorry, it is not.\n> \n> > @@ -906,7 +912,7 @@ sub commit_all {\n> >  \tmy ($changed_paths, $revision, $author, $date, $message, $pool) = @_;\n> >  \tmy %p;\n> >  \twhile(my($path,$action) = each %$changed_paths) {\n> > -\t\t$p{$path} = [ $action->action,$action->copyfrom_path, $action->copyfrom_rev, $path ];\n> > +\t\t$p{$path} = [ $action->action,$svn_dir$action->copyfrom_path, $action->copyfrom_rev, $svn_dir$path ];\n> \n> This is not valid perl - I think you wanted $svn_dir . $path\n\nYes, sorry.\n\n> \n> After making that modification it's not fixed though:\n> \n> Fetching from 1 to 10742 ...\n> Tree ID 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n> Committed change 1:/ 2004-12-22 22:53:27)\n> Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n> Commit ID 2614c05ac4c5f24eb89cea056a7d46c909084d8c\n> Writing to refs/heads/origin\n> DONE: 1 origin 2614c05ac4c5f24eb89cea056a7d46c909084d8c\n> perl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion\n> `is_canonical (path, len)' failed.\n> Aborted\n\nMaybe I'm starting to understand. Your svn url (url which points to svn\nrepository) is https://server/repo and not just https://server, right?\n\nIf so, please remove the patch (you don't need it) and rerun:\n\n  git-svnimport -v -i -C repo -r https://server/repo\n\n\n"},{"id":"294908","messageId":"20061211205006.GD1003@sashak.voltaire.com","threadId":"6257","inReplyTo":"4b3406f0612111200o65352771r454d5ced0ac99f08@mail.gmail.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-11T20:50:06Z","receivedAt":"2006-12-11T20:50:06Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 04:00 Tue 12 Dec     , Dongsheng Song wrote:\n> Sorry, I assume you have see http://tortoisesvn.tigris.org/:\n> \n> username : guest\n> password : \"\"\n\nThanks, I can grab svn log now. Which command line you are using?\n\n"},{"id":"298376","messageId":"4b3406f0612111301m302dfe3dm81b09a432e67163d@mail.gmail.com","threadId":"6257","inReplyTo":"20061211205006.GD1003@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Dongsheng Song","fromEmail":"dongsheng.song@gmail.com","sentAt":"2006-12-11T21:01:21Z","receivedAt":"2006-12-11T21:01:21Z","isPatch":false,"sender":{"key":"dongsheng.song@gmail.com","avatar":null},"body":"$ cat svn2git-tortoisesvn.sh\n#!/bin/sh\n\nexport LC_ALL=C\nexport WC_ROOT=/home/cauchy/wc/git\nexport REPO_NAME=tortoisesvn\n\necho \"[`date`] Start import & pack ...\"\nmr=0\nwhile [ $mr -le 9000 ]; do\n\n    if test -f $WC_ROOT/$REPO_NAME/.git/SVN2GIT_HEAD; then\n        echo \"[`date`] clean up ...\"\n        cd $WC_ROOT/$REPO_NAME\n        git-read-tree -m -u SVN2GIT_HEAD HEAD && rm -f .git/SVN2GIT_HEAD\n        echo \"[`date`] clean up finished\"\n    fi\n\n    mr=$(($mr + 1000))\n    echo \"[`date`] Start import up to revison $mr ...\"\n\n    git-svnimport -v -i -r -o master -l $mr -C $WC_ROOT/$REPO_NAME\nhttp://tortoisesvn.tigris.org/svn/tortoisesvn\n\n    echo \"[`date`] Finish import up to revison $mr\"\n\n    cd $WC_ROOT/$REPO_NAME && git-repack -a -d --window=64 --depth=64\n\n    echo \"[`date`] Finish repack revison $mr\"\n    cd $WC_ROOT/$REPO_NAME && find .git -name pack | xargs ls -l\ndone\necho \"[`date`] Finished import & pack\"\n\n\n2006/12/12, Sasha Khapyorsky <sashak@voltaire.com>:\n> On 04:00 Tue 12 Dec     , Dongsheng Song wrote:\n> > Sorry, I assume you have see http://tortoisesvn.tigris.org/:\n> >\n> > username : guest\n> > password : \"\"\n>\n> Thanks, I can grab svn log now. Which command line you are using?\n>\n> Sasha\n"},{"id":"297469","messageId":"1165870980.31329.3.camel@systems03.lan.brontes3d.com","threadId":"6257","inReplyTo":"20061211204904.GC1003@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Daniel Drake","fromEmail":"ddrake@brontes3d.com","sentAt":"2006-12-11T21:03:00Z","receivedAt":"2006-12-11T21:03:00Z","isPatch":false,"sender":{"key":"ddrake@brontes3d.com","avatar":null},"body":"On Mon, 2006-12-11 at 22:49 +0200, Sasha Khapyorsky wrote:\n> Maybe I'm starting to understand. Your svn url (url which points to svn\n> repository) is https://server/repo and not just https://server, right?\n\nYes, and then under that we have https://server/repo/trunk\n\n> If so, please remove the patch (you don't need it) and rerun:\n> \n>   git-svnimport -v -i -C repo -r https://server/repo\n\nAh, that fixes it. However, in versions before 1.4.4, either invokation\nstyle works.\n\nThanks,\n-- \nDaniel Drake\nBrontes Technologies, A 3M Company\n"},{"id":"297494","messageId":"20061211220303.GG25052@sashak.voltaire.com","threadId":"6257","inReplyTo":"1165870980.31329.3.camel@systems03.lan.brontes3d.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-11T22:03:03Z","receivedAt":"2006-12-11T22:03:03Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 16:03 Mon 11 Dec     , Daniel Drake wrote:\n> On Mon, 2006-12-11 at 22:49 +0200, Sasha Khapyorsky wrote:\n> > Maybe I'm starting to understand. Your svn url (url which points to svn\n> > repository) is https://server/repo and not just https://server, right?\n> \n> Yes, and then under that we have https://server/repo/trunk\n> \n> > If so, please remove the patch (you don't need it) and rerun:\n> > \n> >   git-svnimport -v -i -C repo -r https://server/repo\n> \n> Ah, that fixes it. However, in versions before 1.4.4, either invokation\n> style works.\n\nFrankly I think that it was bug. And I will see how to restore this. :)\n\n"},{"id":"294418","messageId":"1166027289.21948.4.camel@systems03.lan.brontes3d.com","threadId":"6257","inReplyTo":"20061211204904.GC1003@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Daniel Drake","fromEmail":"ddrake@brontes3d.com","sentAt":"2006-12-13T16:28:09Z","receivedAt":"2006-12-13T16:28:09Z","isPatch":false,"sender":{"key":"ddrake@brontes3d.com","avatar":null},"body":"On Mon, 2006-12-11 at 22:49 +0200, Sasha Khapyorsky wrote:\n> Maybe I'm starting to understand. Your svn url (url which points to svn\n> repository) is https://server/repo and not just https://server, right?\n> \n> If so, please remove the patch (you don't need it) and rerun:\n> \n>   git-svnimport -v -i -C repo -r https://server/repo\n\nSorry, apparently I was using the wrong git-svnimport in my last mail.\nThe above command, with or without your svn_dir patch, doesn't solve the\nproblem.\n\nWith your patch:\n\n# git-svnimport -v -i -C repo -r https://server/repo\n\nRA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':\nPROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://svn) at\ngit-svnimport line 364\n\n# git-svnimport -v -i -C repo -r https://server repo\nperl: subversion/libsvn_subr/path.c:377: svn_path_basename: Assertion\n`is_canonical (path, len)' failed.\nAborted\n\n\nWithout the patch, the error is the same as the 1st case in both\nsituations.\n\n-- \nDaniel Drake\nBrontes Technologies, A 3M Company\n"},{"id":"297183","messageId":"20061214022142.GA14521@sashak.voltaire.com","threadId":"6257","inReplyTo":"1166027289.21948.4.camel@systems03.lan.brontes3d.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-14T02:21:42Z","receivedAt":"2006-12-14T02:21:42Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 11:28 Wed 13 Dec     , Daniel Drake wrote:\n> \n> Sorry, apparently I was using the wrong git-svnimport in my last mail.\n> The above command, with or without your svn_dir patch, doesn't solve the\n> problem.\n> \n> With your patch:\n\nOriginal patch is wrong, so only w/out this patch.\n\n> \n> # git-svnimport -v -i -C repo -r https://server/repo\n> \n> RA layer request failed: PROPFIND request failed on '/trunk/.cvsignore':\n> PROPFIND of '/trunk/.cvsignore': 405 Method Not Allowed (https://svn) at\n> git-svnimport line 364\n> \n> Without the patch, the error is the same as the 1st case in both\n> situations.\n\nTry this please:\n\n\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex cbaa8ab..071777b 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -146,6 +146,7 @@ sub file {\n \tprint \"... $rev $path ...\\n\" if $opt_v;\n \tmy (undef, $properties);\n \tmy $pool = SVN::Pool->new();\n+\t$path =~ s#^/*##;\n \teval { (undef, $properties)\n \t\t   = $self->{'svn'}->get_file($path,$rev,$fh,$pool); };\n \t$pool->clear;\n@@ -181,6 +182,7 @@ sub ignore {\n \tmy($self,$path,$rev) = @_;\n \n \tprint \"... $rev $path ...\\n\" if $opt_v;\n+\t$path =~ s#^/*##;\n \tmy (undef,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \tif (exists $properties->{'svn:ignore'}) {\n@@ -197,6 +199,7 @@ sub ignore {\n \n sub dir_list {\n \tmy($self,$path,$rev) = @_;\n+\t$path =~ s#^/*##;\n \tmy ($dirents,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \treturn $dirents;\n@@ -354,6 +357,7 @@ open BRANCHES,\">>\", \"$git_dir/svn2git\";\n sub node_kind($$) {\n \tmy ($svnpath, $revision) = @_;\n \tmy $pool=SVN::Pool->new;\n+\t$svnpath =~ s#^/*##;\n \tmy $kind = $svn->{'svn'}->check_path($svnpath,$revision,$pool);\n \t$pool->clear;\n \treturn $kind;\n\nThanks,\n"},{"id":"296173","messageId":"20061214022549.GB14521@sashak.voltaire.com","threadId":"6257","inReplyTo":"4b3406f0612111301m302dfe3dm81b09a432e67163d@mail.gmail.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-14T02:25:49Z","receivedAt":"2006-12-14T02:25:49Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 05:01 Tue 12 Dec     , Dongsheng Song wrote:\n> \n>    git-svnimport -v -i -r -o master -l $mr -C $WC_ROOT/$REPO_NAME\n> http://tortoisesvn.tigris.org/svn/tortoisesvn\n\nThanks.\n\nI'm running now git-svnimport against\nhttp://tortoisesvn.tigris.org/svn/tortoisesvn with follow patch:\n\n\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex cbaa8ab..071777b 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -146,6 +146,7 @@ sub file {\n \tprint \"... $rev $path ...\\n\" if $opt_v;\n \tmy (undef, $properties);\n \tmy $pool = SVN::Pool->new();\n+\t$path =~ s#^/*##;\n \teval { (undef, $properties)\n \t\t   = $self->{'svn'}->get_file($path,$rev,$fh,$pool); };\n \t$pool->clear;\n@@ -181,6 +182,7 @@ sub ignore {\n \tmy($self,$path,$rev) = @_;\n \n \tprint \"... $rev $path ...\\n\" if $opt_v;\n+\t$path =~ s#^/*##;\n \tmy (undef,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \tif (exists $properties->{'svn:ignore'}) {\n@@ -197,6 +199,7 @@ sub ignore {\n \n sub dir_list {\n \tmy($self,$path,$rev) = @_;\n+\t$path =~ s#^/*##;\n \tmy ($dirents,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \treturn $dirents;\n@@ -354,6 +357,7 @@ open BRANCHES,\">>\", \"$git_dir/svn2git\";\n sub node_kind($$) {\n \tmy ($svnpath, $revision) = @_;\n \tmy $pool=SVN::Pool->new;\n+\t$svnpath =~ s#^/*##;\n \tmy $kind = $svn->{'svn'}->check_path($svnpath,$revision,$pool);\n \t$pool->clear;\n \treturn $kind;\n\n\nAnd it works up to now.\n\nThis is the same patch as recently posted to Daniel. Could you try?\n\n"},{"id":"297311","messageId":"1166130300.21982.0.camel@systems03.lan.brontes3d.com","threadId":"6257","inReplyTo":"20061214022142.GA14521@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Daniel Drake","fromEmail":"ddrake@brontes3d.com","sentAt":"2006-12-14T21:05:00Z","receivedAt":"2006-12-14T21:05:00Z","isPatch":false,"sender":{"key":"ddrake@brontes3d.com","avatar":null},"body":"On Thu, 2006-12-14 at 04:21 +0200, Sasha Khapyorsky wrote:\n> Try this please:\n> \n> \n> diff --git a/git-svnimport.perl b/git-svnimport.perl\n> index cbaa8ab..071777b 100755\n> --- a/git-svnimport.perl\n> +++ b/git-svnimport.perl\n\nThanks, it now works for both forms of command line arguments.\n\n-- \nDaniel Drake\nBrontes Technologies, A 3M Company\n"},{"id":"295775","messageId":"20061214212033.GG7838@sashak.voltaire.com","threadId":"6257","inReplyTo":"1166130300.21982.0.camel@systems03.lan.brontes3d.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-14T21:20:33Z","receivedAt":"2006-12-14T21:20:33Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 16:05 Thu 14 Dec     , Daniel Drake wrote:\n> On Thu, 2006-12-14 at 04:21 +0200, Sasha Khapyorsky wrote:\n> > Try this please:\n> > \n> > \n> > diff --git a/git-svnimport.perl b/git-svnimport.perl\n> > index cbaa8ab..071777b 100755\n> > --- a/git-svnimport.perl\n> > +++ b/git-svnimport.perl\n> \n> Thanks, it now works for both forms of command line arguments.\n\nThanks for reporting. I still run git-svnimport against\nhttp://tortoisesvn.tigris.org/svn/tortoisesvn, works fine up to now.\n\n"},{"id":"295940","messageId":"7vejr217v7.fsf@assigned-by-dhcp.cox.net","threadId":"6257","inReplyTo":"20061214212033.GG7838@sashak.voltaire.com","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-14T21:32:28Z","receivedAt":"2006-12-14T21:32:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sasha Khapyorsky <sashak@voltaire.com> writes:\n\n> On 16:05 Thu 14 Dec     , Daniel Drake wrote:\n>> On Thu, 2006-12-14 at 04:21 +0200, Sasha Khapyorsky wrote:\n>> > Try this please:\n>> > \n>> > \n>> > diff --git a/git-svnimport.perl b/git-svnimport.perl\n>> > index cbaa8ab..071777b 100755\n>> > --- a/git-svnimport.perl\n>> > +++ b/git-svnimport.perl\n>> \n>> Thanks, it now works for both forms of command line arguments.\n>\n> Thanks for reporting. I still run git-svnimport against\n> http://tortoisesvn.tigris.org/svn/tortoisesvn, works fine up to now.\n\nAn applicable version of the patch with proposed commit log\nmessage would be much appreciated.\n"},{"id":"298191","messageId":"20061214214327.GH7838@sashak.voltaire.com","threadId":"6257","inReplyTo":"7vejr217v7.fsf@assigned-by-dhcp.cox.net","subject":"Re: git-svnimport breakage as of git-1.4.4","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2006-12-14T21:43:27Z","receivedAt":"2006-12-14T21:43:27Z","isPatch":false,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"On 13:32 Thu 14 Dec     , Junio C Hamano wrote:\n> >\n> > Thanks for reporting. I still run git-svnimport against\n> > http://tortoisesvn.tigris.org/svn/tortoisesvn, works fine up to now.\n> \n> An applicable version of the patch with proposed commit log\n> message would be much appreciated.\n\nSure.\n\nWanted at least to finish the test (it is running yet), then will\nsubmit the patch in conventional way.\n\n"},{"id":"30989","messageId":"20070107002210.GC16771@sashak.voltaire.com","threadId":"6257","inReplyTo":"20061214214327.GH7838@sashak.voltaire.com","subject":"[PATCH] git-svnimport: clean svn path when accessing SVN repo","fromName":"Sasha Khapyorsky","fromEmail":"sashak@voltaire.com","sentAt":"2007-01-07T00:22:10Z","receivedAt":"2007-01-07T00:22:10Z","isPatch":true,"sender":{"key":"sashak@voltaire.com","avatar":null},"body":"Clean svn path from leading '/' when accessing SVN repo.\n\nSigned-off-by: Sasha Khapyorsky <sashak@voltaire.com>\n---\n\nThis fixes git-svnimport problems reported in this thread (\"git-svnimport\nbreakage as of git-1.4.4\"). Finally I forgot to submit this then, sorry\nabout that.\n\n git-svnimport.perl |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svnimport.perl b/git-svnimport.perl\nindex cbaa8ab..071777b 100755\n--- a/git-svnimport.perl\n+++ b/git-svnimport.perl\n@@ -146,6 +146,7 @@ sub file {\n \tprint \"... $rev $path ...\\n\" if $opt_v;\n \tmy (undef, $properties);\n \tmy $pool = SVN::Pool->new();\n+\t$path =~ s#^/*##;\n \teval { (undef, $properties)\n \t\t   = $self->{'svn'}->get_file($path,$rev,$fh,$pool); };\n \t$pool->clear;\n@@ -181,6 +182,7 @@ sub ignore {\n \tmy($self,$path,$rev) = @_;\n \n \tprint \"... $rev $path ...\\n\" if $opt_v;\n+\t$path =~ s#^/*##;\n \tmy (undef,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \tif (exists $properties->{'svn:ignore'}) {\n@@ -197,6 +199,7 @@ sub ignore {\n \n sub dir_list {\n \tmy($self,$path,$rev) = @_;\n+\t$path =~ s#^/*##;\n \tmy ($dirents,undef,$properties)\n \t    = $self->{'svn'}->get_dir($path,$rev,undef);\n \treturn $dirents;\n@@ -354,6 +357,7 @@ open BRANCHES,\">>\", \"$git_dir/svn2git\";\n sub node_kind($$) {\n \tmy ($svnpath, $revision) = @_;\n \tmy $pool=SVN::Pool->new;\n+\t$svnpath =~ s#^/*##;\n \tmy $kind = $svn->{'svn'}->check_path($svnpath,$revision,$pool);\n \t$pool->clear;\n \treturn $kind;\n-- \n1.5.0.rc0.g2484-dirty\n"}]}