@Override
  @NotNull
  protected Collection<Change> getDiffChanges(@NotNull Project project,
                                              @NotNull VirtualFile file,
                                              @NotNull String branchToCompare) throws VcsException {
    HgRepository repository = getRepositoryManager(project).getRepositoryForFile(file);
    if (repository == null) {
      throw new VcsException(HgBundle.message("error.cannot.find.repository.for.file", file.getName()));
    }
    final FilePath filePath = VcsUtil.getFilePath(file);
    final VirtualFile repositoryRoot = repository.getRoot();

    final HgFile hgFile = new HgFile(repositoryRoot, filePath);
    final HgRevisionNumber compareWithRevisionNumber = getBranchRevisionNumber(repository, branchToCompare);
    List<Change> changes = HgUtil.getDiff(project, repositoryRoot, filePath, compareWithRevisionNumber, null);
    if (changes.isEmpty() && !existInBranch(repository, filePath, compareWithRevisionNumber)) {
      throw new VcsException(fileDoesntExistInBranchError(file, branchToCompare));
    }

    return changes.isEmpty() && !filePath.isDirectory() ? createChangesWithCurrentContentForFile(filePath, HgContentRevision
      .create(project, hgFile, compareWithRevisionNumber)) : changes;
  }
@Override
  @NotNull
  protected Collection<Change> getDiffChanges(@NotNull Project project,
                                              @NotNull VirtualFile file,
                                              @NotNull String branchToCompare)