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

Re: [PATCH] Trim leading / off of paths in git-svn prop_walk

From
EWEric Wong <normalperson@yhbt.net>
Date
Jan 9, 2008, 22:55 UTC
Message-ID
<20080109225532.GA31363@untitled>
In-Reply-To
<7v63y2hg8x.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Kevin Ballard <kevin@sb.org> writes:
> 
> > prop_walk adds a leading / to all subdirectory paths. Unfortunately
> > this causes a problem when the remote repo lives in a subdirectory itself,
> > as the leading / causes subsequent PROPFIND calls to be executed on
> > the wrong path. Trimming the / before calling the PROPFIND fixes this problem.
> >
> > Signed-off-by: Kevin Ballard <kevin@sb.org>
> 
> Eric, the change is very limited in scope (only the parameter to
> ra->get_dir() changes) so I can apply myself, if you agree this
> is a trivially correct fix.  I just do not know svn-perl
> interface well enough to judge.

Yes it is. It appears this regression was introduced in 01bdab84e31763a98206c31cf99b9dc3cb221356 so yes, it's trivially correct :)

Acked-by: Eric Wong <normalperson@yhbt.net>
Show 20 quoted lines
> 
> > All tests passed after this change, but since it seems to only apply
> > to WebDAV SVN repos I saw no way to add a new test.
> >  git-svn.perl |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/git-svn.perl b/git-svn.perl
> > index 3308fe1..d5316eb 100755
> > --- a/git-svn.perl
> > +++ b/git-svn.perl
> > @@ -1858,6 +1858,7 @@ sub rel_path {
> >  sub prop_walk {
> >  	my ($self, $path, $rev, $sub) = @_;
> >  
> > +	$path =~ s#^/##;
> >  	my ($dirent, undef, $props) = $self->ra->get_dir($path, $rev);
> >  	$path =~ s#^/*#/#g;
> >  	my $p = $path;
> > -- 
> > 1.5.4.rc2.68.ge708a-dirty
-- 
Eric Wong
Previous: Junio C Hamano
Message 3 of 3 in “Trim leading / off of paths in git-svn prop_walk”
  1. Trim leading / off of paths in git-svn prop_walkKevin Ballard, Jan 9, 2008
  2. Junio C HamanoJan 9, 2008
  3. Eric WongJan 9, 2008

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.