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
77f6496393
commit
7934e32ee1
|
@ -170,10 +170,13 @@ module Redmine
|
||||||
hg_args << '-c' << hgrev(identifier_from)
|
hg_args << '-c' << hgrev(identifier_from)
|
||||||
end
|
end
|
||||||
hg_args << CGI.escape(hgtarget(path)) unless path.blank?
|
hg_args << CGI.escape(hgtarget(path)) unless path.blank?
|
||||||
|
diff = []
|
||||||
hg *hg_args do |io|
|
hg *hg_args do |io|
|
||||||
io.collect
|
io.each_line do |line|
|
||||||
|
diff << line
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
diff
|
||||||
rescue HgCommandAborted
|
rescue HgCommandAborted
|
||||||
nil # means not found
|
nil # means not found
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue