The problem was completely about putting the correct number of new lines in the correct places. Instead of trying to reproduce svnadmin dump's finite state machine (believe me I've tried), I'm cheating and just counting the new lines after each node, and then repeating them.
This involves adding an extra made up SvnProperty to the node and passing it to endNode(SvnNode) in the SvnNode properties (see this file, and the parser). Because this new property will be added to the node properties after it's been consumed, it doesn't (and shouldn't) break existing functionality. It doesn't break existing functionality because most SvnDumpConsumers do very little work in endNode(SvnNode).
This also means that if a dump is not read in using SvnDumpFileParser, you will not get the extra hint property, and it will default to a single new line after each SvnNode, breaking compatibility with the svnadmin dump format (for new lines). Since the main usage scenario involves reading through SvnDumpFileParser, we should not be bitten by this.
The problem was completely about putting the correct number of new lines in the correct places. Instead of trying to reproduce
svnadmin dump
's finite state machine (believe me I've tried), I'm cheating and just counting the new lines after each node, and then repeating them.This involves adding an extra made up SvnProperty to the node and passing it to
endNode(SvnNode)
in theSvnNode
properties (see this file, and the parser). Because this new property will be added to the node properties after it's been consumed, it doesn't (and shouldn't) break existing functionality. It doesn't break existing functionality because mostSvnDumpConsumer
s do very little work inendNode(SvnNode)
.This also means that if a dump is not read in using
SvnDumpFileParser
, you will not get the extra hint property, and it will default to a single new line after eachSvnNode
, breaking compatibility with thesvnadmin dump
format (for new lines). Since the main usage scenario involves reading throughSvnDumpFileParser
, we should not be bitten by this.