<p>removeRepository.</p>

@param repo a {@link com.greenpepper.server.domain.Repository} object.
@throws com.greenpepper.server.GreenPepperServerException if any.
327555
public void removeRepository(Repository repo) throws GreenPepperServerException
    {
        if(!repositories.contains(repo))
        {
            throw new GreenPepperServerException( GreenPepperServerErrorKey.REPOSITORY_NOT_FOUND, "Repository not found");
        }

        repositories.remove(repo);
        repo.setProject(null);
    }
1309508
def close(self):
        

        # Imports
        import h5py as h5
        from ..error import RepoError

        # Close the repo if it's bound, and wipe link; else complain
        if self._repo != None:
            self._repo.close()
            self._repo = None
            # Leave self.fname defined for potential easy re-opening later on.
        else:
            raise RepoError(RepoError.STATUS,
                    "Cannot close; no repository open",
                    "Last repo: {0}".format(self.fname))
1032580
@Override
    protected void removeWithoutCommit(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException {
        remove(subject, predicate, object, contexts);
    }
1132879
public void removeOfflineJspFromRepository(CmsResource resource) throws CmsLoaderException {

        String jspName = getJspRfsPath(resource, false);
        Set<String> pathSet = new HashSet<String>();
        pathSet.add(resource.getRootPath());
        ReentrantReadWriteLock lock = getFileLock(jspName);
        lock.writeLock().lock();
        try {
            removeFromCache(pathSet, false);
            File jspFile = new File(jspName);
            jspFile.delete();
        } finally {
            lock.writeLock().unlock();
        }
    }
388362
public void remove() throws RepositoryException
   {
      NodeData vhnode = (NodeData)dataManager.getItemData(vhID);

      if (vhnode == null)
      {
         ItemState vhState = null;
         List<ItemState> allStates = transientChangesLog.getAllStates();
         for (int i = allStates.size() - 1; i >= 0; i--)
         {
            ItemState state = allStates.get(i);
            if (state.getData().getIdentifier().equals(vhID))
               vhState = state;
         }
         if (vhState != null && vhState.isDeleted())
         {
            return;
         }

         throw new RepositoryException("Version history is not found. UUID: " + vhID
            + ". Context item (ancestor to save) " + ancestorToSave.getAsString());
      }

      // mix:versionable
      // we have to be sure that any versionable node somewhere in repository
      // doesn't refers to a VH of the node being deleted.
      for (String wsName : repository.getWorkspaceNames())
      {
         SessionImpl wsSession = repository.getSystemSession(wsName);
         try
         {
            for (PropertyData sref : wsSession.getTransientNodesManager().getReferencesData(vhID, false))
            {
               // Check if this VH isn't referenced from somewhere in workspace
               // or isn't contained in another one as a child history.
               // Ask ALL references incl. properties from version storage.
               if (sref.getQPath().isDescendantOf(Constants.JCR_VERSION_STORAGE_PATH))
               {
                  if (!sref.getQPath().isDescendantOf(vhnode.getQPath())
                     && (containingHistory != null ? !sref.getQPath().isDescendantOf(containingHistory) : true))
                     // has a reference to the VH in version storage,
                     // it's a REFERENCE property jcr:childVersionHistory of
                     // nt:versionedChild
                     // i.e. this VH is a child history in an another history.
                     // We can't remove this VH now.
                     return;
               }
               else if (!currentWorkspaceName.equals(wsName))
               {
                  // has a reference to the VH in traversed workspace,
                  // it's not a version storage, i.e. it's a property of versionable
                  // node somewhere in ws.
                  // We can't remove this VH now.
                  return;
               } // else -- if we has a references in workspace where the VH is being
               // deleted we can remove VH now.
            }
         }
         finally
         {
            wsSession.logout();
         }
      }

      // remove child versions from VH (if found)
      // ChildVersionRemoveVisitor cvremover = new
      // ChildVersionRemoveVisitor(session,
      // vhnode.getQPath(),
      // ancestorToSave);
      // vhnode.accept(cvremover);

      List<NodeData> childs = dataManager.getChildNodesData(vhnode);
      for (NodeData nodeData : childs)
      {
         if (ntManager.isNodeType(Constants.NT_VERSIONEDCHILD, vhnode.getPrimaryTypeName(), vhnode.getMixinTypeNames()))
         {
            PropertyData property =
               (PropertyData)dataManager.getItemData(nodeData, new QPathEntry(Constants.JCR_CHILDVERSIONHISTORY, 1),
                  ItemType.PROPERTY);

            if (property == null)
               throw new RepositoryException("Property " + Constants.JCR_CHILDVERSIONHISTORY.getAsString()
                  + " for node " + nodeData.getQPath().getAsString() + " not found");

            String childVhID = ValueDataUtil.getString(property.getValues().get(0));
            VersionHistoryRemover historyRemover =
               new VersionHistoryRemover(childVhID, dataManager, ntManager, repository, currentWorkspaceName,
                  containingHistory, ancestorToSave, transientChangesLog, accessManager, userState);
            historyRemover.remove();

         }

      }
      // remove VH
      ItemDataRemoveVisitor visitor = new ItemDataRemoveVisitor(dataManager, ancestorToSave);
      vhnode.accept(visitor);
      transientChangesLog.addAll(visitor.getRemovedStates());
   }
720333
public function removeComposerRepository($repo_url) {
    $composer_json = $this->getComposerJson();
    if (!empty($composer_json['repositories'])) {
      foreach ($composer_json['repositories'] as $key => $repo) {
        $url = $repo['url'];
        if ($repo_url == $url) {
          unset($composer_json['repositories'][$key]);
          $this->writeComposerJson($composer_json);

          return TRUE;
        }
      }
    }
    return FALSE;
  }
890944
private void removeOldStructure() throws RepositoryException
   {
      ExtendedSession session = (ExtendedSession)service.getStorageSession();
      try
      {
         if (session.itemExists(storagePathOld))
         {
            NodeIterator usersIter = ((ExtendedNode)session.getItem(usersStorageOld)).getNodesLazily();
            while (usersIter.hasNext())
            {
               Node currentUser = usersIter.nextNode();
               currentUser.remove();
               session.save();
            }

            NodeIterator groupsIter = ((ExtendedNode)session.getItem(groupsStorageOld)).getNodesLazily();
            while (groupsIter.hasNext())
            {
               Node currentGroup = groupsIter.nextNode();
               currentGroup.remove();
               session.save();
            }

            NodeIterator membershipTypesIter =
               ((ExtendedNode)session.getItem(membershipTypesStorageOld)).getNodesLazily();
            while (membershipTypesIter.hasNext())
            {
               Node currentMembershipType = membershipTypesIter.nextNode();
               currentMembershipType.remove();
               session.save();
            }

            session.getItem(storagePathOld).remove();
            session.save();
         }
      }
      finally
      {
         session.logout();
      }
   }
1326850
public void addRepository(RepositoryAdmin repositoryAdmin, String repository)
    {
        try {
            if (repository != null)
            {
                boolean duplicate = false;
                for (Repository repo : repositoryAdmin.listRepositories())
                {
                    if (repository.equalsIgnoreCase(repo.getURI()))
                        duplicate = true;
                }
                if (!duplicate)
                {
                    Repository repo = repositoryAdmin.addRepository(repository);
                    if (repo == null)
                        repositoryAdmin.removeRepository(repository);   // Ignore repos not found
                }
            }
        } catch (Exception e) {
            // Ignore exception e.printStackTrace();
        }
    }
720234
public CompletableFuture<Revision> removeRepo(Author author, String projectName, String repoName) {
        requireNonNull(author, "author");
        requireNonNull(projectName, "projectName");
        requireNonNull(repoName, "repoName");

        final JsonPointer path = JsonPointer.compile("/repos" + encodeSegment(repoName) + "/removal");
        final Change<JsonNode> change =
                Change.ofJsonPatch(METADATA_JSON,
                                   asJsonArray(new TestAbsenceOperation(path),
                                               new AddOperation(path, Jackson.valueToTree(
                                                       UserAndTimestamp.of(author)))));
        final String commitSummary = "Remove the repo '" + repoName + "' from the project " + projectName;
        return metadataRepo.push(projectName, Project.REPO_DOGMA, author, commitSummary, change);
    }
289550
func (v Vacuum) RemoveRepository(repoName string) error {
	rootForRepository, err := pathFor(repositoriesRootPathSpec{})
	if err != nil {
		return err
	}
	repoDir := path.Join(rootForRepository, repoName)
	dcontext.GetLogger(v.ctx).Infof("Deleting repo: %s", repoDir)
	err = v.driver.Delete(v.ctx, repoDir)
	if err != nil {
		return err
	}

	return nil
}
589884
def delete_repository(self, namespace, repository):
        """"""
        return self._http_call(self.REPO, delete,
                               namespace=namespace, repository=repository)
839646
public function actionRemove($repo)
    {
        FileHelper::removeDirectory($this->getFilesystemRepoPath($repo));
        $clones = $this->getConfig(self::CONFIG_VAR_CUSTOMCLONES, []);
        if (isset($clones[$repo])) {
            unset($clones[$repo]);
            $this->saveConfig(self::CONFIG_VAR_CUSTOMCLONES, $clones);
        }
        
        return $this->outputSuccess("Removed repo {$repo}.");
    }
1159149
protected void removeWorkspace(ManageableRepository mr, String workspaceName) throws RepositoryException
   {

      boolean isExists = false;
      for (String wsName : mr.getWorkspaceNames())
         if (workspaceName.equals(wsName))
         {
            isExists = true;
            break;
         }

      if (isExists)
      {
         if (!mr.canRemoveWorkspace(workspaceName))
         {
            WorkspaceContainerFacade wc = mr.getWorkspaceContainer(workspaceName);
            SessionRegistry sessionRegistry = (SessionRegistry)wc.getComponent(SessionRegistry.class);
            sessionRegistry.closeSessions(workspaceName);
         }

         mr.removeWorkspace(workspaceName);
      }
   }
1265263
public void removeRepository(String id) {
      for (UpdateRepository repo : getRepositories()) {
        if (id.equals(repo.getId())) {
          repositories.remove(repo);
          break;
        }
      }
      log.warn("Repository with id " + id + " not found, doing nothing");
    }
586054
public function uninstall(\Composer\Repository\InstalledRepositoryInterface $repo, \Composer\Package\PackageInterface $package) {
    	$this->moveBackResources($package);
    	
    	if (!$this->isTmplPackage($package)) {
    		$pattern = '/' . $this->getModuleName($package);
	    	$this->removeFromGitIgnore($this->getVarDestDirPath() . DIRECTORY_SEPARATOR . self::ETC_DIR,
	    			$pattern);
	    	$this->removeFromGitIgnore($this->getPublicDestDirPath() . DIRECTORY_SEPARATOR . self::ASSETS_DIR,
	    			$pattern);
			parent::uninstall($repo, $package);
    	} else {
    		$repo->removePackage($package);
    	}
		
	}
574340
def del_repo(repo, **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    refresh = salt.utils.data.is_true(kwargs.get('refresh', True))
    repos = list_repos()
    if repos:
        deleted_from = dict()
        for repository in repos:
            source = repos[repository][0]
            if source['name'] == repo:
                deleted_from[source['file']] = 0
                _del_repo_from_file(repo, source['file'])

        if deleted_from:
            ret = ''
            for repository in repos:
                source = repos[repository][0]
                if source['file'] in deleted_from:
                    deleted_from[source['file']] += 1
            for repo_file, count in six.iteritems(deleted_from):
                msg = 'Repo \'{0}\' has been removed from {1}.\n'
                if count == 1 and os.path.isfile(repo_file):
                    msg = ('File {1} containing repo \'{0}\' has been '
                           'removed.\n')
                    try:
                        os.remove(repo_file)
                    except OSError:
                        pass
                ret += msg.format(repo, repo_file)
            if refresh:
                refresh_db()
            return ret

    return "Repo {0} doesn't exist in the opkg repo lists".format(repo)
1106386
public function delete(Repo $repo)
    {
        $rows = array();

        foreach ($this->getRows() as $row) {
            if ($row['id'] == $repo->getId()) {
                continue;
            }
            $rows[] = $row;
        }

        file_put_contents($this->filename, Yaml::dump($rows));
    }