Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 95c867a

Browse files
committed
[FIX] svn_xml_parser: work around a bug in rexml bailing out on empty input strings.
In fact, rexml bails out on strings of length < 2, so catch these. Michael
1 parent 4a5f0ee commit 95c867a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/scm/parsers/svn_xml_parser.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def text(text)
4747

4848
class SvnXmlParser < Parser
4949
def self.internal_parse(buffer, opts)
50+
buffer = '<?xml?>' if buffer.is_a?(StringIO) and buffer.length < 2
5051
begin
5152
REXML::Document.parse_stream(buffer, SubversionListener.new(Proc.new { |c| yield c if block_given? }))
5253
rescue EOFError

0 commit comments

Comments
 (0)