mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
only opened branches should be shown as common in branches widget
This commit is contained in:
@@ -16,13 +16,15 @@
|
||||
package org.zmlx.hg4idea.branch;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.vcs.log.Hash;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.zmlx.hg4idea.HgNameWithHashInfo;
|
||||
import org.zmlx.hg4idea.repo.HgRepository;
|
||||
import org.zmlx.hg4idea.util.HgUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class HgBranchUtil {
|
||||
|
||||
@@ -33,8 +35,7 @@ public class HgBranchUtil {
|
||||
public static List<String> getCommonBranches(@NotNull Collection<HgRepository> repositories) {
|
||||
Collection<String> commonBranches = null;
|
||||
for (HgRepository repository : repositories) {
|
||||
Map<String, Set<Hash>> branchesWithHashes = repository.getBranches();
|
||||
Collection<String> names = branchesWithHashes.keySet();
|
||||
Collection<String> names = repository.getOpenedBranches();
|
||||
if (commonBranches == null) {
|
||||
commonBranches = names;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user