PreUpdateInformation () { List<HgRevisionNumber> currentHeads = new HgHeadsCommand(myProject, projectRepoVirtualFile).executeInCurrentThread(); List<HgRevisionNumber> incomingChangesets = new HgIncomingCommand(myProject).executeInCurrentThread(projectRepoVirtualFile); assertEquals(1, currentHeads.size()); assertEquals(1, incomingChangesets.size()); incomingHead = incomingChangesets.get(0); headBeforeUpdate = currentHeads.get(0); return this; }