Package com.google.gerrit.server
Class ApprovalCopier
- java.lang.Object
-
- com.google.gerrit.server.ApprovalCopier
-
public class ApprovalCopier extends Object
Copies approvals between patch sets.The result of a copy may either be stored, as when stamping approvals in the database at submit time, or refreshed on demand, as when reading approvals from the NoteDb.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyInReviewDb(ReviewDb db, ChangeNotes notes, CurrentUser user, PatchSet ps, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.Config repoConfig)
Apply approval copy settings from prior PatchSets to a new PatchSet.void
copyInReviewDb(ReviewDb db, ChangeNotes notes, CurrentUser user, PatchSet ps, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.Config repoConfig, Iterable<PatchSetApproval> dontCopy)
Apply approval copy settings from prior PatchSets to a new PatchSet.
-
-
-
Method Detail
-
copyInReviewDb
public void copyInReviewDb(ReviewDb db, ChangeNotes notes, CurrentUser user, PatchSet ps, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.Config repoConfig) throws com.google.gwtorm.server.OrmException
Apply approval copy settings from prior PatchSets to a new PatchSet.- Parameters:
db
- review database.notes
- change notes for user uploading PatchSetuser
- user uploading PatchSetps
- new PatchSetrw
- open walk that can read the patch set commit; null to open the repo on demand.repoConfig
- repo config used for change kind detection; null to read from repo on demand.- Throws:
com.google.gwtorm.server.OrmException
-
copyInReviewDb
public void copyInReviewDb(ReviewDb db, ChangeNotes notes, CurrentUser user, PatchSet ps, org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.Config repoConfig, Iterable<PatchSetApproval> dontCopy) throws com.google.gwtorm.server.OrmException
Apply approval copy settings from prior PatchSets to a new PatchSet.- Parameters:
db
- review database.notes
- change notes for user uploading PatchSetuser
- user uploading PatchSetps
- new PatchSetrw
- open walk that can read the patch set commit; null to open the repo on demand.repoConfig
- repo config used for change kind detection; null to read from repo on demand.dontCopy
- PatchSetApprovals indicating which (account, label) pairs should not be copied- Throws:
com.google.gwtorm.server.OrmException
-
-