{"thread":{"id":"13683","subject":"[PATCH] git-svn fails in prop_walk if $self->{path} is not empty","startedAt":"2008-05-27T08:46:55Z","lastAt":"2008-05-27T22:54:02Z","messageCount":2,"participants":["Gerrit Pape","Nikolaus Schulz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"77835","messageId":"20080527084655.20379.qmail@5bba46d46c095e.315fe32.mid.smarden.org","threadId":"13683","inReplyTo":null,"subject":"[PATCH] git-svn fails in prop_walk if $self->{path} is not empty","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-05-27T08:46:55Z","receivedAt":"2008-05-27T08:46:55Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"From: Christian Engwer <christi@uni-hd.de>\n\nIf url://repo/trunk is the current Git branch, prop_walk strips trunk\nfrom the path name. That is useful as, for example \"git svn show-ignore\"\nshould not return results like\n\ntrunk/foo\n\nbut\n\nfoo\n\nif svn:ignore for trunk includes foo.\n\nThe problem now is that prop_walk strips trunk from the path and then\ncalls itself recursively. But now trunk is missing in the path and\nget_dir fails, because it is called for a non existing path.\n\nThe attached patch fixed the problem, by adding the priviously stipped\n$self->{path} in the recursive call. I tested it with my current\ngit-svn repository for the commands show-ignore and show-external.\n\nPatch was submitted through\n http://bugs.debian.org/477393\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n\nI'm not that much a git-svn user, and didn't test this thoroughly.  I'd\nbe happy if anyone could crossread/test this, and maybe add a Acked-By.\n\nThanks, Gerrit.\n\n\n git-svn.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 37976f2..72fef16 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1918,7 +1918,7 @@ sub prop_walk {\n \n \tforeach (sort keys %$dirent) {\n \t\tnext if $dirent->{$_}->{kind} != $SVN::Node::dir;\n-\t\t$self->prop_walk($p . $_, $rev, $sub);\n+\t\t$self->prop_walk($self->{path} . $p . $_, $rev, $sub);\n \t}\n }\n \n-- \n1.5.5.1\n"},{"id":"77899","messageId":"20080527225402.GA25550@penelope.zusammrottung.local","threadId":"13683","inReplyTo":"20080527084655.20379.qmail@5bba46d46c095e.315fe32.mid.smarden.org","subject":"Re: [PATCH] git-svn fails in prop_walk if $self->{path} is not empty","fromName":"Nikolaus Schulz","fromEmail":"microschulz@web.de","sentAt":"2008-05-27T22:54:02Z","receivedAt":"2008-05-27T22:54:02Z","isPatch":true,"sender":{"key":"microschulz@web.de","avatar":null},"body":"Happy coincidence!\n\nThis patch happens to fix my problem posted in \"git-svn\n{show,create}-ignore chokes upon subdirs\" today. \n\nNikolaus\n\nOn Tue, May 27, 2008 at 08:46:55AM +0000, Gerrit Pape wrote:\n> From: Christian Engwer <christi@uni-hd.de>\n> \n> The problem now is that prop_walk strips trunk from the path and then\n> calls itself recursively. But now trunk is missing in the path and\n> get_dir fails, because it is called for a non existing path.\n> \n> The attached patch fixed the problem, by adding the priviously stipped\n> $self->{path} in the recursive call. \n> git-svn repository for the commands show-ignore and show-external.\n> \n> Patch was submitted through\n>  http://bugs.debian.org/477393\n> \n> Signed-off-by: Gerrit Pape <pape@smarden.org>\n> ---\n> \n> I'm not that much a git-svn user, and didn't test this thoroughly.  I'd\n> be happy if anyone could crossread/test this, and maybe add a Acked-By.\n> \n> Thanks, Gerrit.\n> \n> \n>  git-svn.perl |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 37976f2..72fef16 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -1918,7 +1918,7 @@ sub prop_walk {\n>  \n>  \tforeach (sort keys %$dirent) {\n>  \t\tnext if $dirent->{$_}->{kind} != $SVN::Node::dir;\n> -\t\t$self->prop_walk($p . $_, $rev, $sub);\n> +\t\t$self->prop_walk($self->{path} . $p . $_, $rev, $sub);\n>  \t}\n>  }\n"}]}