@Test
  public void updateKeepsWorkingAfterPull() throws Exception {

    changeFile_A_AndCommitInRemoteRepository();

    // do a simple pull without an update
    HgPullCommand pull = new HgPullCommand(myProject, projectRepoVirtualFile);
    pull.setSource(new HgShowConfigCommand(myProject).getDefaultPath(projectRepoVirtualFile));
    pull.setUpdate(false);
    pull.execute();

    assertEquals(
        determineNumberOfIncomingChanges(projectRepo),
        0,
        "The update operation should have pulled the incoming changes from the default repository.");

    updateThroughPlugin();

    HgRevisionNumber parentRevision =
        new HgWorkingCopyRevisionsCommand(myProject).firstParent(projectRepoVirtualFile);
    assertEquals(
        parentRevision.getRevision(),
        "1",
        "The working directory should have been updated to the latest version");
  }