public void closeFile(String path, String textChecksum) throws SVNException { flushPendingProperties(); if (textChecksum != null) { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); FSRevisionNode revNode = myTxnRoot.getRevisionNode(fullPath); FSRepresentation txtRep = revNode.getTextRepresentation(); if (txtRep != null && !textChecksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CHECKSUM_MISMATCH, "Checksum mismatch for resulting fulltext\n({0}):\n expected checksum: {1}\n actual checksum: {2}\n", new Object[] { fullPath, textChecksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS); } } }
public void closeFile(String path, String textChecksum) throws SVNException { flushPendingProperties(); if (textChecksum != null) { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); FSRevisionNode revNode = myTxnRoot.getRevisionNode(fullPath); FSRepresentation txtRep = revNode.getTextRepresentation(); if (txtRep != null && !textChecksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CHECKSUM_MISMATCH, "Checksum mismatch for resulting fulltext\n({0}):\n expected checksum: {1}\n actual checksum: {2}\n", new Object[] { fullPath, textChecksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS); } } }
public void closeFile(String path, String textChecksum) throws SVNException { flushPendingProperties(); if (textChecksum != null) { String fullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(myBasePath, path)); FSRevisionNode revNode = myTxnRoot.getRevisionNode(fullPath); FSRepresentation txtRep = revNode.getTextRepresentation(); if (txtRep != null && !textChecksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CHECKSUM_MISMATCH, "Checksum mismatch for resulting fulltext\n({0}):\n expected checksum: {1}\n actual checksum: {2}\n", new Object[] { fullPath, textChecksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS); } } }
if (!checksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Checksum mismatch while reading representation:\n expected: {0}\n actual: {1}", new Object[] { checksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS);
public void run() throws SVNException { final FSRepresentation oldRep = reposCacheManager.getRepresentationByHash(representation.getSHA1HexDigest()); if (oldRep != null) { oldRep.setUniquifier(representation.getUniquifier()); oldRep.setMD5HexDigest(representation.getMD5HexDigest()); // myRevNode.setTextRepresentation(oldRep); } } });
public String getFileMD5Checksum() throws SVNException { if (getType() != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "Attempted to get checksum of a *non*-file node"); SVNErrorManager.error(err, SVNLogType.FSFS); } return getTextRepresentation() != null ? getTextRepresentation().getMD5HexDigest() : ""; }
public String getFileMD5Checksum() throws SVNException { if (getType() != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "Attempted to get checksum of a *non*-file node"); SVNErrorManager.error(err, SVNLogType.FSFS); } return getTextRepresentation() != null ? getTextRepresentation().getMD5HexDigest() : ""; }
public String getFileMD5Checksum() throws SVNException { if (getType() != SVNNodeKind.FILE) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FILE, "Attempted to get checksum of a *non*-file node"); SVNErrorManager.error(err, SVNLogType.FSFS); } return getTextRepresentation() != null ? getTextRepresentation().getMD5HexDigest() : ""; }
public void run() throws SVNException { FSRepresentation oldRep = reposCacheManager.getRepresentationByHash(rep.getSHA1HexDigest()); if (oldRep != null) { oldRep.setUniquifier(rep.getUniquifier()); oldRep.setMD5HexDigest(rep.getMD5HexDigest()); truncateToSize[0] = myRepOffset; myRevNode.setTextRepresentation(oldRep); } } });
private FSInputStream(SVNDeltaCombiner combiner, FSRepresentation representation, FSFS owner) throws SVNException { myCombiner = combiner; myChunkIndex = 0; isChecksumFinalized = false; myHexChecksum = representation.getMD5HexDigest(); myOffset = 0; myLength = representation.getExpandedSize(); try { myDigest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException nsae) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "MD5 implementation not found: {0}", nsae.getLocalizedMessage()); SVNErrorManager.error(err, nsae, SVNLogType.FSFS); } try { buildRepresentationList(representation, myRepStateList, owner); } catch (SVNException svne) { /* * Something terrible has happened while building rep list, need to * close any files still opened */ close(); throw svne; } }
private FSInputStream(SVNDeltaCombiner combiner, FSRepresentation representation, FSFS owner) throws SVNException { myCombiner = combiner; myChunkIndex = 0; isChecksumFinalized = false; myHexChecksum = representation.getMD5HexDigest(); myOffset = 0; myLength = representation.getExpandedSize(); try { myDigest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException nsae) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "MD5 implementation not found: {0}", nsae.getLocalizedMessage()); SVNErrorManager.error(err, nsae, SVNLogType.FSFS); } try { buildRepresentationList(representation, myRepStateList, owner); } catch (SVNException svne) { /* * Something terrible has happened while building rep list, need to * close any files still opened */ close(); throw svne; } }
private FSInputStream(SVNDeltaCombiner combiner, FSRepresentation representation, FSFS owner) throws SVNException { myCombiner = combiner; myChunkIndex = 0; isChecksumFinalized = false; myHexChecksum = representation.getMD5HexDigest(); myOffset = 0; myLength = representation.getExpandedSize(); try { myDigest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException nsae) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "MD5 implementation not found: {0}", nsae.getLocalizedMessage()); SVNErrorManager.error(err, nsae, SVNLogType.FSFS); } try { buildRepresentationList(representation, myRepStateList, owner); } catch (SVNException svne) { /* * Something terrible has happened while building rep list, need to * close any files still opened */ close(); throw svne; } }
String checksum = revisionFile.digest(); if (!checksum.equals(propsRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Checksum mismatch while reading representation:\n expected: {0}\n actual: {1}", new Object[] { checksum, propsRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS);
String checksum = revisionFile.digest(); if (!checksum.equals(propsRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Checksum mismatch while reading representation:\n expected: {0}\n actual: {1}", new Object[] { checksum, propsRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS);
String checksum = revisionFile.digest(); if (!checksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Checksum mismatch while reading representation:\n expected: {0}\n actual: {1}", new Object[] { checksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS);
String checksum = revisionFile.digest(); if (!checksum.equals(txtRep.getMD5HexDigest())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Checksum mismatch while reading representation:\n expected: {0}\n actual: {1}", new Object[] { checksum, txtRep.getMD5HexDigest() }); SVNErrorManager.error(err, SVNLogType.FSFS);
oldRepresentation.setMD5HexDigest(rep.getMD5HexDigest()); truncateToSize = myRepOffset; myRevNode.setTextRepresentation(oldRepresentation);
oldRepresentation = null; } else { oldRepresentation.setMD5HexDigest(representation.getMD5HexDigest()); oldRepresentation.setUniquifier(representation.getUniquifier());