Iterable<TaskInfo> (@NotNull HgRepository repository) { //be careful with equality names of branches/bookmarks =( Iterable<String> names = ContainerUtil.concat(HgUtil.getSortedNamesWithoutHashes(repository.getBookmarks()), repository.getOpenedBranches()); return ContainerUtil.map(names, s -> new TaskInfo(s, Collections.singleton(repository.getPresentableUrl()))); }