scm: mercurial: use regexp %r{} instead of // in model latest_changesets_cond().

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5930 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-26 10:11:31 +00:00
parent dc9011467a
commit adbe6af44a
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class Repository::Mercurial < Repository
AND (#{Change.table_name}.path = ?
OR #{Change.table_name}.path LIKE ? ESCAPE ?))"
args << path.with_leading_slash
args << "#{path.with_leading_slash.gsub(/[%_\\]/) { |s| "\\#{s}" }}/%" << '\\'
args << "#{path.with_leading_slash.gsub(%r{[%_\\]}) { |s| "\\#{s}" }}/%" << '\\'
end
[cond.join(' AND '), *args] unless cond.empty?