diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-06 10:35:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-06 10:35:55 +0000 |
commit | 154f60edd353c2215b9e1622a2e47bdcc5f70101 (patch) | |
tree | d12b75e28a5a719b6da5b4102f2651da6702ad3f /lib | |
parent | c37abb64151e18461cb739ed4658d912a7c752e8 (diff) | |
download | redmine-154f60edd353c2215b9e1622a2e47bdcc5f70101.tar.gz redmine-154f60edd353c2215b9e1622a2e47bdcc5f70101.zip |
Fix repository browsing at given revision for various scm and add tests for this.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1329 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 4 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/darcs_adapter.rb | 4 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index c0f60c02a..6085bfdbe 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -72,7 +72,9 @@ module Redmine logger.debug "<cvs> entries '#{path}' with identifier '#{identifier}'" path_with_project="#{url}#{with_leading_slash(path)}" entries = Entries.new - cmd = "#{CVS_BIN} -d #{root_url} rls -ed #{path_with_project}" + cmd = "#{CVS_BIN} -d #{root_url} rls -ed" + cmd << " -D \"#{time_to_cvstime(identifier)}\"" if identifier + cmd << " #{path_with_project}" shellout(cmd) do |io| io.each_line(){|line| fields=line.chop.split('/',-1) diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index cd8610121..660b6cf8f 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -53,7 +53,9 @@ module Redmine path_prefix = (path.blank? ? '' : "#{path}/") path = '.' if path.blank? entries = Entries.new - cmd = "#{DARCS_BIN} annotate --repodir #{@url} --xml-output #{path}" + cmd = "#{DARCS_BIN} annotate --repodir #{@url} --xml-output" + cmd << " --match \"hash #{identifier}\"" if identifier + cmd << " #{path}" shellout(cmd) do |io| begin doc = REXML::Document.new(io) diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index f1d076360..5d315b0cc 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -79,7 +79,7 @@ module Redmine rev = Revision.new({:identifier => changeset[:commit], :scmid => changeset[:commit], :author => changeset[:author], - :time => Time.parse(changeset[:date]), + :time => (changeset[:date] ? Time.parse(changeset[:date]) : nil), :message => changeset[:description], :paths => files }) |