Examples of currentPatchSetId()


Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

    Change c = object.change(dbProvider);
    if (c == null) {
      return false;
    }

    PatchSet.Id current = c.currentPatchSetId();
    for (PatchSetApproval p : object.approvals(dbProvider)) {
      if (p.getPatchSetId().equals(current) && p.getValue() != 0) {
        return true;
      }
    }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

              throw new IOException("Cannot rebase against an abandoned change: "
                  + depChange.getKey().toString());
            }
            if (depChange.getStatus().isOpen()) {
              PatchSet latestDepPatchSet =
                  db.patchSets().get(depChange.currentPatchSetId());
              if (!depPatchSet.getId().equals(depChange.currentPatchSetId())) {
                branchTipCommit =
                    revWalk.parseCommit(ObjectId
                        .fromString(latestDepPatchSet.getRevision().get()));
              } else {
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

                  + depChange.getKey().toString());
            }
            if (depChange.getStatus().isOpen()) {
              PatchSet latestDepPatchSet =
                  db.patchSets().get(depChange.currentPatchSetId());
              if (!depPatchSet.getId().equals(depChange.currentPatchSetId())) {
                branchTipCommit =
                    revWalk.parseCommit(ObjectId
                        .fromString(latestDepPatchSet.getRevision().get()));
              } else {
                throw new IOException(
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

    final ReviewResult result = new ReviewResult();
    result.setChangeId(changeId);

    final ChangeControl control = changeControlFactory.validateFor(changeId);
    final Change change = db.changes().get(changeId);
    final PatchSet.Id patchSetId = change.currentPatchSetId();
    final PatchSet patch = db.patchSets().get(patchSetId);
    if (!control.canAbandon()) {
      result.addError(new ReviewResult.Error(
          ReviewResult.Error.Type.ABANDON_NOT_PERMITTED));
    } else if (patch == null) {
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

    final ReviewResult result = new ReviewResult();
    result.setChangeId(changeId);

    final ChangeControl control = changeControlFactory.validateFor(changeId);
    final Change change = db.changes().get(changeId);
    final PatchSet.Id patchSetId = change.currentPatchSetId();
    if (!control.canRestore()) {
      result.addError(new ReviewResult.Error(
          ReviewResult.Error.Type.RESTORE_NOT_PERMITTED));
      return result;
    }
View Full Code Here

Examples of com.google.gerrit.reviewdb.client.Change.currentPatchSetId()

      for (PatchSet ps : restOfPatches) {
        if (highestId == null || ps.getPatchSetId() > highestId.get()) {
          highestId = ps.getId();
        }
      }
      if (change.currentPatchSetId().equals(patchSetId)) {
        change.removeLastPatchSetId();
        try {
          change.setCurrentPatchSet(patchSetInfoFactory.get(db, change.currPatchSetId()));
        } catch (PatchSetInfoNotAvailableException e) {
          throw new NoSuchChangeException(changeId);
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.