svn: Quote repository root in regex match

Fixes a problem matching repository URLs, especially those with a '+' in the URL, such as svn+ssh:// URLs. Parts of the URL were interpreted as special characters by the regex matching. Signed-off-by: Ted Percival <ted.percival@quest.com> Acked-by: Eric Wong <normalperson@yhbt.net>

Ted Percival committed Oct 31, 2011 at 16:37 UTC 0e7e30f5606b48a4c6d34bc99c6d680bb76d3fbc
1 file changed +2 -2
git-svn.perl
+2 -2
@@ -684,7 +684,7 @@ sub populate_merge_info {
684 fatal "merge commit $d has ancestor $parent, but that change "
685 ."does not have git-svn metadata!";
686 }
687 - unless ($branchurl =~ /^$rooturl(.*)/) {
687 + unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
688 fatal "commit $parent git-svn metadata changed mid-run!";
689 }
690 my $branchpath = $1;
@@ -867,7 +867,7 @@ sub cmd_dcommit {
867 ."has uuid $uuid!";
868 }
869
870 - unless ($branchurl =~ /^$rooturl(.*)/) {
870 + unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
871 # This branch is very strange indeed.
872 fatal "merge parent $parent for $d is on branch "
873 ."$branchurl, which is not under the "