mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Show branch name only once in case of multiple heads ( in status bar widget and log branch filter).
This commit is contained in:
@@ -620,12 +620,14 @@ public abstract class HgUtil {
|
||||
}
|
||||
|
||||
public static List<String> getNamesWithoutHashes(Collection<HgNameWithHashInfo> namesWithHashes) {
|
||||
return ContainerUtil.map(namesWithHashes, new Function<HgNameWithHashInfo, String>() {
|
||||
@Override
|
||||
public String fun(HgNameWithHashInfo info) {
|
||||
return info.getName();
|
||||
//return names without duplication (actually for several heads in one branch)
|
||||
List<String> names = new ArrayList<String>();
|
||||
for (HgNameWithHashInfo hash : namesWithHashes) {
|
||||
if (!names.contains(hash.getName())) {
|
||||
names.add(hash.getName());
|
||||
}
|
||||
});
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user