Skip to content

Commit

Permalink
svn: Quote repository root in regex match
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ted Percival authored and Eric Wong committed Nov 1, 2011
1 parent be3fa91 commit 0e7e30f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ sub populate_merge_info {
fatal "merge commit $d has ancestor $parent, but that change "
."does not have git-svn metadata!";
}
unless ($branchurl =~ /^$rooturl(.*)/) {
unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
fatal "commit $parent git-svn metadata changed mid-run!";
}
my $branchpath = $1;
Expand Down Expand Up @@ -867,7 +867,7 @@ sub cmd_dcommit {
."has uuid $uuid!";
}

unless ($branchurl =~ /^$rooturl(.*)/) {
unless ($branchurl =~ /^\Q$rooturl\E(.*)/) {
# This branch is very strange indeed.
fatal "merge parent $parent for $d is on branch "
."$branchurl, which is not under the "
Expand Down

0 comments on commit 0e7e30f

Please sign in to comment.