Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/RevlogStreamWriter.java @ 608:e1b29756f901
Clean, organize and resolve some TODOs and FIXMEs: minor refactorings and comments
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 07 May 2013 21:27:51 +0200 |
parents | e447384f3771 |
children | 65c01508f002 |
comparison
equal
deleted
inserted
replaced
607:66f1cc23b906 | 608:e1b29756f901 |
---|---|
27 import org.tmatesoft.hg.repo.HgInvalidControlFileException; | 27 import org.tmatesoft.hg.repo.HgInvalidControlFileException; |
28 import org.tmatesoft.hg.repo.HgInvalidStateException; | 28 import org.tmatesoft.hg.repo.HgInvalidStateException; |
29 | 29 |
30 /** | 30 /** |
31 * | 31 * |
32 * TODO separate operation to check if index is too big and split into index+data | 32 * TODO [post-1.1] separate operation to check if index is too big and split into index+data |
33 * | 33 * |
34 * @author Artem Tikhomirov | 34 * @author Artem Tikhomirov |
35 * @author TMate Software Ltd. | 35 * @author TMate Software Ltd. |
36 */ | 36 */ |
37 public class RevlogStreamWriter { | 37 public class RevlogStreamWriter { |
253 public void serialize(DataSerializer out) throws IOException { | 253 public void serialize(DataSerializer out) throws IOException { |
254 header.clear(); | 254 header.clear(); |
255 if (offset == 0) { | 255 if (offset == 0) { |
256 int version = 1 /* RevlogNG */; | 256 int version = 1 /* RevlogNG */; |
257 if (isInline) { | 257 if (isInline) { |
258 final int INLINEDATA = 1 << 16; // FIXME extract constant | 258 version |= RevlogStream.INLINEDATA; |
259 version |= INLINEDATA; | |
260 } | 259 } |
261 header.putInt(version); | 260 header.putInt(version); |
262 header.putInt(0); | 261 header.putInt(0); |
263 } else { | 262 } else { |
264 header.putLong(offset << 16); | 263 header.putLong(offset << 16); |