Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/Revlog.java @ 115:c0cc2535462c
Introduced channels to pipeline (and easily filter) data streams
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 03 Feb 2011 23:32:08 +0100 |
parents | a3a2e5deb320 |
children | 3959bffb14e9 |
comparison
equal
deleted
inserted
replaced
114:46291ec605a0 | 115:c0cc2535462c |
---|---|
36 * @author Artem Tikhomirov | 36 * @author Artem Tikhomirov |
37 * @author TMate Software Ltd. | 37 * @author TMate Software Ltd. |
38 */ | 38 */ |
39 abstract class Revlog { | 39 abstract class Revlog { |
40 | 40 |
41 private final HgRepository hgRepo; | 41 private final HgRepository repo; |
42 protected final RevlogStream content; | 42 protected final RevlogStream content; |
43 | 43 |
44 protected Revlog(HgRepository hgRepo, RevlogStream content) { | 44 protected Revlog(HgRepository hgRepo, RevlogStream contentStream) { |
45 if (hgRepo == null) { | 45 if (hgRepo == null) { |
46 throw new IllegalArgumentException(); | 46 throw new IllegalArgumentException(); |
47 } | 47 } |
48 if (content == null) { | 48 if (contentStream == null) { |
49 throw new IllegalArgumentException(); | 49 throw new IllegalArgumentException(); |
50 } | 50 } |
51 this.hgRepo = hgRepo; | 51 repo = hgRepo; |
52 this.content = content; | 52 content = contentStream; |
53 } | |
54 | |
55 // invalid Revlog | |
56 protected Revlog(HgRepository hgRepo) { | |
57 repo = hgRepo; | |
58 content = null; | |
53 } | 59 } |
54 | 60 |
55 public final HgRepository getRepo() { | 61 public final HgRepository getRepo() { |
56 return hgRepo; | 62 return repo; |
57 } | 63 } |
58 | 64 |
59 public int getRevisionCount() { | 65 public int getRevisionCount() { |
60 return content.revisionCount(); | 66 return content.revisionCount(); |
61 } | 67 } |