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.java:85)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUtil.java:135)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.java:236)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMRepository.java:513)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMRepository.java:446)
        at
TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetreive.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(FSRepositoryUtil.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.java:85)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUtil.java:135)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.java:236)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMRepository.java:513)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMRepository.java:464)
        at
TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetreive.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(FSRepositoryUtil.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.java:85)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:69)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepositoryUtil.copy(FSRepositoryUtil.java:135)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.getFile(FSRepository.java:236)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContentsInner(CMRepository.java:513)
        at
com.boeing.sis.mexsat.sra.Versionizer.CMRepository.getFileContents(CMRepository.java:464)
        at
TestCommitReplaceRetreive.TestCommitReplaceRetreive(TestCommitReplaceRetreive.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(FSRepositoryUtil.java:123)
        ... 5 more



--
View this message in context: 
http://subversion.1072662.n5.nabble.com/Unable-to-update-matlab-files-stored-with-svnkit-1-7-5-tp180148p180163.html
Sent from the SVNKit - Users mailing list archive at Nabble.com.

Reply via email to