Mercurial > hg > soundsoftware-site
comparison lib/redmine/scm/adapters/.svn/text-base/subversion_adapter.rb.svn-base @ 117:af80e5618e9b redmine-1.1
* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 12:53:21 +0000 |
parents | 513646585e45 |
children | 0579821a129a |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 117:af80e5618e9b |
---|---|
34 def svn_binary_version | 34 def svn_binary_version |
35 cmd = "#{SVN_BIN} --version" | 35 cmd = "#{SVN_BIN} --version" |
36 version = nil | 36 version = nil |
37 shellout(cmd) do |io| | 37 shellout(cmd) do |io| |
38 # Read svn version in first returned line | 38 # Read svn version in first returned line |
39 if m = io.gets.to_s.match(%r{((\d+\.)+\d+)}) | 39 if m = io.read.to_s.match(%r{\A(.*?)((\d+\.)+\d+)}) |
40 version = m[0].scan(%r{\d+}).collect(&:to_i) | 40 version = m[2].scan(%r{\d+}).collect(&:to_i) |
41 end | 41 end |
42 end | 42 end |
43 return nil if $? && $?.exitstatus != 0 | 43 return nil if $? && $?.exitstatus != 0 |
44 version | 44 version |
45 end | 45 end |
133 properties | 133 properties |
134 end | 134 end |
135 | 135 |
136 def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}) | 136 def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}) |
137 path ||= '' | 137 path ||= '' |
138 identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : "HEAD" | 138 identifier_from = (identifier_from && identifier_from.to_i > 0) ? identifier_from.to_i : "HEAD" |
139 identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : 1 | 139 identifier_to = (identifier_to && identifier_to.to_i > 0) ? identifier_to.to_i : 1 |
140 revisions = Revisions.new | 140 revisions = Revisions.new |
141 cmd = "#{SVN_BIN} log --xml -r #{identifier_from}:#{identifier_to}" | 141 cmd = "#{SVN_BIN} log --xml -r #{identifier_from}:#{identifier_to}" |
142 cmd << credentials_string | 142 cmd << credentials_string |
143 cmd << " --verbose " if options[:with_paths] | 143 cmd << " --verbose " if options[:with_paths] |
144 cmd << " --limit #{options[:limit].to_i}" if options[:limit] | 144 cmd << " --limit #{options[:limit].to_i}" if options[:limit] |