Mercurial > hg4j
comparison src/org/tmatesoft/hg/repo/HgRepository.java @ 418:528b6780a8bd
A bit of FIXME cleanup (mostly degraded to TODO post 1.0), comments and javadoc
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 22 Mar 2012 21:02:20 +0100 |
parents | bb278ccf9866 |
children | fdd7d756dea0 |
comparison
equal
deleted
inserted
replaced
417:ccd7d25e5aea | 418:528b6780a8bd |
---|---|
178 public HgTags getTags() throws HgInvalidControlFileException { | 178 public HgTags getTags() throws HgInvalidControlFileException { |
179 if (tags == null) { | 179 if (tags == null) { |
180 tags = new HgTags(this); | 180 tags = new HgTags(this); |
181 HgDataFile hgTags = getFileNode(".hgtags"); | 181 HgDataFile hgTags = getFileNode(".hgtags"); |
182 if (hgTags.exists()) { | 182 if (hgTags.exists()) { |
183 for (int i = 0; i <= hgTags.getLastRevision(); i++) { // FIXME in fact, would be handy to have walk(start,end) | 183 for (int i = 0; i <= hgTags.getLastRevision(); i++) { // TODO post-1.0 in fact, would be handy to have walk(start,end) |
184 // method for data files as well, though it looks odd. | 184 // method for data files as well, though it looks odd. |
185 try { | 185 try { |
186 ByteArrayChannel sink = new ByteArrayChannel(); | 186 ByteArrayChannel sink = new ByteArrayChannel(); |
187 hgTags.content(i, sink); | 187 hgTags.content(i, sink); |
188 final String content = new String(sink.toArray(), "UTF8"); | 188 final String content = new String(sink.toArray(), "UTF8"); |
313 // shall be of use only for internal classes | 313 // shall be of use only for internal classes |
314 /*package-local*/ File getRepositoryRoot() { | 314 /*package-local*/ File getRepositoryRoot() { |
315 return repoDir; | 315 return repoDir; |
316 } | 316 } |
317 | 317 |
318 // FIXME remove once NPE in HgWorkingCopyStatusCollector.areTheSame is solved | |
319 /*package-local, debug*/String getStoragePath(HgDataFile df) { | 318 /*package-local, debug*/String getStoragePath(HgDataFile df) { |
319 // may come handy for debug | |
320 return dataPathHelper.rewrite(df.getPath().toString()).toString(); | 320 return dataPathHelper.rewrite(df.getPath().toString()).toString(); |
321 } | 321 } |
322 | 322 |
323 // XXX package-local, unless there are cases when required from outside (guess, working dir/revision walkers may hide dirstate access and no public visibility needed) | 323 // XXX package-local, unless there are cases when required from outside (guess, working dir/revision walkers may hide dirstate access and no public visibility needed) |
324 // XXX consider passing Path pool or factory to produce (shared) Path instead of Strings | 324 // XXX consider passing Path pool or factory to produce (shared) Path instead of Strings |