summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/darcs_adapter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/scm/adapters/darcs_adapter.rb')
-rw-r--r--lib/redmine/scm/adapters/darcs_adapter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb
index 2955b26dc..cd8610121 100644
--- a/lib/redmine/scm/adapters/darcs_adapter.rb
+++ b/lib/redmine/scm/adapters/darcs_adapter.rb
@@ -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|