mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Update Mercurial repository support to be compatible with Python 3 and remove support for Mercurial < 5.1 (#33784).
Patch by Harald Klimach (user:haraldkl), Olivier Houdas (user:olivier.houdas@geoconcept.com), Jakob Haufe (user:sur5r), and Sean Baggaley (user:NotTheActualSean). git-svn-id: https://svn.redmine.org/redmine/trunk@23513 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -50,7 +50,7 @@ module Redmine
|
||||
end
|
||||
|
||||
def client_available
|
||||
client_version_above?([1, 2])
|
||||
client_version_above?([5, 1])
|
||||
end
|
||||
|
||||
def hgversion
|
||||
@@ -153,13 +153,13 @@ module Redmine
|
||||
|
||||
entries = Entries.new
|
||||
as_ary(manifest['dir']).each do |e|
|
||||
n = scm_iconv('UTF-8', @path_encoding, CGI.unescape(e['name']))
|
||||
n = CGI.unescape(e['name'])
|
||||
p = "#{path_prefix}#{n}"
|
||||
entries << Entry.new(:name => n, :path => p, :kind => 'dir')
|
||||
end
|
||||
|
||||
as_ary(manifest['file']).each do |e|
|
||||
n = scm_iconv('UTF-8', @path_encoding, CGI.unescape(e['name']))
|
||||
n = CGI.unescape(e['name'])
|
||||
p = "#{path_prefix}#{n}"
|
||||
lr = Revision.new(:revision => e['revision'], :scmid => e['node'],
|
||||
:identifier => e['node'],
|
||||
@@ -326,6 +326,7 @@ module Redmine
|
||||
full_args = ["-R#{repo_path}", '--encoding=utf-8']
|
||||
# don't use "--config=<value>" form for compatibility with ancient Mercurial
|
||||
full_args << '--config' << "extensions.redminehelper=#{HG_HELPER_EXT}"
|
||||
full_args << '--config' << "redminehelper.path_encoding=#{@path_encoding}"
|
||||
full_args << '--config' << 'diff.git=false'
|
||||
full_args += args
|
||||
ret =
|
||||
|
||||
Reference in New Issue
Block a user