From: Toshi MARUYAMA Date: Sat, 22 Jan 2011 15:38:47 +0000 (+0000) Subject: scm: darcs: switch '.' or @url at entries() in darcs version (#4899). X-Git-Tag: 1.2.0~1049 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1df08afefddbfe601d7046ed8c82b6c5f8a8bb50;p=redmine.git scm: darcs: switch '.' or @url at entries() in darcs version (#4899). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4744 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb index 381f609c0..1b78f77a8 100644 --- a/lib/redmine/scm/adapters/darcs_adapter.rb +++ b/lib/redmine/scm/adapters/darcs_adapter.rb @@ -62,7 +62,9 @@ module Redmine # or nil if the given path doesn't exist in the repository def entries(path=nil, identifier=nil) path_prefix = (path.blank? ? '' : "#{path}/") - path = '.' if path.blank? + if path.blank? + path = ( self.class.client_version_above?([2, 2, 0]) ? @url : '.' ) + end entries = Entries.new cmd = "#{DARCS_BIN} annotate --repodir #{shell_quote @url} --xml-output" cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier