]> source.dussan.org Git - redmine.git/commitdiff
Fixes Mercurial browsing under unix-like os and for directory depth > 2 and (patch...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 11 Mar 2008 20:06:25 +0000 (20:06 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 11 Mar 2008 20:06:25 +0000 (20:06 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1228 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/mercurial_adapter.rb

index 3c905fc0f168709c3a0248c9ced84594393e1892..40d570d05276998dc1b68df5cb7d8c7102e4e03c 100644 (file)
@@ -43,12 +43,12 @@ module Redmine
         def entries(path=nil, identifier=nil)
           path ||= ''
           entries = Entries.new
-          cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate -X */*/*"
+          cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate"
           cmd << " -r #{identifier.to_i}" if identifier
-          cmd << " * */*"
+          cmd << " glob:**"
           shellout(cmd) do |io|
             io.each_line do |line|
-              e = line.chomp.split('\\')
+              e = line.chomp.split(%r{[\/\\]})
               entries << Entry.new({:name => e.first,
                                     :path => (path.empty? ? e.first : "#{path}/#{e.first}"),
                                     :kind => (e.size > 1 ? 'dir' : 'file'),