Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-svn.perl: workaround assertions in svn library 1.5.0
author
Gerrit Pape
<pape@smarden.org>
Sun, 6 Jul 2008 19:28:50 +0000
(19:28 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 7 Jul 2008 19:56:16 +0000
(12:56 -0700)
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>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-svn.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
6fc2a25
)
diff --git
a/git-svn.perl
b/git-svn.perl
index f789a6eeca12ed34e6ef3746c3062e56f791d7e9..a366c891dc9892550093f0bb760d5d2580eb11cd 100755
(executable)
--- 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#/[^/]+/\.\.##g;
$path =~ s#/$##g;
$path =~ s#^\./## if $dot_slash_added;
+ $path =~ s#^/##;
+ $path =~ s#^\.$##;
return $path;
}
return $path;
}