use of com.google.gerrit.reviewdb.client.PatchSetInfo in project gerrit by GerritCodeReview.
the class PRED_commit_message_1 method exec.
@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;
}
use of com.google.gerrit.reviewdb.client.PatchSetInfo in project gerrit by GerritCodeReview.
the class PRED_commit_author_3 method exec.
@Override
public Operation exec(Prolog engine) throws PrologException {
PatchSetInfo psInfo = StoredValues.PATCH_SET_INFO.get(engine);
UserIdentity author = psInfo.getAuthor();
return exec(engine, author);
}
use of com.google.gerrit.reviewdb.client.PatchSetInfo in project gerrit by GerritCodeReview.
the class PRED_commit_committer_3 method exec.
@Override
public Operation exec(Prolog engine) throws PrologException {
PatchSetInfo psInfo = StoredValues.PATCH_SET_INFO.get(engine);
UserIdentity committer = psInfo.getCommitter();
return exec(engine, committer);
}
use of com.google.gerrit.reviewdb.client.PatchSetInfo in project gerrit by GerritCodeReview.
the class LabelNormalizerTest method setUpChange.
private void setUpChange() throws Exception {
change = new Change(new Change.Key("Iabcd1234abcd1234abcd1234abcd1234abcd1234"), new Change.Id(1), userId, new Branch.NameKey(allProjects, "refs/heads/master"), TimeUtil.nowTs());
PatchSetInfo ps = new PatchSetInfo(new PatchSet.Id(change.getId(), 1));
ps.setSubject("Test change");
change.setCurrentPatchSet(ps);
db.changes().insert(ImmutableList.of(change));
}
use of com.google.gerrit.reviewdb.client.PatchSetInfo in project gerrit by GerritCodeReview.
the class PatchSetInfoFactory method get.
public PatchSetInfo get(RevWalk rw, RevCommit src, PatchSet.Id psi) throws IOException {
rw.parseBody(src);
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;
}
Aggregations