{"thread":{"id":"28826","subject":"(unknown)","startedAt":"2011-11-02T16:38:14Z","lastAt":"2012-07-16T20:05:06Z","messageCount":11,"participants":["Ben Walton","Jonathan Nieder","Eric Wong","Michael Witten"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"178698","messageId":"1320251895-6348-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"28826","inReplyTo":null,"subject":"(unknown)","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-11-02T16:38:14Z","receivedAt":"2011-11-02T16:38:14Z","isPatch":false,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Hi Eric,\n\nWhen running the test suite against subversion 1.7 on solaris, t9134\nwas failing with an assertion failure in the SVN bindings and a\nsubsequent core dump from perl.\n\nThe behaviour of 1.7 has seemingly changed such that even file paths\nmust be eascaped/canonicalized now.  The core dump behaviour is\nsomething that still needs to be investigated with the subversion\nfolks.  A colleague and I will push that on their side.\n\nSee the initial discussion of this issue on the svn list here:\nhttp://article.gmane.org/gmane.comp.version-control.subversion.devel/132227\n\nWith the following patch, the test suite once again passes.  I don't\nknow how it will behave against an older client though so maybe a\nconditional check for the version of the bindings is still required?\n\nThanks\n-Ben\n\nFrom: Ben Walton <bwalton@artsci.utoronto.ca>\nSubject: \nIn-Reply-To: \n"},{"id":"178699","messageId":"1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca","threadId":"28826","inReplyTo":"1320251895-6348-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"[PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-11-02T16:38:15Z","receivedAt":"2011-11-02T16:38:15Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Previously only http/https URL's were uri escaped.  When building\nagainst subversion 1.7, this was causing a segfault in perl after\nan assertion failure in the SVN::Ra bindings during in t9134.\n\nChanging 'trash directory' to 'trash_directory' worked around the\nproblem.\n\nAfter a colleague reported this problem to the subversion list, it\nwas determined that the problem is in git, not svn.[1]  The SVN code\nexpects URL's and paths to be pre-escaped.\n\nWe now also escape file:// URL's in the Git::SVN::Ra->escape_url\ncode path.\n\n[1] http://news.gmane.org/gmane.comp.version-control.subversion.devel\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n git-svn.perl |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 351e743..b00c188 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -5366,6 +5366,9 @@ sub escape_url {\n \tif ($url =~ m#^(https?)://([^/]+)(.*)$#) {\n \t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n \t\t$url = \"$scheme://$domain$uri\";\n+\t} elsif ($url =~ m#^(file)://(.*)$#) {\n+\t\tmy ($scheme, $uri) = ($1, escape_uri_only($2));\n+\t\t$url = \"$scheme://$uri\";\n \t}\n \t$url;\n }\n-- \n1.7.7.1\n"},{"id":"178706","messageId":"20111102182015.GA11401@elie.hsd1.il.comcast.net","threadId":"28826","inReplyTo":"1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-11-02T18:20:38Z","receivedAt":"2011-11-02T18:20:38Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nBen Walton wrote:\n\n> After a colleague reported this problem to the subversion list, it\n> was determined that the problem is in git, not svn.[1]  The SVN code\n> expects URL's and paths to be pre-escaped.\n\nThanks for your work on this!  I'm not really sure how one can decide\nthat the problem is not in svn --- some existing functions changed ABI\nin such a way as to break existing applications and require code\nchanges and a recompile.  It would be better for Subversion to\nsilently fix up paths provided by bad callers, or at least to return a\nsensible error code.\n\nSo the problem is that nobody who cared was testing prereleases of\nsubversion and reporting bugs early enough for it to get this fixed\nbefore the 1.7 release.  But yes, that's water under the bridge and\ngit-svn (and libsvn-perl, and pysvn, and ...) should just adjust to\nthe new world order.\n\n> [1] http://news.gmane.org/gmane.comp.version-control.subversion.devel\n\nDo you mean\nhttp://thread.gmane.org/gmane.comp.version-control.subversion.devel/132250\n?\n\n> Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n> ---\n>  git-svn.perl |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n\nSounds sensible in principle, though I haven't checked the patch in\ndetail.  When I run \"make test\" with svn 1.7 with this patch applied,\nI get the following result, unfortunately:\n\n| expecting success: \n|         git svn clone -s \"$svnrepo\" g &&\n|         (\n|                 cd g &&\n|                 test x`git rev-parse --verify refs/remotes/trunk^0` = \\\n|                      x`git rev-parse --verify refs/heads/master^0`\n|         )\n|\n| Initialized empty Git repository in /home/jrn/src/git2/t/trash directory.t9145-git-svn-master-branch/g/.git/\n| Using higher level of URL: file:///home/jrn/src/git2/t/trash directory.t9145-git-svn-master-branch/svnrepo => file:///home/jrn/src/git2/t/trash%20directory.t9145-git-svn-master-branch/svnrepo\n| svn-remote.svn: remote ref '///home/jrn/src/git2/t/trash directory.t9145-git-svn-master-branch/svnrepo/trunk:refs/remotes/trunk' must start with 'refs/'\n|\n| not ok - 2 git svn clone --stdlayout sets up trunk as master\n| #\n| #               git svn clone -s \"$svnrepo\" g &&\n| #               (\n| #                       cd g &&\n| #                       test x`git rev-parse --verify refs/remotes/trunk^0` = \\\n| #                            x`git rev-parse --verify refs/heads/master^0`\n| #               )\n| #\n|\n| # failed 1 among 2 test(s)\n| 1..2\n| make[3]: *** [t9145-git-svn-master-branch.sh] Error 1\n\nDoes it work for you?  This is with a merge of git 1.7.8-rc0 and 1.7.7.2.\n"},{"id":"178709","messageId":"1320260449-sup-479@pinkfloyd.chass.utoronto.ca","threadId":"28826","inReplyTo":"20111102182015.GA11401@elie.hsd1.il.comcast.net","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-11-02T19:05:00Z","receivedAt":"2011-11-02T19:05:00Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Jonathan Nieder's message of Wed Nov 02 14:20:38 -0400 2011:\n\n> Thanks for your work on this!  I'm not really sure how one can\n> decide that the problem is not in svn --- some existing functions\n> changed ABI in such a way as to break existing applications and\n> require code changes and a recompile.  It would be better for\n> Subversion to silently fix up paths provided by bad callers, or at\n> least to return a sensible error code.\n\nYes, my apologies.  I wrote this commit message before fully realizing\njust how wrong the response on the svn list was.  It core dumps, after\nall...If the patch is useful, I'll resubmit with a better commit\nmessage.\n\n> So the problem is that nobody who cared was testing prereleases of\n> subversion and reporting bugs early enough for it to get this fixed\n> before the 1.7 release.  But yes, that's water under the bridge and\n> git-svn (and libsvn-perl, and pysvn, and ...) should just adjust to\n> the new world order.\n> \n> > [1] http://news.gmane.org/gmane.comp.version-control.subversion.devel\n> \n> Do you mean\n> http://thread.gmane.org/gmane.comp.version-control.subversion.devel/132250\n> ?\n\nNo, the link should have been:\nhttp://article.gmane.org/gmane.comp.version-control.subversion.devel/132227\n\nI'm not sure how it got mangled like that.\n\n> | # failed 1 among 2 test(s)\n> | 1..2\n> | make[3]: *** [t9145-git-svn-master-branch.sh] Error 1\n> \n> Does it work for you?  This is with a merge of git 1.7.8-rc0 and\n> 1.7.7.2.\n\nYikes...I had svn tests turned off in my global build script still and\nonly validated this against t9134.  My apologies.  I'll submit\nsomething proper later this evening.  (Assuming I get a working patch\nthat passes the whole suite.)\n\nSorry for the clumsy patch.\n\nThanks\n-Ben\n\n\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"},{"id":"178728","messageId":"20111102220941.GA3925@dcvr.yhbt.net","threadId":"28826","inReplyTo":"1320260449-sup-479@pinkfloyd.chass.utoronto.ca","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2011-11-02T22:09:41Z","receivedAt":"2011-11-02T22:09:41Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Ben Walton <bwalton@artsci.utoronto.ca> wrote:\n> Sorry for the clumsy patch.\n\nI don't have much time to help you fix it, but I got numerous errors on\nSVN 1.6.x (svn 1.6.12).  Can you make sure things continue to work on\n1.6 and earlier, also?\n\nMaybe just enable the escaping for file:// on >= SVN 1.7\n\nHere are the tests that failed for me:\n\nmake[1]: *** [t9100-git-svn-basic.sh] Error 1\nmake[1]: *** [t9103-git-svn-tracked-directory-removed.sh] Error 1\nmake[1]: *** [t9104-git-svn-follow-parent.sh] Error 1\nmake[1]: *** [t9105-git-svn-commit-diff.sh] Error 1\nmake[1]: *** [t9107-git-svn-migrate.sh] Error 1\nmake[1]: *** [t9108-git-svn-glob.sh] Error 1\nmake[1]: *** [t9109-git-svn-multi-glob.sh] Error 1\nmake[1]: *** [t9110-git-svn-use-svm-props.sh] Error 1\nmake[1]: *** [t9111-git-svn-use-svnsync-props.sh] Error 1\nmake[1]: *** [t9114-git-svn-dcommit-merge.sh] Error 1\nmake[1]: *** [t9116-git-svn-log.sh] Error 1\nmake[1]: *** [t9117-git-svn-init-clone.sh] Error 1\nmake[1]: *** [t9118-git-svn-funky-branch-names.sh] Error 1\nmake[1]: *** [t9120-git-svn-clone-with-percent-escapes.sh] Error 1\nmake[1]: *** [t9125-git-svn-multi-glob-branch-names.sh] Error 1\nmake[1]: *** [t9127-git-svn-partial-rebuild.sh] Error 1\nmake[1]: *** [t9128-git-svn-cmd-branch.sh] Error 1\nmake[1]: *** [t9130-git-svn-authors-file.sh] Error 1\nmake[1]: *** [t9135-git-svn-moved-branch-empty-file.sh] Error 1\nmake[1]: *** [t9136-git-svn-recreated-branch-empty-file.sh] Error 1\nmake[1]: *** [t9141-git-svn-multiple-branches.sh] Error 1\nmake[1]: *** [t9145-git-svn-master-branch.sh] Error 1\nmake[1]: *** [t9146-git-svn-empty-dirs.sh] Error 1\nmake[1]: *** [t9150-svk-mergetickets.sh] Error 1\nmake[1]: *** [t9151-svn-mergeinfo.sh] Error 1\nmake[1]: *** [t9153-git-svn-rewrite-uuid.sh] Error 1\nmake[1]: *** [t9154-git-svn-fancy-glob.sh] Error 1\nmake[1]: *** [t9155-git-svn-fetch-deleted-tag.sh] Error 1\nmake[1]: *** [t9156-git-svn-fetch-deleted-tag-2.sh] Error 1\nmake[1]: *** [t9157-git-svn-fetch-merge.sh] Error 1\nmake[1]: *** [t9159-git-svn-no-parent-mergeinfo.sh] Error 1\nmake[1]: *** [t9161-git-svn-mergeinfo-push.sh] Error 1\n"},{"id":"178807","messageId":"1320372215-sup-8341@pinkfloyd.chass.utoronto.ca","threadId":"28826","inReplyTo":"20111102220941.GA3925@dcvr.yhbt.net","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-11-04T02:11:49Z","receivedAt":"2011-11-04T02:11:49Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Eric Wong's message of Wed Nov 02 18:09:41 -0400 2011:\n\nHi Eric,\n\n> I don't have much time to help you fix it, but I got numerous errors\n> on SVN 1.6.x (svn 1.6.12).  Can you make sure things continue to\n> work on 1.6 and earlier, also?\n\nYes, it's a bit of a mess, I think.  It looks as though the\nmodification required within Git::SVN::Ra is going to negatively\nimpact other code paths that interact with that package from the\noutside.\n\nFor example, when doing git svn init --minimize-url ..., the minimized\nurl is not escaped while the url is.  The minimized url is used to\nstrip off the head from the full url using a regex.  This now breaks\nbecause of the escaping.\n\nFixing this locally to the use of the minimized url let me move on\nfarther but I then got another core dump.\n\n> Maybe just enable the escaping for file:// on >= SVN 1.7\n\nI think that it would be best if this change was only effective for\n1.7.\n\nI wonder if all URL-ish objects should be (conditionally iff svn >=\n1.7) subjected to escaping?\n\nThis would require some restructuring and will take me a bit of time\nto work out as I need to familiarize myself with the code to a deeper\nlevel.\n\nPointers welcomed. :)\n\nThanks\n-Ben\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"},{"id":"178811","messageId":"20111104063805.GD24388@elie.hsd1.il.comcast.net","threadId":"28826","inReplyTo":"1320372215-sup-8341@pinkfloyd.chass.utoronto.ca","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-11-04T06:38:05Z","receivedAt":"2011-11-04T06:38:05Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ben Walton wrote:\n\n> Fixing this locally to the use of the minimized url let me move on\n> farther but I then got another core dump.\n\nIf it continues like this, it might be possible to get help from svn\ndevelopers.\n\nE.g., I would love to see a nice summary of the relevant API changes,\nlike so (except with more truth):\n\n  Previously the svn_frob() function would accept a filename with\n  spaces in it in its \"path\" argument.  Only the svn_plugh() function\n  and its relatives required escaped paths.  And all functions\n  returning paths would unescape them.\n\n  With Subversion 1.7, passing a filename with a space in it to\n  svn_frob() trips an assertion, so we have to escape the \"path\"\n  argument.  This requires ... changes in application code.\n\n  Unfortunately, back in Subversion 1.6, svn_frob() escapes its\n  argument, so an application modified as above will find its \"path\"\n  argument to be double-escaped.  There does not seem to be any\n  way for applications to target both Subversion 1.6 and 1.7 without\n  doing ...\n\n  Subversion 1.8 should follow the following simple, consistent\n  semantics when requested with a flag, which would allow me to easily\n  target my code against both SVN >= 1.8 and <= 1.6 with a few \"if\"\n  statements (forgetting 1.7 as if it were a bad dream).\n \nOr to put it another way: if getting git-svn to cooperate starts to\nprove difficult, maybe abstracting away from git and understanding\nwhat changed for libsvn callers in general could help.  On one hand,\nit could help in making sure the guarantees that libsvn offers are\nwell documented, stable in the future, and clear.  On the other hand,\nit might make the appropriate changes to git more obvious.\n\nSorry for the ramble.  I wish I could offer a fix instead.\nJonathan\n"},{"id":"181369","messageId":"20111217084513.GA27411@elie.hsd1.il.comcast.net","threadId":"28826","inReplyTo":"20111102220941.GA3925@dcvr.yhbt.net","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-12-17T08:45:13Z","receivedAt":"2011-12-17T08:45:13Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Eric,\n\nEric Wong wrote:\n\n> I don't have much time to help you fix it, but I got numerous errors on\n> SVN 1.6.x (svn 1.6.12).  Can you make sure things continue to work on\n> 1.6 and earlier, also?\n[...]\n> Here are the tests that failed for me:\n>\n> make[1]: *** [t9100-git-svn-basic.sh] Error 1\n[...]\n\nI tried the patch with subversion 1.6.17dfsg-3 from Debian and all\ntests passed.  Odd.  Could you send output from running the test with\n-v -i with Ben's patch applied?\n\nAh, the subversion CHANGES file mentions a bugfix that might explain\nthe difference:\n\n| Version 1.6.13\n[...]\n|    * properly canonicalize a URL (r984928, -31)\n\nThanks,\nJonathan\n"},{"id":"181380","messageId":"20111217095019.GC8845@elie.hsd1.il.comcast.net","threadId":"28826","inReplyTo":"1320251895-6348-2-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-12-17T09:50:19Z","receivedAt":"2011-12-17T09:50:19Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi again,\n\nBen Walton wrote:\n\n> Previously only http/https URL's were uri escaped.  When building\n> against subversion 1.7, this was causing a segfault in perl after\n> an assertion failure in the SVN::Ra bindings during in t9134.\n\n(Not a segfault, just a core dump.)  Thanks.\n\n[....]\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -5366,6 +5366,9 @@ sub escape_url {\n>  \tif ($url =~ m#^(https?)://([^/]+)(.*)$#) {\n>  \t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n>  \t\t$url = \"$scheme://$domain$uri\";\n> +\t} elsif ($url =~ m#^(file)://(.*)$#) {\n> +\t\tmy ($scheme, $uri) = ($1, escape_uri_only($2));\n> +\t\t$url = \"$scheme://$uri\";\n\nThis has two obvious effects, one good and one bad.\n\nThe good effect is that it converts spaces to %20.  Both old and new\nversions of Subversion seem to be happy to treat %20 as a space, and\nnew versions of Subversion are not happy to treat a space as a space,\nso this conversion can only be a good thing.\n\nThe bad effect is that it converts percent signs to %25.  So commands\nlike \"git svn clone file:///path/to/test%20repository\" that previously\nworked might not work any more, if v1.6.5-rc0~61 (svn: assume URLs\nfrom the command-line are URI-encoded, 2009-08-16) did not do its job\ncompletely.\n\nIn other words, it seems to me like you are on the right track. ;-)\n\nAnother possible approach: to imitate the svn command line tools, we\ncould use SVN::Client::url_from_path in some appropriate place. \n\nNext steps:\n\n - track down the trouble on svn 1.6.x that Eric mentioned\n - fix any remaining tests that still don't pass\n\nThanks for getting this started.  Will sleep and play with it a little\nmore.\n\nJonathan\n"},{"id":"181424","messageId":"1324165694-sup-8940@pinkfloyd.chass.utoronto.ca","threadId":"28826","inReplyTo":"20111217095019.GC8845@elie.hsd1.il.comcast.net","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-12-17T23:48:23Z","receivedAt":"2011-12-17T23:48:23Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Jonathan Nieder's message of Sat Dec 17 04:50:19 -0500 2011:\n\nHi Jonathan,\n\nThanks for following up on this.  I've intermittently spent time\ndigging away at it but other than a few poorly placed fixes that\nallowed me to get further into the test suite before failure, I\nhaven't found a workable fix yet.  I've included my wip patch below as\nit may help others that are more familiar with the workings of git-svn\nisolate a nice clean place to solve the problem.\n\n> The bad effect is that it converts percent signs to %25.  So\n> commands like \"git svn clone file:///path/to/test%20repository\" that\n> previously worked might not work any more, if v1.6.5-rc0~61 (svn:\n> assume URLs from the command-line are URI-encoded, 2009-08-16) did\n> not do its job completely.\n\nI wonder if simply doing a uri decode followed by a uri encode might\nwork?  That would decode things that already had some encoding and\nthen re-encode everything to handle a mixed encodings...I really think\nthat the svn code should take 'raw' strings and encode internally but\nthat ship has sailed.\n\n> Another possible approach: to imitate the svn command line tools, we\n> could use SVN::Client::url_from_path in some appropriate place.\n\nI've been looking at these functions too.\n\nThanks\n-Ben\n\n>From 98a6b6b4f26a644db5089fce68be6cf7261e4fe1 Mon Sep 17 00:00:00 2001\nFrom: Ben Walton <bwalton@opencsw.org>\nDate: Wed, 9 Nov 2011 02:39:05 +0100\nSubject: [PATCH] selectively use svn functions to sanitize urls\n\nSigned-off-by: Ben Walton <bwalton@opencsw.org>\n---\n git-svn.perl |   22 +++++++++++++++-------\n 1 files changed, 15 insertions(+), 7 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 351e743..fb1ce65 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1342,9 +1342,13 @@ sub escape_uri_only {\n \n sub escape_url {\n \tmy ($url) = @_;\n-\tif ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {\n-\t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n-\t\t$url = \"$scheme://$domain$uri\";\n+\tif ($SVN::Core::VERSION =~ /^1\\.[0-6]/) {\n+\t\tif ($url =~ m#^([^:]+)://([^/]*)(.*)$#) {\n+\t\t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n+\t\t\t$url = \"$scheme://$domain$uri\";\n+\t\t}\n+\t} else {\n+\t\t$url = SVN::_Core::svn_uri_canonicalize($url);\n \t}\n \t$url;\n }\n@@ -2222,7 +2226,7 @@ sub init_remote_config {\n \t\t\t\t\t     \"$url => $min_url\\n\";\n \t\t\t}\n \t\t\tmy $old_path = $self->{path};\n-\t\t\t$self->{path} = $url;\n+\t\t\t$self->{path} = SVN::_Core::svn_uri_canonicalize($url);\n \t\t\t$self->{path} =~ s!^\\Q$min_url\\E(/|$)!!;\n \t\t\tif (length $old_path) {\n \t\t\t\t$self->{path} .= \"/$old_path\";\n@@ -5363,9 +5367,13 @@ sub escape_uri_only {\n \n sub escape_url {\n \tmy ($url) = @_;\n-\tif ($url =~ m#^(https?)://([^/]+)(.*)$#) {\n-\t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n-\t\t$url = \"$scheme://$domain$uri\";\n+\tif ($SVN::Core::VERSION =~ /^1\\.[0-6]/) {\n+\t\tif ($url =~ m#^(https?)://([^/]+)(.*)$#) {\n+\t\t\tmy ($scheme, $domain, $uri) = ($1, $2, escape_uri_only($3));\n+\t\t\t$url = \"$scheme://$domain$uri\";\n+\t\t}\n+\t} else {\n+\t\t$url = SVN::_Core::svn_uri_canonicalize($url);\n \t}\n \t$url;\n }\n-- \n1.7.6.1\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"},{"id":"195165","messageId":"ab115eb531ab4229a3edb12670ca4179-mfwitten@gmail.com","threadId":"28826","inReplyTo":"1320372215-sup-8341@pinkfloyd.chass.utoronto.ca","subject":"Re: [PATCH] Escape file:// URL's to meet subversion SVN::Ra requirements","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":null,"receivedAt":"2012-07-16T20:05:06Z","isPatch":true,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On 2011-11-04 02:11:49 GMT, Ben Walton wrote:\n\n> Excerpts from Eric Wong's message of Wed Nov 02 18:09:41 -0400 2011:\n>\n> Hi Eric,\n> \n>> I don't have much time to help you fix it, but I got numerous errors\n>> on SVN 1.6.x (svn 1.6.12).  Can you make sure things continue to\n>> work on 1.6 and earlier, also?\n>\n> Yes, it's a bit of a mess, I think.  It looks as though the\n> modification required within Git::SVN::Ra is going to negatively\n> impact other code paths that interact with that package from the\n> outside.\n>\n> For example, when doing git svn init --minimize-url ..., the minimized\n> url is not escaped while the url is.  The minimized url is used to\n> strip off the head from the full url using a regex.  This now breaks\n> because of the escaping.\n>\n> Fixing this locally to the use of the minimized url let me move on\n> farther but I then got another core dump.\n>\n>> Maybe just enable the escaping for file:// on >= SVN 1.7\n>\n> I think that it would be best if this change was only effective for\n> 1.7.\n>\n> I wonder if all URL-ish objects should be (conditionally iff svn >=\n> 1.7) subjected to escaping?\n>\n> This would require some restructuring and will take me a bit of time\n> to work out as I need to familiarize myself with the code to a deeper\n> level.\n>\n> Pointers welcomed. :)\n\nThis problem still exists. It should be fixed---preferably by the people\nwho built this apparently unwieldy contraption.\n\nSincerely,\nMichael Witten\n"}]}