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

Re: [PATCH/rfc] git-svn.perl: workaround assertions in svn library 1.5.0

From
EWEric Wong <normalperson@yhbt.net>
Date
Jul 7, 2008, 09:06 UTC
Message-ID
<20080707090605.GA20731@untitled>
In-Reply-To
<20080706192850.32547.qmail@4480698c45f1ed.315fe32.mid.smarden.org>
Gerrit Pape <pape@smarden.org> wrote:
Show 19 quoted lines
> With subversion 1.5.0 (C and perl libraries) the git-svn selftest
> t9101-git-svn-props.sh fails at test 25 and 26.  The following commands
> cause assertions in the svn library
> 
>  $ cd deeply
>  $ git-svn propget svn:ignore .
>  perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
>  Aborted
> 
>  $ git-svn propget svn:ignore ..
>  perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_subr/path.c:120: svn_path_join: Assertion `is_canonical(component, clen)' failed.
> 
> With this commit, git-svn makes sure the path doesn't start with a
> slash, and is not a dot, working around these assertions.
> 
> The breakage was reported by Lucas Nussbaum through
>  http://bugs.debian.org/489108
> 
> Signed-off-by: Gerrit Pape <pape@smarden.org>
Thanks Gerrit,
This works with svn 1.4.3 here
Acked-by: Eric Wong <normalperson@yhbt.net>
Show 25 quoted lines
> ---
>  git-svn.perl |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> I ran into this on Debian/unstable.  With svn 1.5.0 the selftest fails
> without the patch, with svn 1.4.6 it succeeds with and without the
> patch.  I'm not familar with the svn interfaces, not sure whether this
> is a regression in subversion, or a bug in git-svn.
> 
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index f789a6e..a366c89 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -643,6 +643,8 @@ sub canonicalize_path {
>  	$path =~ s#/[^/]+/\.\.##g;
>  	$path =~ s#/$##g;
>  	$path =~ s#^\./## if $dot_slash_added;
> +	$path =~ s#^/##;
> +	$path =~ s#^\.$##;
>  	return $path;
>  }
>  
> -- 
> 1.5.6
Previous: Gerrit PapeNext: Gerrit Pape
Message 2 of 8 in “git-svn.perl: workaround assertions in svn library 1.5.0”
  1. git-svn.perl: workaround assertions in svn library 1.5.0Gerrit Pape, Jul 6, 2008
  2. Eric WongJul 7, 2008
  3. Gerrit PapeJul 17, 2008
  4. Dmitry PotapovJul 17, 2008
  5. Junio C HamanoJul 20, 2008
  6. Dmitry PotapovJul 20, 2008
  7. Eric WongJul 21, 2008
  8. Junio C HamanoJul 21, 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.