git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rogan Dawes <lists@dawes.za.net>
To: unlisted-recipients:; (no To-header on input)
Cc: Git Mailing List <git@vger.kernel.org>,
	Eric Wong <normalperson@yhbt.net>
Subject: Re: git-svn dcommit fails if the URL has spaces in it
Date: Tue, 03 Jul 2007 11:49:52 +0200	[thread overview]
Message-ID: <468A1BC0.5080302@dawes.za.net> (raw)
In-Reply-To: <4680F75A.9010704@dawes.za.net>

Rogan Dawes wrote:
> Hi folks,
> 
> I used git-svn to clone the webgoat repository at GoogleCode. As 
> mentioned at the time, for some bizarre reason, I ended up getting a 
> directory with a space character in it.
> 
> See http://article.gmane.org/gmane.comp.version-control.git/49179
> 
> In order to get a checkout that looks the same as the SVN checkout, I 
> had to use a command line like:
> 
> git-svn clone -T "trunk/ webgoat" https://webgoat.googlecode.com/svn/
> 
> Unfortunately, this results in git-svn-id metadata entries in the 
> commits that look like:
> 
> git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@2 
> 4033779f-a91e-0410-96ef-6bf7bf53c507
> 
> (Should be all on one line). As you can see, the space has made it 
> through into the git-svn-id. Which then breaks this pattern match in 
> git-svn:extract_metadata:
> 
> my ($url, $rev, $uuid) = ($id =~ /^git-svn-id:\s(\S+?)\@(\d+)
>                                                 \s([a-f\d\-]+)$/x);
> 
> Unfortunately, hacking it to ignore the space doesn't help either, as I 
> then get:
> 
> [rdawes@lucas webgoat]$ git-svn --username=rogan.dawes dcommit
> ID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 
> 4033779f-a91e-0410-96ef-6bf7bf53c507
> ID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 
> 4033779f-a91e-0410-96ef-6bf7bf53c507
> RA layer request failed: PROPFIND request failed on '/svn/trunk/ 
> webgoat': PROPFIND of '/svn/trunk/ webgoat': 400 Bad Request 
> (https://webgoat.googlecode.com) at /home/rdawes/bin/git-svn line 406
> 
> Which is entirely unsurprising, since I suspect that the URL was not 
> being quoted/escaped correctly, and we were sending something like:
> 
> PROPFIND /svn/trunk/ webgoat/ HTTP/1.0
> 
> Which is clearly illegal, having an additional field.
> 
> However, I tried encoding the space to %20, and got back to my original 
> problem, i.e.
> 
> Unable to determine upstream SVN information from HEAD history
> 
> If I run "git-svn -n dcommit", however, it does print out a list of 
> "diff-tree <sha>~1 <sha>" entries.
> 
> At this point, I am pretty well stuck. Any suggestions would be much 
> appreciated.
> 
> Regards,
> 
> Rogan Dawes

Anyone got any ideas?

Rogan

      reply	other threads:[~2007-07-03  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26 11:24 git-svn dcommit fails if the URL has spaces in it Rogan Dawes
2007-07-03  9:49 ` Rogan Dawes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468A1BC0.5080302@dawes.za.net \
    --to=lists@dawes.za.net \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).