Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -43,7 +45,7 @@ module Redmine
|
|||
end
|
||||
|
||||
def scm_command_version
|
||||
scm_version = scm_version_from_command_line.dup.force_encoding('ASCII-8BIT')
|
||||
scm_version = scm_version_from_command_line.b
|
||||
if m = scm_version.match(%r{\A(.*?)((\d+\.)+\d+)})
|
||||
m[2].scan(%r{\d+}).collect(&:to_i)
|
||||
end
|
||||
|
@ -94,10 +96,9 @@ module Redmine
|
|||
cmd_args << "-r#{identifier.to_i}"
|
||||
cmd_args << bzr_target(path)
|
||||
scm_cmd(*cmd_args) do |io|
|
||||
prefix_utf8 = "#{url}/#{path}".gsub('\\', '/')
|
||||
prefix_utf8 = "#{url}/#{path}".tr('\\', '/')
|
||||
logger.debug "PREFIX: #{prefix_utf8}"
|
||||
prefix = scm_iconv(@path_encoding, 'UTF-8', prefix_utf8)
|
||||
prefix.force_encoding('ASCII-8BIT')
|
||||
prefix = scm_iconv(@path_encoding, 'UTF-8', prefix_utf8).b
|
||||
re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)\r?$}
|
||||
io.each_line do |line|
|
||||
next unless line =~ re
|
||||
|
@ -152,7 +153,7 @@ module Redmine
|
|||
parsing = $1
|
||||
elsif line =~ /^ (.*)$/
|
||||
if parsing == 'message'
|
||||
revision.message << "#{$1}\n"
|
||||
revision.message += "#{$1}\n"
|
||||
else
|
||||
if $1 =~ /^(.*)\s+(\S+)$/
|
||||
path_locale = $1.strip
|
||||
|
@ -247,36 +248,28 @@ module Redmine
|
|||
end
|
||||
|
||||
def self.branch_conf_path(path)
|
||||
bcp = nil
|
||||
return if path.nil?
|
||||
m = path.match(%r{^(.*[/\\])\.bzr.*$})
|
||||
if m
|
||||
bcp = m[1]
|
||||
else
|
||||
bcp = path
|
||||
end
|
||||
bcp.gsub!(%r{[\/\\]$}, "")
|
||||
if bcp
|
||||
bcp = File.join(bcp, ".bzr", "branch", "branch.conf")
|
||||
end
|
||||
bcp
|
||||
bcp = (m ? m[1] : path).gsub(%r{[\/\\]$}, "")
|
||||
File.join(bcp, ".bzr", "branch", "branch.conf")
|
||||
end
|
||||
|
||||
def append_revisions_only
|
||||
return @aro if ! @aro.nil?
|
||||
return @aro unless @aro.nil?
|
||||
@aro = false
|
||||
bcp = self.class.branch_conf_path(url)
|
||||
if bcp && File.exist?(bcp)
|
||||
begin
|
||||
f = File::open(bcp, "r")
|
||||
f = File.open(bcp, "r")
|
||||
cnt = 0
|
||||
f.each_line do |line|
|
||||
l = line.chomp.to_s
|
||||
if l =~ /^\s*append_revisions_only\s*=\s*(\w+)\s*$/
|
||||
str_aro = $1
|
||||
if str_aro.upcase == "TRUE"
|
||||
if str_aro.casecmp("TRUE") == 0
|
||||
@aro = true
|
||||
cnt += 1
|
||||
elsif str_aro.upcase == "FALSE"
|
||||
elsif str_aro.casecmp("FALSE") == 0
|
||||
@aro = false
|
||||
cnt += 1
|
||||
end
|
||||
|
@ -301,7 +294,7 @@ module Redmine
|
|||
full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
|
||||
end
|
||||
ret = shellout(
|
||||
self.class.sq_bin + ' ' +
|
||||
self.class.sq_bin + ' ' +
|
||||
full_args_locale.map { |e| shell_quote e.to_s }.join(' '),
|
||||
&block
|
||||
)
|
||||
|
@ -320,7 +313,7 @@ module Redmine
|
|||
full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e)
|
||||
end
|
||||
ret = shellout(
|
||||
self.class.sq_bin + ' ' +
|
||||
self.class.sq_bin + ' ' +
|
||||
full_args_locale.map { |e| shell_quote e.to_s }.join(' '),
|
||||
&block
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue