comparison src/org/tmatesoft/hg/repo/HgBranches.java @ 433:be697c3e951e

Revlog.RevisionMap helper class got promoted as TLC, renamed to HgRevisionMap
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 30 Mar 2012 16:43:09 +0200
parents 1fc0da631200
children 909306e412e2
comparison
equal deleted inserted replaced
432:1fc0da631200 433:be697c3e951e
215 } 215 }
216 branches.put(bn, bi); 216 branches.put(bn, bi);
217 } 217 }
218 } 218 }
219 final HgChangelog clog = repo.getChangelog(); 219 final HgChangelog clog = repo.getChangelog();
220 final HgChangelog.RevisionMap rmap = clog.new RevisionMap().init(); 220 final HgRevisionMap<HgChangelog> rmap = new HgRevisionMap<HgChangelog>(clog).init();
221 for (BranchInfo bi : branches.values()) { 221 for (BranchInfo bi : branches.values()) {
222 bi.validate(clog, rmap); 222 bi.validate(clog, rmap);
223 } 223 }
224 ps.done(); 224 ps.done();
225 } 225 }
294 // proper BI in #collect() 294 // proper BI in #collect()
295 BranchInfo(String branchName, Nodeid[] branchHeads) { 295 BranchInfo(String branchName, Nodeid[] branchHeads) {
296 this(branchName, Nodeid.NULL, branchHeads); 296 this(branchName, Nodeid.NULL, branchHeads);
297 } 297 }
298 298
299 void validate(HgChangelog clog, HgChangelog.RevisionMap rmap) throws HgInvalidControlFileException { 299 void validate(HgChangelog clog, HgRevisionMap<HgChangelog> rmap) throws HgInvalidControlFileException {
300 int[] localCset = new int[heads.size()]; 300 int[] localCset = new int[heads.size()];
301 int i = 0; 301 int i = 0;
302 for (Nodeid h : heads) { 302 for (Nodeid h : heads) {
303 localCset[i++] = rmap.revisionIndex(h); 303 localCset[i++] = rmap.revisionIndex(h);
304 } 304 }