Make Darcs adapter work with stringified revisions (test added).

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1213 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-03-09 10:00:51 +00:00
parent 4e6f5fef20
commit 93c2aebb61
5 changed files with 159 additions and 7 deletions
@@ -102,8 +102,12 @@ module Redmine
def diff(path, identifier_from, identifier_to=nil, type="inline")
path = '*' if path.blank?
cmd = "#{DARCS_BIN} diff --repodir #{@url}"
cmd << " --to-match \"hash #{identifier_from}\""
cmd << " --from-match \"hash #{identifier_to}\"" if identifier_to
if identifier_to.nil?
cmd << " --match \"hash #{identifier_from}\""
else
cmd << " --to-match \"hash #{identifier_from}\""
cmd << " --from-match \"hash #{identifier_to}\""
end
cmd << " -u #{path}"
diff = []
shellout(cmd) do |io|