comparison src/com/tmate/hgkit/ll/Revlog.java @ 39:4e9b66b07a28

Check changelog group starts with proper (known) base
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 14 Jan 2011 01:07:05 +0100
parents e45e75e22523
children 26e3eeaa3962
comparison
equal deleted inserted replaced
38:50dfc69c108e 39:4e9b66b07a28
33 33
34 public int getRevisionCount() { 34 public int getRevisionCount() {
35 return content.revisionCount(); 35 return content.revisionCount();
36 } 36 }
37 37
38 // Till now, i follow approach that NULL nodeid is never part of revlog
39 public boolean isKnown(Nodeid nodeid) {
40 try {
41 int revision = content.findLocalRevisionNumber(nodeid);
42 return revision >= 0 && revision < getRevisionCount();
43 } catch (IllegalArgumentException ex) {
44 // FIXME bad way to figure out if nodeid is from this revlog
45 return false;
46 }
47 }
38 /** 48 /**
39 * Access to revision data as is (decompressed, but otherwise unprocessed, i.e. not parsed for e.g. changeset or manifest entries) 49 * Access to revision data as is (decompressed, but otherwise unprocessed, i.e. not parsed for e.g. changeset or manifest entries)
40 * @param nodeid 50 * @param nodeid
41 */ 51 */
42 public byte[] content(Nodeid nodeid) { 52 public byte[] content(Nodeid nodeid) {