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
This commit is contained in:
Jean-Philippe Lang
2008-04-06 10:35:55 +00:00
parent c37abb6415
commit 154f60edd3
12 changed files with 197 additions and 17 deletions
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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)
+1 -1
View File
@@ -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
})