use of com.google.gerrit.server.git.ProjectLevelConfig in project gerrit by GerritCodeReview.
the class ProjectState method getConfig.
public ProjectLevelConfig getConfig(String fileName) {
if (configs.containsKey(fileName)) {
return configs.get(fileName);
}
ProjectLevelConfig cfg = new ProjectLevelConfig(fileName, this);
try (Repository git = gitMgr.openRepository(getProject().getNameKey())) {
cfg.load(git);
} catch (IOException | ConfigInvalidException e) {
log.warn("Failed to load " + fileName + " for " + getProject().getName(), e);
}
configs.put(fileName, cfg);
return cfg;
}
Aggregations