{"thread":{"id":"8728","subject":"git-svn dcommit fails if the URL has spaces in it","startedAt":"2007-06-26T11:24:10Z","lastAt":"2007-07-03T09:49:52Z","messageCount":2,"participants":["Rogan Dawes"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45830","messageId":"4680F75A.9010704@dawes.za.net","threadId":"8728","inReplyTo":null,"subject":"git-svn dcommit fails if the URL has spaces in it","fromName":"Rogan Dawes","fromEmail":"lists@dawes.za.net","sentAt":"2007-06-26T11:24:10Z","receivedAt":"2007-06-26T11:24:10Z","isPatch":false,"sender":{"key":"lists@dawes.za.net","avatar":null},"body":"Hi folks,\n\nI used git-svn to clone the webgoat repository at GoogleCode. As \nmentioned at the time, for some bizarre reason, I ended up getting a \ndirectory with a space character in it.\n\nSee http://article.gmane.org/gmane.comp.version-control.git/49179\n\nIn order to get a checkout that looks the same as the SVN checkout, I \nhad to use a command line like:\n\ngit-svn clone -T \"trunk/ webgoat\" https://webgoat.googlecode.com/svn/\n\nUnfortunately, this results in git-svn-id metadata entries in the \ncommits that look like:\n\ngit-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@2 \n4033779f-a91e-0410-96ef-6bf7bf53c507\n\n(Should be all on one line). As you can see, the space has made it \nthrough into the git-svn-id. Which then breaks this pattern match in \ngit-svn:extract_metadata:\n\nmy ($url, $rev, $uuid) = ($id =~ /^git-svn-id:\\s(\\S+?)\\@(\\d+)\n                                                 \\s([a-f\\d\\-]+)$/x);\n\nUnfortunately, hacking it to ignore the space doesn't help either, as I \nthen get:\n\n[rdawes@lucas webgoat]$ git-svn --username=rogan.dawes dcommit\nID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 \n4033779f-a91e-0410-96ef-6bf7bf53c507\nID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 \n4033779f-a91e-0410-96ef-6bf7bf53c507\nRA layer request failed: PROPFIND request failed on '/svn/trunk/ \nwebgoat': PROPFIND of '/svn/trunk/ webgoat': 400 Bad Request \n(https://webgoat.googlecode.com) at /home/rdawes/bin/git-svn line 406\n\nWhich is entirely unsurprising, since I suspect that the URL was not \nbeing quoted/escaped correctly, and we were sending something like:\n\nPROPFIND /svn/trunk/ webgoat/ HTTP/1.0\n\nWhich is clearly illegal, having an additional field.\n\nHowever, I tried encoding the space to %20, and got back to my original \nproblem, i.e.\n\nUnable to determine upstream SVN information from HEAD history\n\nIf I run \"git-svn -n dcommit\", however, it does print out a list of \n\"diff-tree <sha>~1 <sha>\" entries.\n\nAt this point, I am pretty well stuck. Any suggestions would be much \nappreciated.\n\nRegards,\n\nRogan Dawes\n"},{"id":"46343","messageId":"468A1BC0.5080302@dawes.za.net","threadId":"8728","inReplyTo":"4680F75A.9010704@dawes.za.net","subject":"Re: git-svn dcommit fails if the URL has spaces in it","fromName":"Rogan Dawes","fromEmail":"lists@dawes.za.net","sentAt":"2007-07-03T09:49:52Z","receivedAt":"2007-07-03T09:49:52Z","isPatch":false,"sender":{"key":"lists@dawes.za.net","avatar":null},"body":"Rogan Dawes wrote:\n> Hi folks,\n> \n> I used git-svn to clone the webgoat repository at GoogleCode. As \n> mentioned at the time, for some bizarre reason, I ended up getting a \n> directory with a space character in it.\n> \n> See http://article.gmane.org/gmane.comp.version-control.git/49179\n> \n> In order to get a checkout that looks the same as the SVN checkout, I \n> had to use a command line like:\n> \n> git-svn clone -T \"trunk/ webgoat\" https://webgoat.googlecode.com/svn/\n> \n> Unfortunately, this results in git-svn-id metadata entries in the \n> commits that look like:\n> \n> git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@2 \n> 4033779f-a91e-0410-96ef-6bf7bf53c507\n> \n> (Should be all on one line). As you can see, the space has made it \n> through into the git-svn-id. Which then breaks this pattern match in \n> git-svn:extract_metadata:\n> \n> my ($url, $rev, $uuid) = ($id =~ /^git-svn-id:\\s(\\S+?)\\@(\\d+)\n>                                                 \\s([a-f\\d\\-]+)$/x);\n> \n> Unfortunately, hacking it to ignore the space doesn't help either, as I \n> then get:\n> \n> [rdawes@lucas webgoat]$ git-svn --username=rogan.dawes dcommit\n> ID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 \n> 4033779f-a91e-0410-96ef-6bf7bf53c507\n> ID = git-svn-id: https://webgoat.googlecode.com/svn/trunk/ webgoat@125 \n> 4033779f-a91e-0410-96ef-6bf7bf53c507\n> RA layer request failed: PROPFIND request failed on '/svn/trunk/ \n> webgoat': PROPFIND of '/svn/trunk/ webgoat': 400 Bad Request \n> (https://webgoat.googlecode.com) at /home/rdawes/bin/git-svn line 406\n> \n> Which is entirely unsurprising, since I suspect that the URL was not \n> being quoted/escaped correctly, and we were sending something like:\n> \n> PROPFIND /svn/trunk/ webgoat/ HTTP/1.0\n> \n> Which is clearly illegal, having an additional field.\n> \n> However, I tried encoding the space to %20, and got back to my original \n> problem, i.e.\n> \n> Unable to determine upstream SVN information from HEAD history\n> \n> If I run \"git-svn -n dcommit\", however, it does print out a list of \n> \"diff-tree <sha>~1 <sha>\" entries.\n> \n> At this point, I am pretty well stuck. Any suggestions would be much \n> appreciated.\n> \n> Regards,\n> \n> Rogan Dawes\n\nAnyone got any ideas?\n\nRogan\n"}]}