Examples of currentPatchSetId()


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

  public ChangeDetail call() throws OrmException, NoSuchEntityException,
      PatchSetInfoNotAvailableException, NoSuchChangeException,
      RepositoryNotFoundException, IOException {
    control = changeControlFactory.validateFor(changeId);
    final Change change = control.getChange();
    final PatchSet patch = db.patchSets().get(change.currentPatchSetId());
    if (patch == null) {
      throw new NoSuchEntityException();
    }

    aic.want(change.getOwner());
View Full Code Here

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

    detail.setSubmitRecords(submitRecords);

    patchsetsById = new HashMap<PatchSet.Id, PatchSet>();
    loadPatchSets();
    loadMessages();
    if (change.currentPatchSetId() != null) {
      loadCurrentPatchSet();
    }
    load();
    detail.setAccounts(aic.create());
    return detail;
View Full Code Here

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

    }

    final ArrayList<ChangeInfo> neededBy = new ArrayList<ChangeInfo>();
    for (final PatchSet.Id a : descendants) {
      final Change ac = m.get(a.getParentKey());
      if (ac != null && ac.currentPatchSetId().equals(a)) {
        neededBy.add(newChangeInfo(ac, null));
      }
    }

    Collections.sort(neededBy, new Comparator<ChangeInfo>() {
View Full Code Here

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

        aicFactory.want(aid);
        for (final Change.Id id : cids) {
          try {
            final ChangeControl cc = changeControlFactory.validateFor(id);
            final Change change = cc.getChange();
            final PatchSet.Id ps_id = change.currentPatchSetId();
            final Map<ApprovalCategory.Id, PatchSetApproval> psas =
                new HashMap<ApprovalCategory.Id, PatchSetApproval>();
            final FunctionState fs =
                functionStateFactory.create(cc, ps_id, psas.values());
View Full Code Here

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

        for (final Change.Id id : cids) {
          try {
            final ChangeControl cc = changeControlFactory.validateFor(id);
            final Change change = cc.getChange();
            final PatchSet.Id ps_id = change.currentPatchSetId();
            final Map<ApprovalCategory.Id, PatchSetApproval> psas =
                new HashMap<ApprovalCategory.Id, PatchSetApproval>();
            final FunctionState fs =
                functionStateFactory.create(cc, ps_id, psas.values());
View Full Code Here

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

    }
    if (!validCommit(changeCtl.getRefControl(), request.cmd, c)) {
      return null;
    }

    final PatchSet.Id priorPatchSet = change.currentPatchSetId();
    for (final PatchSet ps : db.patchSets().byChange(request.ontoChange)) {
      if (ps.getRevision() == null) {
        log.warn("Patch set " + ps.getId() + " has no revision");
        reject(request.cmd, "change state corrupt");
        return null;
View Full Code Here

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

      Change c = change(db);
      if (c == null) {
        return null;
      }
      for (PatchSet p : patches(db)) {
        if (p.getId().equals(c.currentPatchSetId())) {
          currentPatchSet = p;
          return p;
        }
      }
    }
View Full Code Here

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

      Change c = change(db);
      if (c == null) {
        currentApprovals = Collections.emptyList();
      } else if (approvals != null) {
        Map<Id, Collection<PatchSetApproval>> map = approvalsMap(db);
        currentApprovals = map.get(c.currentPatchSetId());
        if (currentApprovals == null) {
          currentApprovals = Collections.emptyList();
          map.put(c.currentPatchSetId(), currentApprovals);
        }
      } else {
View Full Code Here

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

      } else if (approvals != null) {
        Map<Id, Collection<PatchSetApproval>> map = approvalsMap(db);
        currentApprovals = map.get(c.currentPatchSetId());
        if (currentApprovals == null) {
          currentApprovals = Collections.emptyList();
          map.put(c.currentPatchSetId(), currentApprovals);
        }
      } else {
        currentApprovals = db.get().patchSetApprovals()
            .byPatchSet(c.currentPatchSetId()).toList();
      }
View Full Code Here

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

          currentApprovals = Collections.emptyList();
          map.put(c.currentPatchSetId(), currentApprovals);
        }
      } else {
        currentApprovals = db.get().patchSetApprovals()
            .byPatchSet(c.currentPatchSetId()).toList();
      }
    }
    return currentApprovals;
  }
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.