diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-15 05:33:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-02-15 05:33:25 +0000 |
commit | 05f260da65aef1d5009aad9eebddb52bb7ced544 (patch) | |
tree | 4a7e9bba11b27e1cfe3fd82b2a8913ff80a48d8f /lib/redmine/scm/adapters/subversion_adapter.rb | |
parent | 5d026d6fd3fec453b7f26616a92bbdabe063343b (diff) | |
download | redmine-05f260da65aef1d5009aad9eebddb52bb7ced544.tar.gz redmine-05f260da65aef1d5009aad9eebddb52bb7ced544.zip |
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
Diffstat (limited to 'lib/redmine/scm/adapters/subversion_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/subversion_adapter.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index 802dc4a16..37d5bcf4d 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -38,21 +38,21 @@ module Redmine def client_version
@@client_version ||= (svn_binary_version || [])
end
- - def client_available - !client_version.empty? - end +
+ def client_available
+ !client_version.empty?
+ end
def svn_binary_version
- scm_version = scm_version_from_command_line - if m = scm_version.match(%r{\A(.*?)((\d+\.)+\d+)}) - m[2].scan(%r{\d+}).collect(&:to_i) - end + scm_version = scm_version_from_command_line
+ if m = scm_version.match(%r{\A(.*?)((\d+\.)+\d+)})
+ m[2].scan(%r{\d+}).collect(&:to_i)
+ end
+ end
+
+ def scm_version_from_command_line
+ shellout("#{sq_bin} --version") { |io| io.read }.to_s
end
- - def scm_version_from_command_line - shellout("#{sq_bin} --version") { |io| io.read }.to_s - end end
# Get info about the svn repository
@@ -185,6 +185,7 @@ module Redmine def diff(path, identifier_from, identifier_to=nil, type="inline")
path ||= ''
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)
cmd = "#{self.class.sq_bin} diff -r "
|