summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2317d28)
raw | patch | inline | side by side (parent: 2317d28)
author | Ulrich Dangel <uli@spamt.net> | |
Fri, 26 Jun 2009 14:52:09 +0000 (16:52 +0200) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 26 Jun 2009 21:08:52 +0000 (14:08 -0700) |
Cloning/initializing svn repositories with an uncanonicalize url
does not work as libsvn throws an assertion. This patch
canonicalize svn uris for the clone and init command from
git-svn.
[ew: fixed trailing whitespace]
Signed-off-by: Ulrich Dangel <uli@spamt.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
does not work as libsvn throws an assertion. This patch
canonicalize svn uris for the clone and init command from
git-svn.
[ew: fixed trailing whitespace]
Signed-off-by: Ulrich Dangel <uli@spamt.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 6c42e2afca8f0fdc699fe36b866050f20e8a7f1a..d1af1a3d2f1e24c068e227f847ccceb7e156ad0d 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
}
my $url = shift or die "SVN repository location required ",
"as a command-line argument\n";
+ $url = canonicalize_url($url);
init_subdir(@_);
do_git_init_db();
return $path;
}
+sub canonicalize_url {
+ my ($url) = @_;
+ $url =~ s#^([^:]+://[^/]*/)(.*)$#$1 . canonicalize_path($2)#e;
+ return $url;
+}
+
# get_svnprops(PATH)
# ------------------
# Helper for cmd_propget and cmd_proplist below.
$_prefix = '' unless defined $_prefix;
if (defined $url) {
- $url =~ s#/+$##;
+ $url = canonicalize_url($url);
init_subdir(@_);
}
do_git_init_db();