private @NotNull VcsAbstractHistorySession createAppendableSession(@NotNull VirtualFile vcsRoot,
                                                                     @NotNull FilePath filePath,
                                                                     @NotNull List<VcsFileRevision> revisions,
                                                                     @Nullable VcsRevisionNumber number) {
    return new VcsAbstractHistorySession(revisions, number) {
      @Override
      protected @Nullable VcsRevisionNumber calcCurrentRevisionNumber() {
        if (filePath.isDirectory()) return new HgWorkingCopyRevisionsCommand(myProject).firstParent(vcsRoot);
        return new HgWorkingCopyRevisionsCommand(myProject).parents(vcsRoot, filePath).first;
      }

      @Override
      public VcsHistorySession copy() {
        return createAppendableSession(vcsRoot, filePath, getRevisionList(), getCurrentRevisionNumber());
      }
    };
  }
private @NotNull VcsAbstractHistorySession createAppendableSession(@NotNull VirtualFile vcsRoot,
                                                                     @NotNull FilePath filePath,
                                                                     @NotNull List<VcsFileRevision> revisions,
                                                                     @Nullable VcsRevisionNumber number)