Skip to content
Snippets Groups Projects
Commit 71d3bb2f authored by Jean-Philippe Lang's avatar Jean-Philippe Lang
Browse files

Fixes Mercurial browsing under unix-like os and for directory depth > 2 and...

Fixes Mercurial browsing under unix-like os and for directory depth > 2 and (patch #826 by Frederic Moulins, slightly edited to preserve win32 compatibility).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1228 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 624723d0
Branches
Tags
No related merge requests found
......@@ -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'),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment