Package com.google.gerrit.server.project

Examples of com.google.gerrit.server.project.RefControl.canCreate()


    if (isHead(cmd) && !isCommit(cmd)) {
      return;
    }

    RefControl ctl = projectControl.controlForRef(cmd.getRefName());
    if (ctl.canCreate(rp.getRevWalk(), obj)) {
      validateNewCommits(ctl, cmd);
      if (cmd.getResult() == NOT_ATTEMPTED) {
        cmd.execute(rp);
      }
    } else {
View Full Code Here


        } catch (IncorrectObjectTypeException notCommit) {
          throw new IllegalStateException(startingRevision + " not a commit");
        }
      }

      if (!refControl.canCreate(rw, object)) {
        throw new IllegalStateException("Cannot create " + refname);
      }

      try {
        final RefUpdate u = repo.updateRef(refname);
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.