Mercurial > hg4j
comparison src/com/tmate/hgkit/ll/HgRepository.java @ 9:d6d2a630f4a6
Access to underlaying file data wrapped into own Access object, implemented with FileChannel and ByteBuffer
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Sat, 25 Dec 2010 04:45:59 +0100 |
parents | fc265ddeab26 |
children | 382cfe9463db |
comparison
equal
deleted
inserted
replaced
8:a78c980749e3 | 9:d6d2a630f4a6 |
---|---|
28 | 28 |
29 protected void setInvalid(boolean invalid) { | 29 protected void setInvalid(boolean invalid) { |
30 isInvalid = invalid; | 30 isInvalid = invalid; |
31 } | 31 } |
32 | 32 |
33 public void log() { | |
34 Revlog clog = getChangelog(); | |
35 assert clog != null; | |
36 // TODO get data to the client | |
37 } | |
38 | |
39 public final Changelog getChangelog() { | 33 public final Changelog getChangelog() { |
40 if (this.changelog == null) { | 34 if (this.changelog == null) { |
41 // might want delegate to protected createChangelog() some day | 35 // might want delegate to protected createChangelog() some day |
42 RevlogStream content = resolve("store/00changelog.i"); // XXX perhaps, knowledge about filenames should be in LocalHgRepo? | 36 RevlogStream content = resolve(toStoragePath("00changelog.i", false)); // XXX perhaps, knowledge about filenames should be in LocalHgRepo? |
43 this.changelog = new Changelog(this, content); | 37 this.changelog = new Changelog(this, content); |
44 } | 38 } |
45 return this.changelog; | 39 return this.changelog; |
46 } | 40 } |
47 | 41 |
59 public abstract HgDataFile getFileNode(String path); | 53 public abstract HgDataFile getFileNode(String path); |
60 | 54 |
61 public abstract String getLocation(); | 55 public abstract String getLocation(); |
62 | 56 |
63 | 57 |
58 protected abstract String toStoragePath(String path, boolean isData); | |
59 | |
64 /** | 60 /** |
65 * Perhaps, should be separate interface, like ContentLookup | 61 * Perhaps, should be separate interface, like ContentLookup |
66 */ | 62 */ |
67 protected abstract RevlogStream resolve(String string); | 63 protected abstract RevlogStream resolve(String repositoryPath); |
68 } | 64 } |