]> source.dussan.org Git - redmine.git/commitdiff
scm: darcs: switch '.' or @url at entries() in darcs version (#4899).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 22 Jan 2011 15:38:47 +0000 (15:38 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 22 Jan 2011 15:38:47 +0000 (15:38 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4744 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/darcs_adapter.rb

index 381f609c004b7cdb5e6f729f26ccdcb28364ecec..1b78f77a88d0b6ccb8e27309c517db73e5cfb300 100644 (file)
@@ -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