|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
SVNKit 1.2.3.5521 Problem with DumpFileHi,
i have written a little Dump File reader test with SVNKit just to see how it works... Very simple one.... But i got an exception during the run of this part (attached Exception.txt).... But i was a little bit irritated, cause during my Integration test i use the same Dump file with the SVNAdminClient using doLoad and doVerify without any problem....so it seemed to me that i'm doing something wrong....may be you can give me a hint what ? I've also checked the dump file with svn command line client...without any errors.. Thanks in advance.... Kind regards Karl Heinz Marbaise http://www.supose.org (Subversion Repository Search Engine) -- SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de package com.soebes.supose.scan; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.util.Map; import org.apache.log4j.Logger; import org.testng.annotations.Test; import org.tmatesoft.svn.core.ISVNCanceller; import org.tmatesoft.svn.core.SVNCancelException; import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.SVNPropertyValue; import org.tmatesoft.svn.core.internal.wc.ISVNLoadHandler; import org.tmatesoft.svn.core.internal.wc.SVNDumpStreamParser; import com.soebes.supose.TestBase; public class DumpTest extends TestBase implements ISVNCanceller, ISVNLoadHandler { private static Logger LOGGER = Logger.getLogger(DumpTest.class); @Test public void testDump() throws SVNException, IOException { String dumpFile = getMavenBaseDir() + File.separatorChar + "src" + File.separatorChar + "test" + File.separatorChar + "resources" + File.separatorChar + "repos.dump"; CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); SVNDumpStreamParser parser = new SVNDumpStreamParser(this);; FileInputStream fis = new FileInputStream(dumpFile); parser.parseDumpStream(fis, this, decoder); fis.close(); } public void checkCancelled() throws SVNCancelException { LOGGER.warn("Cancellation received."); } public void applyTextDelta() throws SVNException { LOGGER.info("applyTextDelta"); } public void closeNode() throws SVNException { LOGGER.info("closeNode"); } public void closeRevision() throws SVNException { LOGGER.info("closeRevision"); } public void deleteNodeProperty(String propertyName) throws SVNException { LOGGER.info("deleteNodeProperty"); } public void openNode(Map headers) throws SVNException { LOGGER.info("openNode"); } public void openRevision(Map headers) throws SVNException { LOGGER.info("openRevision"); } public void parseTextBlock(InputStream dumpStream, long contentLength, boolean isDelta) throws SVNException { LOGGER.info("parseTextBlock"); } public void parseUUID(String uuid) throws SVNException { LOGGER.info("parseUUID"); } public void removeNodeProperties() throws SVNException { LOGGER.info("removeNodeProperties"); } public void setFullText() throws SVNException { LOGGER.info("setFullText"); } public void setNodeProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { LOGGER.info("setNodeProperty"); } public void setRevisionProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { LOGGER.info("setRevisionProperty"); } } FAILED: testDump org.tmatesoft.svn.core.SVNException: svn: Dump stream contains a malformed header (with no ':') at 'Content1' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.wc.SVNDumpStreamParser.readHeaderBlock(SVNDumpStreamParser.java:356) at org.tmatesoft.svn.core.internal.wc.SVNDumpStreamParser.parseDumpStream(SVNDumpStreamParser.java:91) at com.soebes.supose.scan.DumpTest.testDump(DumpTest.java:37) ... Removed 22 stack frames --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: SVNKit 1.2.3.5521 Problem with DumpFileHello Karl,
I suppose, that's because you do not handle file text correctly in your ISVNLoadHandler implementation methods. In the method parseTextBlock(..., long contentLength) you are expected to read the text contents from the dump stream yourself. Use DefaultLoadHandler.java as an example to realize a correct load handler. Another thing that I've noticed: public void checkCancelled() throws SVNCancelException { LOGGER.warn("Cancellation received."); } The method ISVNCanceller.checkCancelled() is intended to give a caller (i.e. you in this case) a chance to stop the operation somewhere in the middle. It's not a kind of a notification method, on the contrary, you may throw an SVNCancelException from there whenever you want to cancel the operation. ---- Alexander Sinyushkin, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! Karl Heinz Marbaise wrote: > Hi, > > i have written a little Dump File reader test with SVNKit just to see > how it works... > > Very simple one.... > But i got an exception during the run of this part (attached > Exception.txt).... > > But i was a little bit irritated, cause during my Integration test i use > the same Dump file with the SVNAdminClient using doLoad and doVerify > without any problem....so it seemed to me that i'm doing something > wrong....may be you can give me a hint what ? > I've also checked the dump file with svn command line client...without > any errors.. > > Thanks in advance.... > > Kind regards > Karl Heinz Marbaise > > http://www.supose.org (Subversion Repository Search Engine) > > > ------------------------------------------------------------------------ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: svnkit-users-unsubscribe@... > For additional commands, e-mail: svnkit-users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: SVNKit 1.2.3.5521 Problem with DumpFileHello Alexander,
> I suppose, that's because you do not handle file text correctly in your > ISVNLoadHandler implementation methods. In the method > parseTextBlock(..., long contentLength) you are expected to read the > text contents from the dump stream yourself. Use DefaultLoadHandler.java > as an example to realize a correct load handler. > > Another thing that I've noticed: > > public void checkCancelled() throws SVNCancelException { > LOGGER.warn("Cancellation received."); > > } > > The method ISVNCanceller.checkCancelled() is intended to give a caller > (i.e. you in this case) a chance to stop the operation somewhere in the > middle. It's not a kind of a notification method, on the contrary, you > may throw an SVNCancelException from there whenever you want to cancel > the operation. Many thanks for you help. Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |