##// END OF EJS Templates
Fixed wrong commit range in git log command. #5628...
Jean-Baptiste Barth -
r3811:780bdccc4246
parent child
Show More
@@ -114,12 +114,12 module Redmine
114 def revisions(path, identifier_from, identifier_to, options={})
114 def revisions(path, identifier_from, identifier_to, options={})
115 revisions = Revisions.new
115 revisions = Revisions.new
116
116
117 cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller"
117 cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller "
118 cmd << " --reverse" if options[:reverse]
118 cmd << " --reverse " if options[:reverse]
119 cmd << " --all" if options[:all]
119 cmd << " --all " if options[:all]
120 cmd << " -n #{options[:limit]} " if options[:limit]
120 cmd << " -n #{options[:limit]} " if options[:limit]
121 cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from
121 cmd << "#{shell_quote(identifier_from + '..')}" if identifier_from
122 cmd << " #{shell_quote identifier_to} " if identifier_to
122 cmd << "#{shell_quote identifier_to}" if identifier_to
123 cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
123 cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
124 cmd << " -- #{path}" if path && !path.empty?
124 cmd << " -- #{path}" if path && !path.empty?
125
125
@@ -16,6 +16,10 class GitAdapterTest < ActiveSupport::TestCase
16 assert_equal 13, @adapter.revisions('',nil,nil,:all => true).length
16 assert_equal 13, @adapter.revisions('',nil,nil,:all => true).length
17 end
17 end
18
18
19 def test_getting_certain_revisions
20 assert_equal 1, @adapter.revisions('','899a15d^','899a15d').length
21 end
22
19 def test_annotate
23 def test_annotate
20 annotate = @adapter.annotate('sources/watchers_controller.rb')
24 annotate = @adapter.annotate('sources/watchers_controller.rb')
21 assert_kind_of Redmine::Scm::Adapters::Annotate, annotate
25 assert_kind_of Redmine::Scm::Adapters::Annotate, annotate
General Comments 0
You need to be logged in to leave comments. Login now