use of org.jetbrains.idea.svn.browse.DirectoryEntryConsumer in project intellij-community by JetBrains.
the class SvnUtil method remoteFolderIsEmpty.
public static boolean remoteFolderIsEmpty(@NotNull SvnVcs vcs, @NotNull String url) throws VcsException {
SvnTarget target = SvnTarget.fromURL(createUrl(url));
Ref<Boolean> result = new Ref<>(true);
DirectoryEntryConsumer handler = entry -> {
if (entry != null) {
result.set(false);
}
};
vcs.getFactory(target).createBrowseClient().list(target, null, Depth.IMMEDIATES, handler);
return result.get();
}
use of org.jetbrains.idea.svn.browse.DirectoryEntryConsumer in project intellij-community by JetBrains.
the class BranchesLoader method loadBranches.
@NotNull
public List<SvnBranchItem> loadBranches() throws SVNException, VcsException {
SvnVcs vcs = SvnVcs.getInstance(myProject);
SVNURL branchesUrl = SVNURL.parseURIEncoded(myUrl);
List<SvnBranchItem> result = new LinkedList<>();
SvnTarget target = SvnTarget.fromURL(branchesUrl);
DirectoryEntryConsumer handler = createConsumer(result);
vcs.getFactory(target).create(BrowseClient.class, !myPassive).list(target, SVNRevision.HEAD, Depth.IMMEDIATES, handler);
Collections.sort(result);
return result;
}
Aggregations