Hello Mark,

I tried your code, but couldn't reproduce the problem .

E160004 error code corresponds to SVNErrorCode.FS_CORRUPT and means that SVN 
repository is 
corrupted.

If you corrupted the repository by SVNKit means only, it's a serious problem, 
because even in the 
case of wrong calls SVNKit shouldn't damage the repository.

Is it true that initialWcDir = "trunk" and nodePath = "/file" in your 
repository (if nodePath has 
form "a/b/c/d", one should call openDir/closeDir for each of "a", "a/b", 
"a/b/c", "a/b/c/d")?

Is the problem reproducible for you, if you create a new empty repository and 
try to repeat the same 
steps? If yes, please also post code where you create "trunk" and "file" (so 
where you call addDir 
and addFile).

--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge

> Thanks for your rapid response Dimitri.  In my first email I mis-quoted the
> mime-type property value I had set, but, as you pointed out, the correct
> value didn't effect the checksum behavior.
> 
> Here is the complete text of the method used to commit a new revision:
> 
>     private long commitNewRevisionInner(String filePath, String nodePath,
> String comment) throws Exception {
>         ISVNEditor editor;
>         SVNCommitInfo commitInfo = null;
>         if (!initialize()) {
>             throw new Exception("Not initialized.");
>         }
>         editor = repository.getCommitEditor(comment, null);
>         editor.openRoot(-1);
>         editor.openDir(initialWcDir, -1);
>         editor.openFile(initialWcDir + nodePath, -1);
> 
>         editor.applyTextDelta(initialWcDir + nodePath, null);
> 
>         FileInputStream fis = new FileInputStream(filePath);
>         String checksum = null;
>         try {
>             SVNDeltaGenerator deltaGenerator = new
> SVNDeltaGenerator(200000);
>             checksum = deltaGenerator.sendDelta(initialWcDir + nodePath,
>                     fis,
>                     editor,
>                     true);
>             editor.closeFile(initialWcDir + nodePath, checksum);
>             editor.closeDir();   // close trunk dir
>             editor.closeDir();   // close root dir
> 
>             commitInfo = editor.closeEdit();
> 
>             SVNWCClient wcClient = clientManager.getWCClient();
>             File workingDir = new File(cmConfig.getWorkingPath() + "/" +
> initialWcDir);
>         } catch (SVNException svne) {
>            
> Logger.getLogger(CMRepository.class.getName()).log(Level.SEVERE, null,
> svne);
>             throw new Exception(svne);
>         }
>         return commitInfo.getNewRevision();
>     }
> 
> Here is the complete text of the method I am executing when the checksum
> failure occurs:
> 
> private long getFileContentsInner(String nodePath, long revision, String
> filePath) throws SVNException, Exception {
>         if (!initialize()) {
>            
> Logger.getLogger(CMRepository.class.getName()).log(Level.SEVERE, "Not
> initialized.");
>             throw new Exception("Not initialized.");
>         }
>         FileOutputStream fileOStream = null;
>         long fileBytes = 0;
>         SVNURL url = null;
>         try {
>             SVNProperties fileProperties = new SVNProperties();
> 
>             File oFile = new File(filePath);
>             if (!oFile.exists()) {
>                 // Does mkdir for any missing parent directories
>                 FileUtils.forceMkdir(oFile.getParentFile());
>                 oFile.createNewFile();
>             }
> 
>             fileOStream = new FileOutputStream(oFile);
>             repository.getFile(fullNodePath, revision, fileProperties,
> fileOStream);
>             System.out.println("filePath " + filePath);
>             fileBytes = fileOStream.getChannel().size();
>         } catch (SVNException svne) {
>            
> Logger.getLogger(CMRepository.class.getName()).log(Level.SEVERE, null,
> svne);
>             throw svne;
>         } catch (Exception err) {
>            
> Logger.getLogger(CMRepository.class.getName()).log(Level.SEVERE, null,
> err);
>             throw err;
>         } finally {
>             if (null != fileOStream) {
>                 fileOStream.close();
>             }
>         }
>         return fileBytes;
>     }
> 
> Here is the full stack trace:
> 
> Apr 22, 2013 9:29:19 AM com.boeing.sis.mexsat.sra.Versionizer.CMRepository
> getFileContentsInner
> SEVERE: null
> org.tmatesoft.svn.core.SVNException: svn: E204899: E160004: Checksum
> mismatch while reading representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:85) at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:69) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:135) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.jav
> a:236) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMR
> epository.java:513) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMReposi
> tory.java:446) at
> TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetrei
> ve.java:86) at
> TestCommitReplaceRetreive.main(TestCommitReplaceRetreive.java:48) Caused
> by: java.io.IOException: svn: E160004: Checksum mismatch while reading
> representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSInputStream.read(FSInputStream.java
> :100) at java.io.InputStream.read(InputStream.java:82)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:123) ... 5 more
> Apr 22, 2013 9:29:22 AM com.boeing.sis.mexsat.sra.Versionizer.CMRepository
> getFileContentsInner
> SEVERE: null
> org.tmatesoft.svn.core.SVNException: svn: E204899: E160004: Checksum
> mismatch while reading representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:85) at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:69) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:135) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.jav
> a:236) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMR
> epository.java:513) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMReposi
> tory.java:464) at
> TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetrei
> ve.java:86) at
> TestCommitReplaceRetreive.main(TestCommitReplaceRetreive.java:48) Caused
> by: java.io.IOException: svn: E160004: Checksum mismatch while reading
> representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSInputStream.read(FSInputStream.java
> :100) at java.io.InputStream.read(InputStream.java:82)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:123) ... 5 more
> Apr 22, 2013 9:29:22 AM TestCommitReplaceRetreive TestCommitReplaceRetreive
> SEVERE: null
> org.tmatesoft.svn.core.SVNException: svn: E204899: E160004: Checksum
> mismatch while reading representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:85) at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.ja
> va:69) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:135) at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.jav
> a:236) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMR
> epository.java:513) at
> com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMReposi
> tory.java:464) at
> TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetrei
> ve.java:86) at
> TestCommitReplaceRetreive.main(TestCommitReplaceRetreive.java:48) Caused
> by: java.io.IOException: svn: E160004: Checksum mismatch while reading
> representation:
>    expected:  8a13225f35627a9fa78670a2475e14ea
>      actual:  40b4eb0582fedfc7e455f435f73e7d3d
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSInputStream.read(FSInputStream.java
> :100) at java.io.InputStream.read(InputStream.java:82)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUti
> l.java:123) ... 5 more
> 
> 
> 
> --
> View this message in context:
> http://subversion.1072662.n5.nabble.com/Unable-to-update-matlab-files-stor
> ed-with-svnkit-1-7-5-tp180148p180163.html Sent from the SVNKit - Users
> mailing list archive at Nabble.com.

Reply via email to