diff src/org/tmatesoft/hg/internal/RevlogStream.java @ 170:71ddbf8603e8

Initial clone: populate given directory from a bundle. Everything but remote server access is there, albeit prototype code style
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 23 Mar 2011 20:46:00 +0100
parents b413b16d10a5
children 33a7d76f067b
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RevlogStream.java	Wed Mar 23 14:13:11 2011 +0100
+++ b/src/org/tmatesoft/hg/internal/RevlogStream.java	Wed Mar 23 20:46:00 2011 +0100
@@ -241,7 +241,7 @@
 						streamDataAccess = daData;
 						daData.seek(streamOffset);
 					}
-					final boolean patchToPrevious = baseRevision != i; // XXX not sure if this is the right way to detect a patch
+					final boolean patchToPrevious = baseRevision != i; // the only way I found to tell if it's a patch
 					firstByte = streamDataAccess.readByte();
 					if (firstByte == 0x78 /* 'x' */) {
 						userDataAccess = new InflaterDataAccess(streamDataAccess, streamOffset, compressedLen, patchToPrevious ? -1 : actualLen);
@@ -300,7 +300,7 @@
 		DataAccess da = getIndexStream();
 		try {
 			int versionField = da.readInt();
-			da.readInt(); // just to skip next 2 bytes of offset + flags
+			da.readInt(); // just to skip next 4 bytes of offset + flags
 			final int INLINEDATA = 1 << 16;
 			inline = (versionField & INLINEDATA) != 0;
 			long offset = 0; // first offset is always 0, thus Hg uses it for other purposes