scm: mercurial: fix Ruby 1.9 "hg diff" test fails (#7518).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4859 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0a87041504
commit
7a3d385b8e
|
@ -170,10 +170,13 @@ module Redmine
|
|||
hg_args << '-c' << hgrev(identifier_from)
|
||||
end
|
||||
hg_args << CGI.escape(hgtarget(path)) unless path.blank?
|
||||
|
||||
diff = []
|
||||
hg *hg_args do |io|
|
||||
io.collect
|
||||
io.each_line do |line|
|
||||
diff << line
|
||||
end
|
||||
end
|
||||
diff
|
||||
rescue HgCommandAborted
|
||||
nil # means not found
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue