scm: subversion: change newlines LF to CRLF at lib/redmine/scm/adapters/subversion_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4827 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5d026d6fd3
commit
05f260da65
|
@ -38,21 +38,21 @@ module Redmine
|
||||||
def client_version
|
def client_version
|
||||||
@@client_version ||= (svn_binary_version || [])
|
@@client_version ||= (svn_binary_version || [])
|
||||||
end
|
end
|
||||||
|
|
||||||
def client_available
|
def client_available
|
||||||
!client_version.empty?
|
!client_version.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def svn_binary_version
|
def svn_binary_version
|
||||||
scm_version = scm_version_from_command_line
|
scm_version = scm_version_from_command_line
|
||||||
if m = scm_version.match(%r{\A(.*?)((\d+\.)+\d+)})
|
if m = scm_version.match(%r{\A(.*?)((\d+\.)+\d+)})
|
||||||
m[2].scan(%r{\d+}).collect(&:to_i)
|
m[2].scan(%r{\d+}).collect(&:to_i)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def scm_version_from_command_line
|
||||||
|
shellout("#{sq_bin} --version") { |io| io.read }.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def scm_version_from_command_line
|
|
||||||
shellout("#{sq_bin} --version") { |io| io.read }.to_s
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get info about the svn repository
|
# Get info about the svn repository
|
||||||
|
@ -185,6 +185,7 @@ module Redmine
|
||||||
def diff(path, identifier_from, identifier_to=nil, type="inline")
|
def diff(path, identifier_from, identifier_to=nil, type="inline")
|
||||||
path ||= ''
|
path ||= ''
|
||||||
identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : ''
|
identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : ''
|
||||||
|
|
||||||
identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : (identifier_from.to_i - 1)
|
identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : (identifier_from.to_i - 1)
|
||||||
|
|
||||||
cmd = "#{self.class.sq_bin} diff -r "
|
cmd = "#{self.class.sq_bin} diff -r "
|
||||||
|
|
Loading…
Reference in New Issue