OSDN Git Service

scm: mercurial: wrap revison, tag and branch with URL encoding for entries (#4455...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 2 Mar 2011 10:17:36 +0000 (10:17 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 2 Mar 2011 10:17:36 +0000 (10:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4989 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial/redminehelper.py
lib/redmine/scm/adapters/mercurial_adapter.rb

index 9bca6c9..e6c9182 100644 (file)
@@ -140,7 +140,7 @@ def rhmanifest(ui, repo, path='', **opts):
     ui.write('<rhmanifest>\n')
     ui.write('<repository root="%s">\n' % _u(repo.root))
     try:
-        _manifest(ui, repo, urllib.unquote_plus(path), opts.get('rev'))
+        _manifest(ui, repo, urllib.unquote_plus(path), urllib.unquote_plus(opts.get('rev')))
     finally:
         ui.write('</repository>\n')
         ui.write('</rhmanifest>\n')
index 11eb66b..c60eb99 100644 (file)
@@ -130,7 +130,7 @@ module Redmine
 
         def entries(path=nil, identifier=nil)
           p1 = scm_iconv(@path_encoding, 'UTF-8', path)
-          manifest = hg('rhmanifest', '-r', hgrev(identifier),
+          manifest = hg('rhmanifest', '-r', CGI.escape(hgrev(identifier)),
                         CGI.escape(without_leading_slash(p1.to_s))) do |io|
             begin
               ActiveSupport::XmlMini.parse(io.read)['rhmanifest']['repository']['manifest']