Merge "PatchSetInserter: Take ChangeControl instead of RefControl"
This commit is contained in:
@@ -194,7 +194,7 @@ public class CherryPickChange {
|
|||||||
ChangeControl destCtl = refControl.getProjectControl()
|
ChangeControl destCtl = refControl.getProjectControl()
|
||||||
.controlFor(destChanges.get(0).notes());
|
.controlFor(destChanges.get(0).notes());
|
||||||
result = insertPatchSet(
|
result = insertPatchSet(
|
||||||
bu, git, destCtl, cherryPickCommit, refControl);
|
bu, git, destCtl, cherryPickCommit);
|
||||||
} else {
|
} else {
|
||||||
// Change key not found on destination branch. We can create a new
|
// Change key not found on destination branch. We can create a new
|
||||||
// change.
|
// change.
|
||||||
@@ -223,21 +223,21 @@ public class CherryPickChange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Change.Id insertPatchSet(BatchUpdate bu, Repository git,
|
private Change.Id insertPatchSet(BatchUpdate bu, Repository git,
|
||||||
ChangeControl ctl, CodeReviewCommit cherryPickCommit,
|
ChangeControl destCtl, CodeReviewCommit cherryPickCommit)
|
||||||
RefControl refControl) throws IOException, OrmException {
|
throws IOException, OrmException {
|
||||||
Change change = ctl.getChange();
|
Change destChange = destCtl.getChange();
|
||||||
PatchSet.Id psId =
|
PatchSet.Id psId =
|
||||||
ChangeUtil.nextPatchSetId(git, change.currentPatchSetId());
|
ChangeUtil.nextPatchSetId(git, destChange.currentPatchSetId());
|
||||||
PatchSetInserter inserter = patchSetInserterFactory
|
PatchSetInserter inserter = patchSetInserterFactory
|
||||||
.create(refControl, psId, cherryPickCommit);
|
.create(destCtl, psId, cherryPickCommit);
|
||||||
PatchSet.Id newPatchSetId = inserter.getPatchSetId();
|
PatchSet.Id newPatchSetId = inserter.getPatchSetId();
|
||||||
PatchSet current = psUtil.current(db.get(), ctl.getNotes());
|
PatchSet current = psUtil.current(db.get(), destCtl.getNotes());
|
||||||
|
|
||||||
bu.addOp(change.getId(), inserter
|
bu.addOp(destChange.getId(), inserter
|
||||||
.setMessage("Uploaded patch set " + newPatchSetId.get() + ".")
|
.setMessage("Uploaded patch set " + newPatchSetId.get() + ".")
|
||||||
.setDraft(current.isDraft())
|
.setDraft(current.isDraft())
|
||||||
.setSendMail(false));
|
.setSendMail(false));
|
||||||
return change.getId();
|
return destChange.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Change.Id createNewChange(BatchUpdate bu,
|
private Change.Id createNewChange(BatchUpdate bu,
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
|||||||
import com.google.gerrit.server.patch.PatchSetInfoNotAvailableException;
|
import com.google.gerrit.server.patch.PatchSetInfoNotAvailableException;
|
||||||
import com.google.gerrit.server.project.ChangeControl;
|
import com.google.gerrit.server.project.ChangeControl;
|
||||||
import com.google.gerrit.server.project.NoSuchChangeException;
|
import com.google.gerrit.server.project.NoSuchChangeException;
|
||||||
import com.google.gerrit.server.project.NoSuchProjectException;
|
|
||||||
import com.google.gerrit.server.project.ProjectControl;
|
|
||||||
import com.google.gerrit.server.project.RefControl;
|
|
||||||
import com.google.gerrit.server.query.change.ChangeData;
|
import com.google.gerrit.server.query.change.ChangeData;
|
||||||
import com.google.gwtorm.server.AtomicUpdate;
|
import com.google.gwtorm.server.AtomicUpdate;
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
@@ -118,7 +115,6 @@ public class ConsistencyChecker {
|
|||||||
private final NotesMigration notesMigration;
|
private final NotesMigration notesMigration;
|
||||||
private final Provider<CurrentUser> user;
|
private final Provider<CurrentUser> user;
|
||||||
private final Provider<PersonIdent> serverIdent;
|
private final Provider<PersonIdent> serverIdent;
|
||||||
private final ProjectControl.GenericFactory projectControlFactory;
|
|
||||||
private final PatchSetInfoFactory patchSetInfoFactory;
|
private final PatchSetInfoFactory patchSetInfoFactory;
|
||||||
private final PatchSetInserter.Factory patchSetInserterFactory;
|
private final PatchSetInserter.Factory patchSetInserterFactory;
|
||||||
private final BatchUpdate.Factory updateFactory;
|
private final BatchUpdate.Factory updateFactory;
|
||||||
@@ -146,7 +142,6 @@ public class ConsistencyChecker {
|
|||||||
NotesMigration notesMigration,
|
NotesMigration notesMigration,
|
||||||
Provider<CurrentUser> user,
|
Provider<CurrentUser> user,
|
||||||
@GerritPersonIdent Provider<PersonIdent> serverIdent,
|
@GerritPersonIdent Provider<PersonIdent> serverIdent,
|
||||||
ProjectControl.GenericFactory projectControlFactory,
|
|
||||||
PatchSetInfoFactory patchSetInfoFactory,
|
PatchSetInfoFactory patchSetInfoFactory,
|
||||||
PatchSetInserter.Factory patchSetInserterFactory,
|
PatchSetInserter.Factory patchSetInserterFactory,
|
||||||
BatchUpdate.Factory updateFactory,
|
BatchUpdate.Factory updateFactory,
|
||||||
@@ -160,7 +155,6 @@ public class ConsistencyChecker {
|
|||||||
this.repoManager = repoManager;
|
this.repoManager = repoManager;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
this.serverIdent = serverIdent;
|
this.serverIdent = serverIdent;
|
||||||
this.projectControlFactory = projectControlFactory;
|
|
||||||
this.patchSetInfoFactory = patchSetInfoFactory;
|
this.patchSetInfoFactory = patchSetInfoFactory;
|
||||||
this.patchSetInserterFactory = patchSetInserterFactory;
|
this.patchSetInserterFactory = patchSetInserterFactory;
|
||||||
this.updateFactory = updateFactory;
|
this.updateFactory = updateFactory;
|
||||||
@@ -496,9 +490,8 @@ public class ConsistencyChecker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
RefControl ctl = projectControlFactory
|
ChangeControl ctl = changeControlFactory
|
||||||
.controlFor(change.getProject(), user.get())
|
.controlFor(db.get(), change, user.get());
|
||||||
.controlForRef(change.getDest());
|
|
||||||
PatchSet.Id psId =
|
PatchSet.Id psId =
|
||||||
ChangeUtil.nextPatchSetId(repo, change.currentPatchSetId());
|
ChangeUtil.nextPatchSetId(repo, change.currentPatchSetId());
|
||||||
PatchSetInserter inserter =
|
PatchSetInserter inserter =
|
||||||
@@ -520,8 +513,8 @@ public class ConsistencyChecker {
|
|||||||
p.status = Status.FIXED;
|
p.status = Status.FIXED;
|
||||||
p.outcome = "Inserted as patch set " + psId.get();
|
p.outcome = "Inserted as patch set " + psId.get();
|
||||||
return psId;
|
return psId;
|
||||||
} catch (IOException | NoSuchProjectException | UpdateException
|
} catch (OrmException | IOException | NoSuchChangeException
|
||||||
| RestApiException e) {
|
| UpdateException | RestApiException e) {
|
||||||
warn(e);
|
warn(e);
|
||||||
p.status = Status.FIX_FAILED;
|
p.status = Status.FIX_FAILED;
|
||||||
p.outcome = "Error inserting new patch set";
|
p.outcome = "Error inserting new patch set";
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ import com.google.gerrit.server.mail.ReplacePatchSetSender;
|
|||||||
import com.google.gerrit.server.notedb.ChangeUpdate;
|
import com.google.gerrit.server.notedb.ChangeUpdate;
|
||||||
import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
import com.google.gerrit.server.patch.PatchSetInfoFactory;
|
||||||
import com.google.gerrit.server.project.ChangeControl;
|
import com.google.gerrit.server.project.ChangeControl;
|
||||||
import com.google.gerrit.server.project.RefControl;
|
|
||||||
import com.google.gerrit.server.ssh.NoSshInfo;
|
import com.google.gerrit.server.ssh.NoSshInfo;
|
||||||
import com.google.gerrit.server.ssh.SshInfo;
|
import com.google.gerrit.server.ssh.SshInfo;
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
@@ -67,7 +66,7 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
LoggerFactory.getLogger(PatchSetInserter.class);
|
LoggerFactory.getLogger(PatchSetInserter.class);
|
||||||
|
|
||||||
public interface Factory {
|
public interface Factory {
|
||||||
PatchSetInserter create(RefControl refControl, PatchSet.Id psId,
|
PatchSetInserter create(ChangeControl ctl, PatchSet.Id psId,
|
||||||
RevCommit commit);
|
RevCommit commit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +84,10 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
// Assisted-injected fields.
|
// Assisted-injected fields.
|
||||||
private final PatchSet.Id psId;
|
private final PatchSet.Id psId;
|
||||||
private final RevCommit commit;
|
private final RevCommit commit;
|
||||||
private final RefControl refControl;
|
// Read prior to running the batch update, so must only be used during
|
||||||
|
// updateRepo; updateChange and later must use the control from the
|
||||||
|
// ChangeContext.
|
||||||
|
private final ChangeControl origCtl;
|
||||||
|
|
||||||
// Fields exposed as setters.
|
// Fields exposed as setters.
|
||||||
private SshInfo sshInfo;
|
private SshInfo sshInfo;
|
||||||
@@ -116,7 +118,7 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
CommitValidators.Factory commitValidatorsFactory,
|
CommitValidators.Factory commitValidatorsFactory,
|
||||||
ReplacePatchSetSender.Factory replacePatchSetFactory,
|
ReplacePatchSetSender.Factory replacePatchSetFactory,
|
||||||
PatchSetUtil psUtil,
|
PatchSetUtil psUtil,
|
||||||
@Assisted RefControl refControl,
|
@Assisted ChangeControl ctl,
|
||||||
@Assisted PatchSet.Id psId,
|
@Assisted PatchSet.Id psId,
|
||||||
@Assisted RevCommit commit) {
|
@Assisted RevCommit commit) {
|
||||||
this.hooks = hooks;
|
this.hooks = hooks;
|
||||||
@@ -129,7 +131,7 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
this.replacePatchSetFactory = replacePatchSetFactory;
|
this.replacePatchSetFactory = replacePatchSetFactory;
|
||||||
this.psUtil = psUtil;
|
this.psUtil = psUtil;
|
||||||
|
|
||||||
this.refControl = refControl;
|
this.origCtl = ctl;
|
||||||
this.psId = psId;
|
this.psId = psId;
|
||||||
this.commit = commit;
|
this.commit = commit;
|
||||||
}
|
}
|
||||||
@@ -285,7 +287,7 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
private void validate(RepoContext ctx)
|
private void validate(RepoContext ctx)
|
||||||
throws ResourceConflictException, IOException {
|
throws ResourceConflictException, IOException {
|
||||||
CommitValidators cv = commitValidatorsFactory.create(
|
CommitValidators cv = commitValidatorsFactory.create(
|
||||||
refControl, sshInfo, ctx.getRepository());
|
origCtl.getRefControl(), sshInfo, ctx.getRepository());
|
||||||
|
|
||||||
String refName = getPatchSetId().toRefName();
|
String refName = getPatchSetId().toRefName();
|
||||||
CommitReceivedEvent event = new CommitReceivedEvent(
|
CommitReceivedEvent event = new CommitReceivedEvent(
|
||||||
@@ -293,7 +295,8 @@ public class PatchSetInserter extends BatchUpdate.Op {
|
|||||||
ObjectId.zeroId(),
|
ObjectId.zeroId(),
|
||||||
commit.getId(),
|
commit.getId(),
|
||||||
refName.substring(0, refName.lastIndexOf('/') + 1) + "new"),
|
refName.substring(0, refName.lastIndexOf('/') + 1) + "new"),
|
||||||
refControl.getProjectControl().getProject(), refControl.getRefName(),
|
origCtl.getProjectControl().getProject(),
|
||||||
|
origCtl.getRefControl().getRefName(),
|
||||||
commit, ctx.getUser().asIdentifiedUser());
|
commit, ctx.getUser().asIdentifiedUser());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.google.gerrit.extensions.restapi.RestView;
|
|||||||
import com.google.gerrit.server.edit.ChangeEdit;
|
import com.google.gerrit.server.edit.ChangeEdit;
|
||||||
import com.google.gerrit.server.edit.ChangeEditUtil;
|
import com.google.gerrit.server.edit.ChangeEditUtil;
|
||||||
import com.google.gerrit.server.git.UpdateException;
|
import com.google.gerrit.server.git.UpdateException;
|
||||||
import com.google.gerrit.server.project.NoSuchProjectException;
|
import com.google.gerrit.server.project.NoSuchChangeException;
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
@@ -84,7 +84,7 @@ public class PublishChangeEdit implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Response<?> apply(ChangeResource rsrc, Publish.Input in)
|
public Response<?> apply(ChangeResource rsrc, Publish.Input in)
|
||||||
throws NoSuchProjectException, IOException, OrmException,
|
throws NoSuchChangeException, IOException, OrmException,
|
||||||
RestApiException, UpdateException {
|
RestApiException, UpdateException {
|
||||||
Capable r =
|
Capable r =
|
||||||
rsrc.getControl().getProjectControl().canPushToAtLeastOneRef();
|
rsrc.getControl().getProjectControl().canPushToAtLeastOneRef();
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class RebaseChangeOp extends BatchUpdate.Op {
|
|||||||
rebasedPatchSetId = ChangeUtil.nextPatchSetId(
|
rebasedPatchSetId = ChangeUtil.nextPatchSetId(
|
||||||
ctx.getRepository(), ctl.getChange().currentPatchSetId());
|
ctx.getRepository(), ctl.getChange().currentPatchSetId());
|
||||||
patchSetInserter = patchSetInserterFactory
|
patchSetInserter = patchSetInserterFactory
|
||||||
.create(ctl.getRefControl(), rebasedPatchSetId, rebasedCommit)
|
.create(ctl, rebasedPatchSetId, rebasedCommit)
|
||||||
.setDraft(originalPatchSet.isDraft())
|
.setDraft(originalPatchSet.isDraft())
|
||||||
.setSendMail(false)
|
.setSendMail(false)
|
||||||
.setRunHooks(runHooks)
|
.setRunHooks(runHooks)
|
||||||
|
|||||||
@@ -39,11 +39,8 @@ import com.google.gerrit.server.git.UpdateException;
|
|||||||
import com.google.gerrit.server.index.change.ChangeIndexer;
|
import com.google.gerrit.server.index.change.ChangeIndexer;
|
||||||
import com.google.gerrit.server.project.ChangeControl;
|
import com.google.gerrit.server.project.ChangeControl;
|
||||||
import com.google.gerrit.server.project.NoSuchChangeException;
|
import com.google.gerrit.server.project.NoSuchChangeException;
|
||||||
import com.google.gerrit.server.project.NoSuchProjectException;
|
|
||||||
import com.google.gerrit.server.project.ProjectCache;
|
import com.google.gerrit.server.project.ProjectCache;
|
||||||
import com.google.gerrit.server.project.ProjectControl;
|
|
||||||
import com.google.gerrit.server.project.ProjectState;
|
import com.google.gerrit.server.project.ProjectState;
|
||||||
import com.google.gerrit.server.project.RefControl;
|
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
||||||
@@ -70,7 +67,6 @@ import java.io.IOException;
|
|||||||
public class ChangeEditUtil {
|
public class ChangeEditUtil {
|
||||||
private final GitRepositoryManager gitManager;
|
private final GitRepositoryManager gitManager;
|
||||||
private final PatchSetInserter.Factory patchSetInserterFactory;
|
private final PatchSetInserter.Factory patchSetInserterFactory;
|
||||||
private final ProjectControl.GenericFactory projectControlFactory;
|
|
||||||
private final ChangeControl.GenericFactory changeControlFactory;
|
private final ChangeControl.GenericFactory changeControlFactory;
|
||||||
private final ChangeIndexer indexer;
|
private final ChangeIndexer indexer;
|
||||||
private final ProjectCache projectCache;
|
private final ProjectCache projectCache;
|
||||||
@@ -83,7 +79,6 @@ public class ChangeEditUtil {
|
|||||||
@Inject
|
@Inject
|
||||||
ChangeEditUtil(GitRepositoryManager gitManager,
|
ChangeEditUtil(GitRepositoryManager gitManager,
|
||||||
PatchSetInserter.Factory patchSetInserterFactory,
|
PatchSetInserter.Factory patchSetInserterFactory,
|
||||||
ProjectControl.GenericFactory projectControlFactory,
|
|
||||||
ChangeControl.GenericFactory changeControlFactory,
|
ChangeControl.GenericFactory changeControlFactory,
|
||||||
ChangeIndexer indexer,
|
ChangeIndexer indexer,
|
||||||
ProjectCache projectCache,
|
ProjectCache projectCache,
|
||||||
@@ -94,7 +89,6 @@ public class ChangeEditUtil {
|
|||||||
PatchSetUtil psUtil) {
|
PatchSetUtil psUtil) {
|
||||||
this.gitManager = gitManager;
|
this.gitManager = gitManager;
|
||||||
this.patchSetInserterFactory = patchSetInserterFactory;
|
this.patchSetInserterFactory = patchSetInserterFactory;
|
||||||
this.projectControlFactory = projectControlFactory;
|
|
||||||
this.changeControlFactory = changeControlFactory;
|
this.changeControlFactory = changeControlFactory;
|
||||||
this.indexer = indexer;
|
this.indexer = indexer;
|
||||||
this.projectCache = projectCache;
|
this.projectCache = projectCache;
|
||||||
@@ -168,13 +162,13 @@ public class ChangeEditUtil {
|
|||||||
* its parent.
|
* its parent.
|
||||||
*
|
*
|
||||||
* @param edit change edit to publish
|
* @param edit change edit to publish
|
||||||
* @throws NoSuchProjectException
|
* @throws NoSuchChangeException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws OrmException
|
* @throws OrmException
|
||||||
* @throws UpdateException
|
* @throws UpdateException
|
||||||
* @throws RestApiException
|
* @throws RestApiException
|
||||||
*/
|
*/
|
||||||
public void publish(ChangeEdit edit) throws NoSuchProjectException,
|
public void publish(ChangeEdit edit) throws NoSuchChangeException,
|
||||||
IOException, OrmException, RestApiException, UpdateException {
|
IOException, OrmException, RestApiException, UpdateException {
|
||||||
Change change = edit.getChange();
|
Change change = edit.getChange();
|
||||||
try (Repository repo = gitManager.openRepository(change.getProject());
|
try (Repository repo = gitManager.openRepository(change.getProject());
|
||||||
@@ -238,11 +232,10 @@ public class ChangeEditUtil {
|
|||||||
|
|
||||||
private Change insertPatchSet(ChangeEdit edit, Change change,
|
private Change insertPatchSet(ChangeEdit edit, Change change,
|
||||||
Repository repo, RevWalk rw, ObjectInserter oi, PatchSet basePatchSet,
|
Repository repo, RevWalk rw, ObjectInserter oi, PatchSet basePatchSet,
|
||||||
RevCommit squashed) throws NoSuchProjectException, RestApiException,
|
RevCommit squashed) throws NoSuchChangeException, RestApiException,
|
||||||
UpdateException, IOException {
|
UpdateException, OrmException, IOException {
|
||||||
RefControl ctl = projectControlFactory
|
ChangeControl ctl =
|
||||||
.controlFor(change.getProject(), edit.getUser())
|
changeControlFactory.controlFor(db.get(), change, edit.getUser());
|
||||||
.controlForRef(change.getDest());
|
|
||||||
PatchSet.Id psId =
|
PatchSet.Id psId =
|
||||||
ChangeUtil.nextPatchSetId(repo, change.currentPatchSetId());
|
ChangeUtil.nextPatchSetId(repo, change.currentPatchSetId());
|
||||||
PatchSetInserter inserter =
|
PatchSetInserter inserter =
|
||||||
|
|||||||
@@ -68,8 +68,7 @@ import com.google.gerrit.server.index.change.ChangeField;
|
|||||||
import com.google.gerrit.server.index.change.ChangeIndexCollection;
|
import com.google.gerrit.server.index.change.ChangeIndexCollection;
|
||||||
import com.google.gerrit.server.index.change.ChangeIndexer;
|
import com.google.gerrit.server.index.change.ChangeIndexer;
|
||||||
import com.google.gerrit.server.notedb.ChangeNotes;
|
import com.google.gerrit.server.notedb.ChangeNotes;
|
||||||
import com.google.gerrit.server.project.ProjectControl;
|
import com.google.gerrit.server.project.ChangeControl;
|
||||||
import com.google.gerrit.server.project.RefControl;
|
|
||||||
import com.google.gerrit.server.schema.SchemaCreator;
|
import com.google.gerrit.server.schema.SchemaCreator;
|
||||||
import com.google.gerrit.server.util.RequestContext;
|
import com.google.gerrit.server.util.RequestContext;
|
||||||
import com.google.gerrit.server.util.ThreadLocalRequestContext;
|
import com.google.gerrit.server.util.ThreadLocalRequestContext;
|
||||||
@@ -126,7 +125,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
|||||||
@Inject protected InternalChangeQuery internalChangeQuery;
|
@Inject protected InternalChangeQuery internalChangeQuery;
|
||||||
@Inject protected ChangeNotes.Factory notesFactory;
|
@Inject protected ChangeNotes.Factory notesFactory;
|
||||||
@Inject protected PatchSetInserter.Factory patchSetFactory;
|
@Inject protected PatchSetInserter.Factory patchSetFactory;
|
||||||
@Inject protected ProjectControl.GenericFactory projectControlFactory;
|
@Inject protected ChangeControl.GenericFactory changeControlFactory;
|
||||||
@Inject protected QueryProcessor queryProcessor;
|
@Inject protected QueryProcessor queryProcessor;
|
||||||
@Inject protected SchemaCreator schemaCreator;
|
@Inject protected SchemaCreator schemaCreator;
|
||||||
@Inject protected Sequences seq;
|
@Inject protected Sequences seq;
|
||||||
@@ -1580,8 +1579,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
|||||||
.message("message")
|
.message("message")
|
||||||
.add("file" + n, "contents " + n)
|
.add("file" + n, "contents " + n)
|
||||||
.create());
|
.create());
|
||||||
RefControl ctl = projectControlFactory.controlFor(c.getProject(), user)
|
ChangeControl ctl = changeControlFactory.controlFor(db, c, user);
|
||||||
.controlForRef(c.getDest());
|
|
||||||
|
|
||||||
PatchSetInserter inserter = patchSetFactory.create(
|
PatchSetInserter inserter = patchSetFactory.create(
|
||||||
ctl, new PatchSet.Id(c.getId(), n), commit)
|
ctl, new PatchSet.Id(c.getId(), n), commit)
|
||||||
|
|||||||
Reference in New Issue
Block a user