From abaeecbaa9539e2497a34b7391799a81c3d0b29b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 12 Mar 2008 17:54:50 +0000 Subject: [PATCH] Merged Mercurial browsing fix from trunk (r1228 and r1229). git-svn-id: http://redmine.rubyforge.org/svn/branches/0.6-stable@1230 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/mercurial_adapter.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb index 3c905fc0f..26bf01140 100644 --- a/lib/redmine/scm/adapters/mercurial_adapter.rb +++ b/lib/redmine/scm/adapters/mercurial_adapter.rb @@ -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 << " " + shell_quote('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'), -- 2.39.5