Re: [PATCH] git-svn: URL-decode the left-hand side of an svn refspec
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Aug 4, 2010, 08:38 UTC
- Message-ID
- <20100804083840.GA19367@dcvr.yhbt.net>
- In-Reply-To
- <1280877685-4928-1-git-send-email-stevenrwalter@gmail.com>
Steven Walter <stevenrwalter@gmail.com> wrote:
Show 6 quoted lines
> From: Steven Walter <swalter@lpdev.prtdev.lexmark.com> > > This change allows git-svn to handle an URL with colons in the path > --- > git-svn.perl | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-)
Thanks Steven.
Since git-svn already has a uri_decode() function, we should use that. The decoding should apply to the local portion of branches/tags globs, too. Does the following work for you?
diff --git a/git-svn.perl b/git-svn.perl index 8d2ef3d..34884b8 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1820,6 +1820,7 @@ sub read_all_remotes { die("svn-remote.$remote: remote ref '$remote_ref' " . "must start with 'refs/'\n") unless $remote_ref =~ m{^refs/}; + $local_ref = uri_decode($local_ref); $r->{$remote}->{fetch}->{$local_ref} = $remote_ref; $r->{$remote}->{svm} = {} if $use_svm_props; } elsif (m!^(.+)\.usesvmprops=\s*(.*)\s*$!) { @@ -1832,6 +1833,7 @@ sub read_all_remotes { die("svn-remote.$remote: remote ref '$remote_ref' ($t) " . "must start with 'refs/'\n") unless $remote_ref =~ m{^refs/}; + $local_ref = uri_decode($local_ref); my $rs = { t => $t, remote => $remote,
-- Eric Wong