@@ -43,12 +43,12 module Redmine | |||||
43 | def entries(path=nil, identifier=nil) |
|
43 | def entries(path=nil, identifier=nil) | |
44 | path ||= '' |
|
44 | path ||= '' | |
45 | entries = Entries.new |
|
45 | entries = Entries.new | |
46 |
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate |
|
46 | cmd = "#{HG_BIN} -R #{target('')} --cwd #{target(path)} locate" | |
47 | cmd << " -r #{identifier.to_i}" if identifier |
|
47 | cmd << " -r #{identifier.to_i}" if identifier | |
48 |
cmd << " |
|
48 | cmd << " glob:**" | |
49 | shellout(cmd) do |io| |
|
49 | shellout(cmd) do |io| | |
50 | io.each_line do |line| |
|
50 | io.each_line do |line| | |
51 |
e = line.chomp.split( |
|
51 | e = line.chomp.split(%r{[\/\\]}) | |
52 | entries << Entry.new({:name => e.first, |
|
52 | entries << Entry.new({:name => e.first, | |
53 | :path => (path.empty? ? e.first : "#{path}/#{e.first}"), |
|
53 | :path => (path.empty? ? e.first : "#{path}/#{e.first}"), | |
54 | :kind => (e.size > 1 ? 'dir' : 'file'), |
|
54 | :kind => (e.size > 1 ? 'dir' : 'file'), |
General Comments 0
You need to be logged in to leave comments.
Login now