public RepositoryRoot getRepositoryRootFor(ICVSRepositoryLocation location) { RepositoryRoot root = (RepositoryRoot) repositoryRoots.get(location.getLocation(false)); if (root == null) { root = new RepositoryRoot(location); add(root); } return root; }
/** Get the list of known version tags for a given project. */ public CVSTag[] getKnownTags(ICVSRepositoryLocation location, int tagType) { Set result = new HashSet(); RepositoryRoot root = (RepositoryRoot) repositoryRoots.get(location.getLocation(false)); if (root != null) { String[] paths = root.getKnownRemotePaths(); for (int i = 0; i < paths.length; i++) { String path = paths[i]; CVSTag[] tags = root.getAllKnownTags(path); for (int j = 0; j < tags.length; j++) { CVSTag tag = tags[j]; if (tag.getType() == tagType) result.add(tag); } } } return (CVSTag[]) result.toArray(new CVSTag[0]); }
/** * A repository root has been removed. Remove the tags defined for this root and notify any * listeners */ public void rootRemoved(ICVSRepositoryLocation root) { RepositoryRoot repoRoot = (RepositoryRoot) repositoryRoots.remove(root.getLocation(false)); if (repoRoot != null) broadcastRepositoryChange(repoRoot); }