Package com.google.gerrit.server.git

Examples of com.google.gerrit.server.git.ProjectConfig.commit()


      for (GroupReference group : groups) {
        capability.getRule(config.resolve(group), true).setDeny();
      }

      md.setMessage("Upgrade to Gerrit Code Review schema 64\n");
      config.commit(md);
    } catch (IOException e) {
      throw new OrmException(e);
    } catch (ConfigInvalidException e) {
      throw new OrmException(e);
    } finally {
View Full Code Here


          Permission read = meta.getPermission(READ, true);
          read.getRule(config.resolve(projectOwners), true);
        }

        md.setMessage("Import project configuration from SQL\n");
        config.commit(md);
      } catch (ConfigInvalidException err) {
        throw new OrmException("Cannot read project " + name, err);
      } catch (IOException err) {
        throw new OrmException("Cannot export project " + name, err);
      } finally {
View Full Code Here

      Permission metaReadPermission = meta.getPermission(Permission.READ, true);
      metaReadPermission.setExclusiveGroup(true);
      metaReadPermission.add(rule(config, owners));

      md.setMessage("Initialized Gerrit Code Review " + Version.getVersion());
      config.commit(md);
    } finally {
      git.close();
    }
  }
View Full Code Here

              .getRule(config.resolve(batch), true)
              .setAction(Action.BATCH);
        }

        md.setMessage("Upgrade to Gerrit Code Review schema 57\n");
        config.commit(md);
      } finally {
        git.close();
      }
    } catch (ConfigInvalidException err) {
      throw new OrmException("Cannot read " + allProjects, err);
View Full Code Here

      ProjectConfig config = ProjectConfig.read(md);
      config.getProject().copySettingsFrom(update);

      md.setMessage("Modified project settings\n");
      try {
        config.commit(md);
        mgr.setProjectDescription(projectName, update.getDescription());
        userCache.get().evict(config.getProject());
      } catch (IOException e) {
        throw new OrmConcurrencyException("Cannot update " + projectName);
      }
View Full Code Here

          }
        }
      }

      md.setMessage("Created project\n");
      config.commit(md);
    } finally {
      md.close();
    }
    projectCache.onCreateProject(createProjectArgs.getProject());
    repoManager.setProjectDescription(createProjectArgs.getProject(),
View Full Code Here

    try {
      config = ProjectConfig.read(md);

      if (config.updateGroupNames(groupBackend)) {
        md.setMessage("Update group names\n");
        config.commit(md);
        projectCache.evict(config.getProject());
        pc = open();
      } else if (config.getRevision() != null
          && !config.getRevision().equals(
              pc.getProjectState().getConfig().getRevision())) {
View Full Code Here

        if (!updated) {
          continue;
        }

        md.setMessage("Switch LDAP group UUIDs to DNs\n");
        config.commit(md);
      } catch (IOException e) {
        throw new OrmException(e);
      } catch (ConfigInvalidException e) {
        throw new OrmException(e);
      } finally {
View Full Code Here

        try {
          ProjectConfig config = ProjectConfig.read(md);
          config.getProject().setParentName(newParentKey);
          md.setMessage("Inherit access from "
              + (newParentKey != null ? newParentKey.get() : allProjectsName.get()) + "\n");
          config.commit(md);
        } finally {
          md.close();
        }
      } catch (RepositoryNotFoundException notFound) {
        err.append("error: Project " + name + " not found\n");
View Full Code Here

            : project.getDescription());

        project.setState(state != null ? state : project.getState());

        md.setMessage("Project settings updated");
        config.commit(md);
      } finally {
        md.close();
      }
    } catch (RepositoryNotFoundException notFound) {
      err.append("error: Project " + name + " not found\n");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.