* if an error occurs
*/
private Id markBranches() throws Exception {
/* Mark all branch commits */
for (Entry<Id, Id> entry : branches.entrySet()) {
Id branchRootId = entry.getKey();
Id branchHeadId = entry.getValue();
while (!branchHeadId.equals(branchRootId)) {
StoredCommit commit = getCommit(branchHeadId);
markCommit(commit);
branchHeadId = commit.getParentId();
}
}
/* Mark all master commits till the first branch root id */
if (!branches.isEmpty()) {
Id firstBranchRootId = branches.keySet().iterator().next();
StoredCommit commit = getHeadCommit();
for (;;) {
markCommit(commit);
if (commit.getId().equals(firstBranchRootId)) {