Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 97:ee2c750b036d
Changelog to HgChangelog
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 27 Jan 2011 21:25:21 +0100 |
parents | c2ce1cfaeb9e |
children | a3a2e5deb320 |
comparison
equal
deleted
inserted
replaced
96:ace7042a5ce6 | 97:ee2c750b036d |
---|---|
62 } | 62 } |
63 }; | 63 }; |
64 private final PathRewrite dataPathHelper; | 64 private final PathRewrite dataPathHelper; |
65 private final PathRewrite repoPathHelper; | 65 private final PathRewrite repoPathHelper; |
66 | 66 |
67 private Changelog changelog; | 67 private HgChangelog changelog; |
68 private HgManifest manifest; | 68 private HgManifest manifest; |
69 private HgTags tags; | 69 private HgTags tags; |
70 // XXX perhaps, shall enable caching explicitly | 70 // XXX perhaps, shall enable caching explicitly |
71 private final HashMap<Path, SoftReference<RevlogStream>> streamsCache = new HashMap<Path, SoftReference<RevlogStream>>(); | 71 private final HashMap<Path, SoftReference<RevlogStream>> streamsCache = new HashMap<Path, SoftReference<RevlogStream>>(); |
72 | 72 |
97 | 97 |
98 public boolean isInvalid() { | 98 public boolean isInvalid() { |
99 return repoDir == null || !repoDir.exists() || !repoDir.isDirectory(); | 99 return repoDir == null || !repoDir.exists() || !repoDir.isDirectory(); |
100 } | 100 } |
101 | 101 |
102 public Changelog getChangelog() { | 102 public HgChangelog getChangelog() { |
103 if (this.changelog == null) { | 103 if (this.changelog == null) { |
104 String storagePath = repoPathHelper.rewrite("00changelog.i"); | 104 String storagePath = repoPathHelper.rewrite("00changelog.i"); |
105 RevlogStream content = resolve(Path.create(storagePath)); | 105 RevlogStream content = resolve(Path.create(storagePath)); |
106 this.changelog = new Changelog(this, content); | 106 this.changelog = new HgChangelog(this, content); |
107 } | 107 } |
108 return this.changelog; | 108 return this.changelog; |
109 } | 109 } |
110 | 110 |
111 public HgManifest getManifest() { | 111 public HgManifest getManifest() { |