Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgBundle.java @ 663:46b56864b483
Pull: phase2 - update phases from remote, fncache with added files. Tests
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Wed, 10 Jul 2013 16:41:49 +0200 |
| parents | 12a4f60ea972 |
| children | fba85bc1dfb8 |
comparison
equal
deleted
inserted
replaced
| 662:af5223b86dd3 | 663:46b56864b483 |
|---|---|
| 411 } | 411 } |
| 412 | 412 |
| 413 private static void readGroup(DataAccess da, Inspector inspector) throws IOException, HgRuntimeException { | 413 private static void readGroup(DataAccess da, Inspector inspector) throws IOException, HgRuntimeException { |
| 414 int len = da.readInt(); | 414 int len = da.readInt(); |
| 415 boolean good2go = true; | 415 boolean good2go = true; |
| 416 Nodeid prevNodeid = Nodeid.NULL; | 416 Nodeid prevNodeid = null; |
| 417 while (len > 4 && !da.isEmpty() && good2go) { | 417 while (len > 4 && !da.isEmpty() && good2go) { |
| 418 byte[] nb = new byte[80]; | 418 byte[] nb = new byte[80]; |
| 419 da.readBytes(nb, 0, 80); | 419 da.readBytes(nb, 0, 80); |
| 420 int dataLength = len - 84 /* length field + 4 nodeids */; | 420 int dataLength = len - 84 /* length field + 4 nodeids */; |
| 421 byte[] data = new byte[dataLength]; | 421 byte[] data = new byte[dataLength]; |
| 496 /** | 496 /** |
| 497 * Revision this element keeps patches against. For the patches of the very first revision returns {@link Nodeid#NULL}. | 497 * Revision this element keeps patches against. For the patches of the very first revision returns {@link Nodeid#NULL}. |
| 498 * @return revision of delta base, never <code>null</code> | 498 * @return revision of delta base, never <code>null</code> |
| 499 */ | 499 */ |
| 500 public Nodeid patchBase() { | 500 public Nodeid patchBase() { |
| 501 return deltaBase; | 501 return deltaBase == null ? firstParent() : deltaBase; |
| 502 } | 502 } |
| 503 | 503 |
| 504 public byte[] rawDataByteArray() throws IOException { // XXX IOException or HgInvalidFileException? | 504 public byte[] rawDataByteArray() throws IOException { // XXX IOException or HgInvalidFileException? |
| 505 return rawData().byteArray(); | 505 return rawData().byteArray(); |
| 506 } | 506 } |
