diff src/com/tmate/hgkit/ll/RevlogStream.java @ 37:e45e75e22523

Parse changesets from bundle's changelog group. Refactor Revlog to provide access to revision's raw content
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 14 Jan 2011 00:49:58 +0100
parents 205f9b59b400
children 1b26247d7367
line wrap: on
line diff
--- a/src/com/tmate/hgkit/ll/RevlogStream.java	Thu Jan 13 23:31:39 2011 +0100
+++ b/src/com/tmate/hgkit/ll/RevlogStream.java	Fri Jan 14 00:49:58 2011 +0100
@@ -284,7 +284,8 @@
 
 	// mpatch.c : apply()
 	// FIXME need to implement patch merge (fold, combine, gather and discard from aforementioned mpatch.[c|py]), also see Revlog and Mercurial PDF
-	private static byte[] apply(byte[] baseRevisionContent, int outcomeLen, List<PatchRecord> patch) {
+	// FIXME why 2 arrays (rv and tempBuf)???. Think over in-place merging (perhaps some sparse byte chunk list?) - to minimize mem use.
+	/*package-local for HgBundle; until moved to better place*/static byte[] apply(byte[] baseRevisionContent, int outcomeLen, List<PatchRecord> patch) {
 		byte[] tempBuf = new byte[outcomeLen]; // XXX
 		int last = 0, destIndex = 0;
 		for (PatchRecord pr : patch) {