@Nullable
  private static Hash getHeavyBranchMainHash(@NotNull HgRepository repository, @NotNull String branchName) {
    // null for new branch or not heavy ref
    final LinkedHashSet<Hash> branchHashes = repository.getBranches().get(branchName);
    return branchHashes != null ? Objects.requireNonNull(Iterables.getLast(branchHashes)) : null;
  }
@Nullable
  private static Hash getHeavyBranchMainHash(@NotNull HgRepository repository, @NotNull String branchName)