コード例 #1
0
 public RepositoryRoot getRepositoryRootFor(ICVSRepositoryLocation location) {
   RepositoryRoot root = (RepositoryRoot) repositoryRoots.get(location.getLocation(false));
   if (root == null) {
     root = new RepositoryRoot(location);
     add(root);
   }
   return root;
 }
コード例 #2
0
 /** 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]);
 }
コード例 #3
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);
 }