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