]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: use regexp %r{} instead of // in model latest_changesets_cond().
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 May 2011 10:11:31 +0000 (10:11 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 May 2011 10:11:31 +0000 (10:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5930 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/mercurial.rb

index 4c6fae23d7c1f58e77c7bbd3aa72f0f8001db1f5..60948ce555c4f7da1e1216c18319f35727544a0d 100644 (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?