use of com.intellij.vcs.log.Hash in project intellij-community by JetBrains.
the class HgCompareWithBranchAction method getBranchNamesExceptCurrent.
@NotNull
@Override
protected List<String> getBranchNamesExceptCurrent(@NotNull HgRepository repository) {
final List<String> namesToCompare = new ArrayList<>(repository.getBranches().keySet());
final String currentBranchName = repository.getCurrentBranchName();
assert currentBranchName != null;
final Hash currentHash = getCurrentHash(repository);
if (currentHash.equals(getHeavyBranchMainHash(repository, currentBranchName))) {
namesToCompare.remove(currentBranchName);
}
namesToCompare.addAll(HgUtil.getNamesWithoutHashes(getOtherBookmarks(repository, currentHash)));
return namesToCompare;
}
Aggregations