Package org.tmatesoft.svn.core.internal.wc.admin

Examples of org.tmatesoft.svn.core.internal.wc.admin.SVNChecksumOutputStream


            InputStream srcIS = null;
            OutputStream copiedBaseOS = null;
            try {
                srcIS = SVNFileUtil.openFileForReading(srcArea.getFile(srcTextBasePath));
                copiedBaseOS = SVNFileUtil.openFileForWriting(info.copiedBaseText);
                SVNChecksumOutputStream checksumOS = new SVNChecksumOutputStream(copiedBaseOS,
                        SVNChecksumOutputStream.MD5_ALGORITHM, true);
                copiedBaseOS = checksumOS;
                FSRepositoryUtil.copy(srcIS, copiedBaseOS, myWCAccess);
                info.copiedBaseChecksum = checksumOS.getDigest();
            } finally {
                SVNFileUtil.closeFile(srcIS);
                SVNFileUtil.closeFile(copiedBaseOS);
            }

            if (srcArea.hasTextModifications(srcEntry.getName(), false, true, false)) {
                info.copiedWorkingText = SVNAdminUtil.createTmpFile(adminArea);
                SVNFileUtil.copyFile(srcArea.getFile(srcEntry.getName()), info.copiedWorkingText, true);
            }
        } else {
            if (myFileFetcher == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_INVALID_OP_ON_CWD,
                        "No fetch_func supplied to update_editor.");
                SVNErrorManager.error(err, SVNLogType.DEFAULT);
            }

            baseProperties = new SVNProperties();
            OutputStream baseTextOS = null;
            try {
                baseTextOS = SVNFileUtil.openFileForWriting(info.copiedBaseText);
                SVNChecksumOutputStream checksumBaseTextOS = new SVNChecksumOutputStream(baseTextOS,
                        SVNChecksumOutputStream.MD5_ALGORITHM, true);
                baseTextOS = checksumBaseTextOS;
                myFileFetcher.fetchFile(copyFromPath, copyFromRevision, baseTextOS, baseProperties);
                info.copiedBaseChecksum = checksumBaseTextOS.getDigest();
            } finally {
                SVNFileUtil.closeFile(baseTextOS);
            }
           
            workingProperties = baseProperties;
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.wc.admin.SVNChecksumOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.