Patch #826 » fix-mercurial-repo-browsing.patch
| lib/redmine/scm/adapters/mercurial_adapter.rb (copie de travail) | ||
|---|---|---|
| 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 -X */*/*"
|
|
| 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('/')
|
|
| 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'), |