Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15
STALE3708d

[PATCH] Re: git-svn fetch doesn't like spaces in branch names

From: Michael J. Cohen <hidden>
Date: 2016-06-15 22:43:48
Subsystem: the rest · Maintainer: Linus Torvalds

mini:TextMateBundles mjc$ git-svn fetch
Found possible branch point: http://macromates.com/svn/Bundles/trunk/Tools/Dialog 
 PlugIn => http://macromates.com/svn/Bundles/branches/Dialog PlugIn  
Completion Menu, 8089
Initializing parent: Dialog PlugIn Completion Menu@8089
Bad URL passed to RA layer: Malformed URL for repository at /opt/ 
local/bin/git-svn line 1607

looks like that might need to be %20 ?

Hacky, but it works.

Signed-off-by: Michael J. Cohen <redacted>
diff --git a/git-svn.perl b/git-svn.perl
index dd93e32..5dc3b9c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1976,6 +1976,7 @@ sub find_parent_branch {
	my $r = $i->{copyfrom_rev};
	my $repos_root = $self->ra->{repos_root};
	my $url = $self->ra->{url};
+	$branch_from =~ s@([\s])@sprintf("%%%02X", ord($1))@seg;
	my $new_url = $repos_root . $branch_from;
	print STDERR  "Found possible branch point: ",
	              "$new_url => ", $self->full_url, ", $r\n";
-- 
1.5.3.5.1590.gfadfad-dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help