comparison src/com/tmate/hgkit/ll/HgDataFile.java @ 22:603806cd2dc6

Status of local working dir against non-tip base revision
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 06 Jan 2011 03:30:20 +0100
parents e929cecae4e1
children e45e75e22523
comparison
equal deleted inserted replaced
21:e929cecae4e1 22:603806cd2dc6
30 30
31 public String getPath() { 31 public String getPath() {
32 return path; // hgRepo.backresolve(this) -> name? 32 return path; // hgRepo.backresolve(this) -> name?
33 } 33 }
34 34
35 public int length(Nodeid nodeid) {
36 int revision = content.findLocalRevisionNumber(nodeid);
37 return content.dataLength(revision);
38 }
39
35 public byte[] content() { 40 public byte[] content() {
36 return content(TIP); 41 return content(TIP);
37 } 42 }
43
44 public byte[] content(Nodeid nodeid) {
45 int revision = content.findLocalRevisionNumber(nodeid);
46 return content(revision);
47 }
38 48
49 /**
50 * @param revision - repo-local index of this file change (not a changelog revision number!)
51 */
39 public byte[] content(int revision) { 52 public byte[] content(int revision) {
40 final byte[][] dataPtr = new byte[1][]; 53 final byte[][] dataPtr = new byte[1][];
41 Revlog.Inspector insp = new Revlog.Inspector() { 54 Revlog.Inspector insp = new Revlog.Inspector() {
42 public void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[] nodeid, byte[] data) { 55 public void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[] nodeid, byte[] data) {
43 dataPtr[0] = data; 56 dataPtr[0] = data;