diff options
-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 "
|