final HgChangelog clog = repo.getChangelog();
final Nodeid headCset1 = clog.getRevision(firstCset);
dirstateBuilder.parents(headCset1, clog.getRevision(secondCset));
//
MergeStateBuilder mergeStateBuilder = new MergeStateBuilder(implRepo);
mergeStateBuilder.prepare(headCset1);
ManifestRevision m1, m2, ma;
m1 = new ManifestRevision(cacheRevs, cacheFiles).init(repo, firstCset);
m2 = new ManifestRevision(cacheRevs, cacheFiles).init(repo, secondCset);
ma = new ManifestRevision(cacheRevs, cacheFiles).init(repo, ancestorCset);