Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgCloneCommand.java @ 358:fc8bc2f1edbe v0.7.0
Clean internal classes from public API
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 06 Dec 2011 20:02:48 +0100 |
parents | 981f9f50bb6c |
children | 6952d9ce97f1 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgCloneCommand.java Tue Dec 06 19:47:01 2011 +0100 +++ b/src/org/tmatesoft/hg/core/HgCloneCommand.java Tue Dec 06 20:02:48 2011 +0100 @@ -254,7 +254,7 @@ prevRevContent = new ByteArrayDataAccess(new byte[0]); writeComplete = true; } - byte[] content = ge.apply(prevRevContent); + byte[] content = ge.apply(prevRevContent.byteArray()); byte[] calculated = dh.sha1(p1, p2, content).asBinary(); final Nodeid node = ge.node(); if (!node.equalsTo(calculated)) { @@ -272,12 +272,12 @@ link = csRev.intValue(); } final int p1Rev = knownRevision(p1), p2Rev = knownRevision(p2); - DataAccess patchContent = ge.rawData(); - writeComplete = writeComplete || patchContent.length() >= (/* 3/4 of actual */content.length - (content.length >>> 2)); + byte[] patchContent = ge.rawDataByteArray(); + writeComplete = writeComplete || patchContent.length >= (/* 3/4 of actual */content.length - (content.length >>> 2)); if (writeComplete) { base = revisionSequence.size(); } - final byte[] sourceData = writeComplete ? content : patchContent.byteArray(); + final byte[] sourceData = writeComplete ? content : patchContent; final byte[] data; ByteArrayOutputStream bos = new ByteArrayOutputStream(content.length); DeflaterOutputStream dos = new DeflaterOutputStream(bos);