threads / discuss / 23949

Problems with git-svn and space in the URL

Subject: Problems with git-svn and space in the URL

## tl;dr

3 messages between May 31, 2010 and Sep 28, 2011.

replies: 2people: 2as markdown or json

Marc Van Olmen· May 31, 2010, 03:05 UTC · lore
Hi,
First time user.
Was trying to do a commit back to the svn repository: The svn repo has a space in the main project name:
When I try to commit, got this:

Quad-Raid-2:OnTheAir%20Video copy marcvano$ git svn dcommit Committing to http://ns1.softronmedia.com/svn/OnTheAir Video/branches/ticket_0004_multiple_playback_buffers ... Filesystem has no item: '/svn/!svn/bc/2643/OnTheAir' path not found at /usr/local/git/libexec/git-core/git-svn line 572

When I run:
Quad-Raid-2:OnTheAir%20Video copy marcvano$ git svn info
Path: .
URL: http://ns1.softronmedia.com/svn/OnTheAir%20Video/branches/ticket_0004_multiple_playback_buffers
Repository Root: http://ns1.softronmedia.com/svn
Repository UUID: 6f96b356-5bf8-4915-87a6-d3080d869cd8
Revision: 2643
Node Kind: directory
Schedule: normal
Last Changed Author: XXXXXX
Last Changed Rev: 2643
Last Changed Date: 2010-05-02 18:01:52 -0400 (Sun, 02 May 2010)
any solution for this problem?
marc
Marc Van Olmen· May 31, 2010, 15:33 UTC · re: Marc Van Olmen · lore

Re: Problems with git-svn and space in the URL

Hi,

Don't think it was a space in URL but something else, haven't conclude what it was. git 1.7.1 svn 1.6.6 svn server 1.6.5

I was doing the following: -------------------------

* git svn clone -s **myserver**/svn/OnTheAir%20Video
* git checkout -b local/ticket_0004_multiple_playback_buffers ticket_0004_multiple_playback_buffers
* git merge master
* resolved all the conflicts (list was huge) several files were renamed and moved. So thanks to git i could resolve it all.
* git commit 
* git svn dcommit ( this gave error below
I resolved the issue by doing a new checkout merge
* git svn clone -s **myserver**/svn/OnTheAir%20Video
* git checkout -b local/ticket_0004_multiple_playback_buffers ticket_0004_multiple_playback_buffers
(Several iterations of:)
 * I took one folder from previous merge above copied this over
 * git commit 
 * git dcommit
After 7 of these steps everything was working fine. 
So it wasn't clear why above wasn't working. Maybe 'git merge master' caused some svn metadata issues?
regards,
marc
On May 30, 2010, at 11:05 PM, Marc Van Olmen wrote:
Show 30 quoted lines
> Hi,
> 
> First time user.
> 
> Was trying to do a commit back to the svn repository: The svn repo has a space in the main project name:
> 
> When I try to commit, got this:
> 
> Quad-Raid-2:OnTheAir%20Video copy marcvano$ git svn dcommit
> Committing to **myserver**/svn/OnTheAir Video/branches/ticket_0004_multiple_playback_buffers ...
> Filesystem has no item: '/svn/!svn/bc/2643/OnTheAir' path not found at /usr/local/git/libexec/git-core/git-svn line 572
> 
> When I run:
> 
> Quad-Raid-2:OnTheAir%20Video copy marcvano$ git svn info
> Path: .
> URL: **myserver**/svn/OnTheAir%20Video/branches/ticket_0004_multiple_playback_buffers
> Repository Root: **myserver**/svn
> Repository UUID: 6f96b356-5bf8-4915-87a6-d3080d869cd8
> Revision: 2643
> Node Kind: directory
> Schedule: normal
> Last Changed Author: XXXXXX
> Last Changed Rev: 2643
> Last Changed Date: 2010-05-02 18:01:52 -0400 (Sun, 02 May 2010)
> 
> 
> any solution for this problem?
> 
> marc
karl· Sep 28, 2011, 14:04 UTC · re: Marc Van Olmen · lore

Re: Problems with git-svn and space in the URL

I was able to work around this issue by patching git-svn.
I updated the url_path function to:
sub url_path {
	my ($self, $path) = @_;
	my $url = $self->{url} . '/' . $self->repo_path($path);
	if ($self->{url} =~ m#^https?://#) {
		$url =~ s!([^~a-zA-Z0-9_./-])!uc sprintf("%%%02x",ord($1))!eg;
                $url =~ s!^(https?)%3A//!$1://!;
	}
    $url
}
This ensures that the spaces in the url are encoded correctly.
It seems to work for me, but hasn't been tested thoroughly.

-- View this message in context: http://git.661346.n2.nabble.com/Problems-with-git-svn-and-space-in-the-URL-tp5120361p6840304.html Sent from the git mailing list archive at Nabble.com.

← back to recent threads