Package com.google.gerrit.reviewdb.client

Examples of com.google.gerrit.reviewdb.client.PatchSetInfo


    try {
      final RevWalk rw = new RevWalk(repo);
      try {
        final RevCommit src =
            rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get()));
        PatchSetInfo info = get(src, patchSet.getId());
        info.setParents(toParentInfos(src.getParents(), rw));
        return info;
      } finally {
        rw.release();
      }
    } catch (IOException e) {
View Full Code Here


    cc.remove(me);
    cc.removeAll(reviewers);

    final Change change;
    final PatchSet ps;
    final PatchSetInfo info;

    change = new Change(changeKey, new Change.Id(db.nextChangeId()), me, destBranch);
    change.setTopic(destTopicName);
    change.nextPatchSetId();
View Full Code Here

      if (request.checkMergedInto) {
        final Ref mergedInto = findMergedInto(change.getDest().get(), c);
        result.mergedIntoRef = mergedInto != null ? mergedInto.getName() : null;
      }
      final PatchSetInfo info = patchSetInfoFactory.get(c, ps.getId());
      change.setCurrentPatchSet(info);
      result.change = change;
      result.patchSet = ps;
      result.info = info;
View Full Code Here

    ps.setUploader(user.getAccountId());
    ps.setRevision(new RevId(commit.name()));

    db.patchSets().insert(Collections.singleton(ps));

    final PatchSetInfo info = patchSetInfoFactory.get(commit, ps.getId());
    change.setCurrentPatchSet(info);
    ChangeUtil.updated(change);

    db.changes().insert(Collections.singleton(change));
View Full Code Here

    workQueue.getDefaultQueue()
        .submit(requestScopePropagator.wrap(new Runnable() {
      @Override
      public void run() {
        PatchSetInfo patchSetInfo;
        try {
          ReviewDb reviewDb = schemaFactory.open();
          try {
            patchSetInfo = patchSetInfoFactory.get(reviewDb, patchSetId);
          } finally {
View Full Code Here

    this.repoManager = grm;
    this.byEmailCache = byEmailCache;
  }

  public PatchSetInfo get(RevCommit src, PatchSet.Id psi) {
    PatchSetInfo info = new PatchSetInfo(psi);
    info.setSubject(src.getShortMessage());
    info.setMessage(src.getFullMessage());
    info.setAuthor(toUserIdentity(src.getAuthorIdent()));
    info.setCommitter(toUserIdentity(src.getCommitterIdent()));
    info.setRevId(src.getName());
    return info;
  }
View Full Code Here

    super(a1, a2, a3, n);
  }

  @Override
  public Operation exec(Prolog engine) throws PrologException {
    PatchSetInfo psInfo = StoredValues.PATCH_SET_INFO.get(engine);
    UserIdentity committer = psInfo.getCommitter();
    return exec(engine, committer);
  }
View Full Code Here

  @Override
  public Operation exec(Prolog engine) throws PrologException {
    engine.setB0();
    Term a1 = arg1.dereference();

    PatchSetInfo psInfo = StoredValues.PATCH_SET_INFO.get(engine);

    SymbolTerm msg = SymbolTerm.create(psInfo.getMessage());
    if (!a1.unify(msg, engine.trail)) {
      return engine.fail();
    }
    return cont;
  }
View Full Code Here

        insertAncestors(db, rebasedPatchSet.getId(),
            revWalk.parseCommit(rebasedCommitId));

        db.patchSets().insert(Collections.singleton(rebasedPatchSet));
        final PatchSetInfo info =
            patchSetInfoFactory.get(db, rebasedPatchSet.getId());

        change =
            db.changes().atomicUpdate(change.getId(),
                new AtomicUpdate<Change>() {
View Full Code Here

      ps.setUploader(user.getAccountId());
      ps.setRevision(new RevId(id.getName()));

      db.patchSets().insert(Collections.singleton(ps));

      final PatchSetInfo info =
          patchSetInfoFactory.get(revWalk.parseCommit(id), ps.getId());
      change.setCurrentPatchSet(info);
      ChangeUtil.updated(change);
      db.changes().insert(Collections.singleton(change));
View Full Code Here

TOP

Related Classes of com.google.gerrit.reviewdb.client.PatchSetInfo

Copyright © 2018 www.massapicom. 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.