Mercurial > jhg
diff src/com/tmate/hgkit/ll/Revlog.java @ 21:e929cecae4e1
Refactor to move revlog content to base class
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 05 Jan 2011 04:10:28 +0100 |
parents | 24bb4f365164 |
children | 603806cd2dc6 |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/ll/Revlog.java Tue Jan 04 02:08:25 2011 +0100 +++ b/src/com/tmate/hgkit/ll/Revlog.java Wed Jan 05 04:10:28 2011 +0100 @@ -10,18 +10,24 @@ public abstract class Revlog { private final HgRepository hgRepo; + protected final RevlogStream content; - protected Revlog(HgRepository hgRepo) { + protected Revlog(HgRepository hgRepo, RevlogStream content) { if (hgRepo == null) { throw new NullPointerException(); } this.hgRepo = hgRepo; + this.content = content; } public final HgRepository getRepo() { return hgRepo; } + public int getRevisionCount() { + return content.revisionCount(); + } + public interface Inspector { // XXX boolean retVal to indicate whether to continue? void next(int revisionNumber, int actualLen, int baseRevision, int linkRevision, int parent1Revision, int parent2Revision, byte[/*32*/] nodeid, byte[] data);