Search in sources :

Example 1 with RulesCache

use of com.google.gerrit.rules.RulesCache in project gerrit by GerritCodeReview.

the class RefControlTest method add.

private InMemoryRepository add(ProjectConfig pc) {
    PrologEnvironment.Factory envFactory = null;
    ProjectControl.AssistedFactory projectControlFactory = null;
    RulesCache rulesCache = null;
    SitePaths sitePaths = null;
    List<CommentLinkInfo> commentLinks = null;
    InMemoryRepository repo;
    try {
        repo = repoManager.createRepository(pc.getName());
        if (pc.getProject() == null) {
            pc.load(repo);
        }
    } catch (IOException | ConfigInvalidException e) {
        throw new RuntimeException(e);
    }
    all.put(pc.getName(), new ProjectState(sitePaths, projectCache, allProjectsName, allUsersName, projectControlFactory, envFactory, repoManager, rulesCache, commentLinks, capabilityCollectionFactory, pc));
    return repo;
}
Also used : InMemoryRepository(org.eclipse.jgit.internal.storage.dfs.InMemoryRepository) ConfigInvalidException(org.eclipse.jgit.errors.ConfigInvalidException) SitePaths(com.google.gerrit.server.config.SitePaths) IOException(java.io.IOException) PrologEnvironment(com.google.gerrit.rules.PrologEnvironment) CommentLinkInfo(com.google.gerrit.extensions.api.projects.CommentLinkInfo) RulesCache(com.google.gerrit.rules.RulesCache)

Aggregations

CommentLinkInfo (com.google.gerrit.extensions.api.projects.CommentLinkInfo)1 PrologEnvironment (com.google.gerrit.rules.PrologEnvironment)1 RulesCache (com.google.gerrit.rules.RulesCache)1 SitePaths (com.google.gerrit.server.config.SitePaths)1 IOException (java.io.IOException)1 ConfigInvalidException (org.eclipse.jgit.errors.ConfigInvalidException)1 InMemoryRepository (org.eclipse.jgit.internal.storage.dfs.InMemoryRepository)1