cstroe / svndumpapi

A Java library for manipulating a Subversion dump file.
GNU Affero General Public License v3.0
5 stars 1 forks source link

NodeRemove will allow svnadmin load to commit a transaction when NodeRemove throws an exception #33

Open cstroe opened 8 years ago

cstroe commented 8 years ago

NodeRemove should fail earlier, so that svnadmin load does not commit the transaction.

cstroe commented 8 years ago

This would require some look ahead sort of functionality, or some way to have NodeRemove hold back a few bytes of the output buffer until it was sure that it didn't find the node it was looking for.

Look ahead functionality is not feasable, since nodes can be very large.

Holding back a few bytes from the output buffer would require some extra API for SvnDumpWriter, to tell it to hold back bytes, and to tell it to flush the buffer. It's possible that some implementation of OutputStream already does this.

It may be possible to hold back just the endNode() method, in which case this would be the simplest solution.