assertTrue("[sanity]", fileD.canRead());
//
RepoUtils.modifyFileAppend(fileD, " 1 \n");
final int parentCsetRevIndex = hgRepo.getChangelog().getLastRevision();
CommitFacility cf = new CommitFacility(Internals.getInstance(hgRepo), parentCsetRevIndex);
FileContentSupplier contentProvider = new FileContentSupplier(hgRepo, fileD);
cf.add(dfD, contentProvider);
cf.branch("branch1");
Transaction tr = newTransaction(hgRepo);
Nodeid commitRev1 = cf.commit("FIRST", tr);
//
RepoUtils.modifyFileAppend(fileD, " 2 \n");
cf.add(dfD, contentProvider = new FileContentSupplier(hgRepo, fileD));
cf.branch("branch2");
Nodeid commitRev2 = cf.commit("SECOND", tr);
//
RepoUtils.modifyFileAppend(fileD, " 2 \n");
cf.add(dfD, contentProvider = new FileContentSupplier(hgRepo, fileD));
cf.branch(DEFAULT_BRANCH_NAME);
Nodeid commitRev3 = cf.commit("THIRD", tr);
tr.commit();
//
List<HgChangeset> commits = new HgLogCommand(hgRepo).range(parentCsetRevIndex+1, TIP).execute();