Rename "GitReferenceUpdated replication" to "GitReferenceUpdated gitRefUpdated"

The concept of replication is not a part of the Gerrit core any more. Rename all
variables of type GitReferenceUpdated which were named "replication" to
"gitRefUpdated". Also rename the "MetaDataUpdate.replicate" method to
"fireGitRefUpdatedEvent" as this is exactly what it does.

Change-Id: I4ebe9ce05849e5f35e344195e6e5b561a079a965
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
This commit is contained in:
Sasa Zivkov 2012-12-07 16:41:32 +01:00 committed by Edwin Kempin
parent c21f309f71
commit 336eb70b51
15 changed files with 72 additions and 72 deletions

View File

@ -38,7 +38,7 @@ class DeleteDraftChange extends Handler<VoidResult> {
private final ChangeControl.Factory changeControlFactory;
private final ReviewDb db;
private final GitRepositoryManager gitManager;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final PatchSet.Id patchSetId;
@ -46,12 +46,12 @@ class DeleteDraftChange extends Handler<VoidResult> {
DeleteDraftChange(final ReviewDb db,
final ChangeControl.Factory changeControlFactory,
final GitRepositoryManager gitManager,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
@Assisted final PatchSet.Id patchSetId) {
this.changeControlFactory = changeControlFactory;
this.db = db;
this.gitManager = gitManager;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.patchSetId = patchSetId;
}
@ -65,7 +65,7 @@ class DeleteDraftChange extends Handler<VoidResult> {
throw new NoSuchChangeException(changeId);
}
ChangeUtil.deleteDraftChange(patchSetId, gitManager, replication, db);
ChangeUtil.deleteDraftChange(patchSetId, gitManager, gitRefUpdated, db);
return VoidResult.INSTANCE;
}
}

View File

@ -60,7 +60,7 @@ class EditCommitMessageHandler extends Handler<ChangeDetail> {
private final ChangeDetailFactory.Factory changeDetailFactory;
private final CommitMessageEditedSender.Factory commitMessageEditedSenderFactory;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final PatchSet.Id patchSetId;
@Nullable
@ -84,7 +84,7 @@ class EditCommitMessageHandler extends Handler<ChangeDetail> {
final CommitValidators.Factory commitValidatorsFactory,
final GitRepositoryManager gitManager,
final PatchSetInfoFactory patchSetInfoFactory,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
@GerritPersonIdent final PersonIdent myIdent) {
this.changeControlFactory = changeControlFactory;
this.db = db;
@ -99,7 +99,7 @@ class EditCommitMessageHandler extends Handler<ChangeDetail> {
this.gitManager = gitManager;
this.patchSetInfoFactory = patchSetInfoFactory;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.myIdent = myIdent;
}
@ -127,7 +127,7 @@ class EditCommitMessageHandler extends Handler<ChangeDetail> {
commitValidatorsFactory.create(control.getRefControl(), new NoSshInfo(), git);
ChangeUtil.editCommitMessage(patchSetId, control.getRefControl(), commitValidators, currentUser, message, db,
commitMessageEditedSenderFactory, hooks, git, patchSetInfoFactory, replication, myIdent);
commitMessageEditedSenderFactory, hooks, git, patchSetInfoFactory, gitRefUpdated, myIdent);
return changeDetailFactory.create(changeId).call();
} finally {

View File

@ -50,7 +50,7 @@ class DeleteBranches extends Handler<Set<Branch.NameKey>> {
private final ProjectControl.Factory projectControlFactory;
private final GitRepositoryManager repoManager;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final IdentifiedUser identifiedUser;
private final ChangeHooks hooks;
private final ReviewDb db;
@ -61,7 +61,7 @@ class DeleteBranches extends Handler<Set<Branch.NameKey>> {
@Inject
DeleteBranches(final ProjectControl.Factory projectControlFactory,
final GitRepositoryManager repoManager,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
final IdentifiedUser identifiedUser,
final ChangeHooks hooks,
final ReviewDb db,
@ -69,7 +69,7 @@ class DeleteBranches extends Handler<Set<Branch.NameKey>> {
@Assisted Project.NameKey name, @Assisted Set<Branch.NameKey> toRemove) {
this.projectControlFactory = projectControlFactory;
this.repoManager = repoManager;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.identifiedUser = identifiedUser;
this.hooks = hooks;
this.db = db;
@ -121,7 +121,7 @@ class DeleteBranches extends Handler<Set<Branch.NameKey>> {
case FAST_FORWARD:
case FORCED:
deleted.add(branchKey);
replication.fire(projectName, u);
gitRefUpdated.fire(projectName, u);
hooks.doRefUpdatedHook(branchKey, u, identifiedUser.getAccount());
break;

View File

@ -198,7 +198,7 @@ public class ChangeUtil {
final RevertedSender.Factory revertedSenderFactory,
final ChangeHooks hooks, Repository git,
final PatchSetInfoFactory patchSetInfoFactory,
final GitReferenceUpdated replication, PersonIdent myIdent,
final GitReferenceUpdated gitRefUpdated, PersonIdent myIdent,
String canonicalWebUrl) throws NoSuchChangeException, EmailException,
OrmException, MissingObjectException, IncorrectObjectTypeException,
IOException, InvalidChangeOperationException {
@ -279,7 +279,7 @@ public class ChangeUtil {
"Failed to create ref %s in %s: %s", ps.getRefName(),
change.getDest().getParentKey().get(), ru.getResult()));
}
replication.fire(change.getProject(), ru);
gitRefUpdated.fire(change.getProject(), ru);
db.changes().beginTransaction(change.getId());
try {
@ -321,7 +321,7 @@ public class ChangeUtil {
final CommitMessageEditedSender.Factory commitMessageEditedSenderFactory,
final ChangeHooks hooks, Repository git,
final PatchSetInfoFactory patchSetInfoFactory,
final GitReferenceUpdated replication, PersonIdent myIdent)
final GitReferenceUpdated gitRefUpdated, PersonIdent myIdent)
throws NoSuchChangeException, EmailException, OrmException,
MissingObjectException, IncorrectObjectTypeException, IOException,
InvalidChangeOperationException, PatchSetInfoNotAvailableException {
@ -397,7 +397,7 @@ public class ChangeUtil {
"Failed to create ref %s in %s: %s", newPatchSet.getRefName(),
change.getDest().getParentKey().get(), ru.getResult()));
}
replication.fire(change.getProject(), ru);
gitRefUpdated.fire(change.getProject(), ru);
db.changes().beginTransaction(change.getId());
try {
@ -463,7 +463,7 @@ public class ChangeUtil {
public static void deleteDraftChange(final PatchSet.Id patchSetId,
GitRepositoryManager gitManager,
final GitReferenceUpdated replication, final ReviewDb db)
final GitReferenceUpdated gitRefUpdated, final ReviewDb db)
throws NoSuchChangeException, OrmException, IOException {
final Change.Id changeId = patchSetId.getParentKey();
final Change change = db.changes().get(changeId);
@ -473,7 +473,7 @@ public class ChangeUtil {
for (PatchSet ps : db.patchSets().byChange(changeId)) {
// These should all be draft patch sets.
deleteOnlyDraftPatchSet(ps, change, gitManager, replication, db);
deleteOnlyDraftPatchSet(ps, change, gitManager, gitRefUpdated, db);
}
db.changeMessages().delete(db.changeMessages().byChange(changeId));
@ -484,7 +484,7 @@ public class ChangeUtil {
public static void deleteOnlyDraftPatchSet(final PatchSet patch,
final Change change, GitRepositoryManager gitManager,
final GitReferenceUpdated replication, final ReviewDb db)
final GitReferenceUpdated gitRefUpdated, final ReviewDb db)
throws NoSuchChangeException, OrmException, IOException {
final PatchSet.Id patchSetId = patch.getId();
if (patch == null || !patch.isDraft()) {
@ -507,7 +507,7 @@ public class ChangeUtil {
throw new IOException("Failed to delete ref " + patch.getRefName() +
" in " + repo.getDirectory() + ": " + update.getResult());
}
replication.fire(change.getProject(), update);
gitRefUpdated.fire(change.getProject(), update);
} finally {
repo.close();
}

View File

@ -53,7 +53,7 @@ public class Revert implements RestModifyView<ChangeResource, Input> {
private final GitRepositoryManager gitManager;
private final PersonIdent myIdent;
private final PatchSetInfoFactory patchSetInfoFactory;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final String canonicalWebUrl;
public static class Input {
@ -68,7 +68,7 @@ public class Revert implements RestModifyView<ChangeResource, Input> {
ChangeJson json,
GitRepositoryManager gitManager,
final PatchSetInfoFactory patchSetInfoFactory,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
@GerritPersonIdent final PersonIdent myIdent,
@CanonicalWebUrl @Nullable final String canonicalWebUrl) {
this.hooks = hooks;
@ -78,7 +78,7 @@ public class Revert implements RestModifyView<ChangeResource, Input> {
this.json = json;
this.gitManager = gitManager;
this.myIdent = myIdent;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.patchSetInfoFactory = patchSetInfoFactory;
this.canonicalWebUrl = canonicalWebUrl;
}
@ -104,7 +104,7 @@ public class Revert implements RestModifyView<ChangeResource, Input> {
commitValidators,
Strings.emptyToNull(input.message), dbProvider.get(),
revertedSenderFactory, hooks, git, patchSetInfoFactory,
replication, myIdent, canonicalWebUrl);
gitRefUpdated, myIdent, canonicalWebUrl);
return json.format(revertedChangeId);
} catch (InvalidChangeOperationException e) {

View File

@ -44,7 +44,7 @@ public class DeleteDraftPatchSet implements Callable<ReviewResult> {
private final ChangeControl.Factory changeControlFactory;
private final ReviewDb db;
private final GitRepositoryManager gitManager;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final PatchSetInfoFactory patchSetInfoFactory;
private final PatchSet.Id patchSetId;
@ -52,12 +52,12 @@ public class DeleteDraftPatchSet implements Callable<ReviewResult> {
@Inject
DeleteDraftPatchSet(ChangeControl.Factory changeControlFactory,
ReviewDb db, GitRepositoryManager gitManager,
GitReferenceUpdated replication, PatchSetInfoFactory patchSetInfoFactory,
GitReferenceUpdated gitRefUpdated, PatchSetInfoFactory patchSetInfoFactory,
@Assisted final PatchSet.Id patchSetId) {
this.changeControlFactory = changeControlFactory;
this.db = db;
this.gitManager = gitManager;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.patchSetInfoFactory = patchSetInfoFactory;
this.patchSetId = patchSetId;
@ -88,7 +88,7 @@ public class DeleteDraftPatchSet implements Callable<ReviewResult> {
final Change change = control.getChange();
try {
ChangeUtil.deleteOnlyDraftPatchSet(patch, change, gitManager, replication, db);
ChangeUtil.deleteOnlyDraftPatchSet(patch, change, gitManager, gitRefUpdated, db);
} catch (IOException e) {
result.addError(new ReviewResult.Error(
ReviewResult.Error.Type.GIT_ERROR, e.getMessage()));
@ -97,7 +97,7 @@ public class DeleteDraftPatchSet implements Callable<ReviewResult> {
List<PatchSet> restOfPatches = db.patchSets().byChange(changeId).toList();
if (restOfPatches.size() == 0) {
try {
ChangeUtil.deleteDraftChange(patchSetId, gitManager, replication, db);
ChangeUtil.deleteDraftChange(patchSetId, gitManager, gitRefUpdated, db);
result.setChangeId(null);
} catch (IOException e) {
result.addError(new ReviewResult.Error(

View File

@ -68,7 +68,7 @@ public class RebaseChange {
private final ReviewDb db;
private final GitRepositoryManager gitManager;
private final PersonIdent myIdent;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final RebasedPatchSetSender.Factory rebasedPatchSetSenderFactory;
private final ChangeHookRunner hooks;
private final ApprovalsUtil approvalsUtil;
@ -78,7 +78,7 @@ public class RebaseChange {
final PatchSetInfoFactory patchSetInfoFactory, final ReviewDb db,
@GerritPersonIdent final PersonIdent myIdent,
final GitRepositoryManager gitManager,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
final RebasedPatchSetSender.Factory rebasedPatchSetSenderFactory,
final ChangeHookRunner hooks, final ApprovalsUtil approvalsUtil) {
this.changeControlFactory = changeControlFactory;
@ -86,7 +86,7 @@ public class RebaseChange {
this.db = db;
this.gitManager = gitManager;
this.myIdent = myIdent;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.rebasedPatchSetSenderFactory = rebasedPatchSetSenderFactory;
this.hooks = hooks;
this.approvalsUtil = approvalsUtil;
@ -333,7 +333,7 @@ public class RebaseChange {
newPatchSet.getRefName(), change.getDest().getParentKey().get(),
ru.getResult()));
}
replication.fire(change.getProject(), ru);
gitRefUpdated.fire(change.getProject(), ru);
db.changes().beginTransaction(change.getId());
try {

View File

@ -54,19 +54,19 @@ public class CherryPick extends SubmitStrategy {
private final PatchSetInfoFactory patchSetInfoFactory;
private final Provider<String> urlProvider;
private final ApprovalTypes approvalTypes;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final Map<Change.Id, CodeReviewCommit> newCommits;
CherryPick(final SubmitStrategy.Arguments args,
final PatchSetInfoFactory patchSetInfoFactory,
final Provider<String> urlProvider, final ApprovalTypes approvalTypes,
final GitReferenceUpdated replication) {
final GitReferenceUpdated gitRefUpdated) {
super(args);
this.patchSetInfoFactory = patchSetInfoFactory;
this.urlProvider = urlProvider;
this.approvalTypes = approvalTypes;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.newCommits = new HashMap<Change.Id, CodeReviewCommit>();
}
@ -202,7 +202,7 @@ public class CherryPick extends SubmitStrategy {
ru.getResult()));
}
replication.fire(n.change.getProject(), ru);
gitRefUpdated.fire(n.change.getProject(), ru);
newCommit.copyFrom(n);
newCommit.statusCode = CommitMergeStatus.CLEAN_PICK;

View File

@ -122,7 +122,7 @@ public class MergeOp {
private final SchemaFactory<ReviewDb> schemaFactory;
private final ProjectCache projectCache;
private final FunctionState.Factory functionState;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final MergedSender.Factory mergedSenderFactory;
private final MergeFailSender.Factory mergeFailSenderFactory;
private final ApprovalTypes approvalTypes;
@ -159,7 +159,7 @@ public class MergeOp {
@Inject
MergeOp(final GitRepositoryManager grm, final SchemaFactory<ReviewDb> sf,
final ProjectCache pc, final FunctionState.Factory fs,
final GitReferenceUpdated rq, final MergedSender.Factory msf,
final GitReferenceUpdated gru, final MergedSender.Factory msf,
final MergeFailSender.Factory mfsf,
final ApprovalTypes approvalTypes, final PatchSetInfoFactory psif,
final IdentifiedUser.GenericFactory iuf,
@ -177,7 +177,7 @@ public class MergeOp {
schemaFactory = sf;
functionState = fs;
projectCache = pc;
replication = rq;
gitRefUpdated = gru;
mergedSenderFactory = msf;
mergeFailSenderFactory = mfsf;
this.approvalTypes = approvalTypes;
@ -686,7 +686,7 @@ public class MergeOp {
destProject.getProject().getDescription());
}
replication.fire(destBranch.getParentKey(), branchUpdate);
gitRefUpdated.fire(destBranch.getParentKey(), branchUpdate);
Account account = null;
final PatchSetApproval submitter = getSubmitter(db, mergeTip.patchsetId);

View File

@ -88,15 +88,15 @@ public class MetaDataUpdate {
@Assisted Repository db);
}
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final Project.NameKey projectName;
private final Repository db;
private final CommitBuilder commit;
@Inject
public MetaDataUpdate(GitReferenceUpdated replication,
public MetaDataUpdate(GitReferenceUpdated gitRefUpdated,
@Assisted Project.NameKey projectName, @Assisted Repository db) {
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.projectName = projectName;
this.db = db;
this.commit = new CommitBuilder();
@ -130,7 +130,7 @@ public class MetaDataUpdate {
return commit;
}
void replicate(RefUpdate ru) {
replication.fire(projectName, ru);
void fireGitRefUpdatedEvent(RefUpdate ru) {
gitRefUpdated.fire(projectName, ru);
}
}

View File

@ -235,7 +235,7 @@ public class ReceiveCommits {
private final CreateChangeSender.Factory createChangeSenderFactory;
private final MergedSender.Factory mergedSenderFactory;
private final ReplacePatchSetSender.Factory replacePatchSetFactory;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final PatchSetInfoFactory patchSetInfoFactory;
private final ChangeHooks hooks;
private final ApprovalsUtil approvalsUtil;
@ -289,7 +289,7 @@ public class ReceiveCommits {
final CreateChangeSender.Factory createChangeSenderFactory,
final MergedSender.Factory mergedSenderFactory,
final ReplacePatchSetSender.Factory replacePatchSetFactory,
final GitReferenceUpdated replication,
final GitReferenceUpdated gitRefUpdated,
final PatchSetInfoFactory patchSetInfoFactory,
final ChangeHooks hooks,
final ApprovalsUtil approvalsUtil,
@ -316,7 +316,7 @@ public class ReceiveCommits {
this.createChangeSenderFactory = createChangeSenderFactory;
this.mergedSenderFactory = mergedSenderFactory;
this.replacePatchSetFactory = replacePatchSetFactory;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.patchSetInfoFactory = patchSetInfoFactory;
this.hooks = hooks;
this.approvalsUtil = approvalsUtil;
@ -586,10 +586,10 @@ public class ReceiveCommits {
}
if (!MagicBranch.isMagicBranch(c.getRefName())) {
// We only schedule direct refs updates for replication.
// Change refs are scheduled when they are created.
// We only fire gitRefUpdated for direct refs updates.
// Events for change refs are fired when they are created.
//
replication.fire(project.getNameKey(), c.getRefName(),
gitRefUpdated.fire(project.getNameKey(), c.getRefName(),
c.getOldId(), c.getNewId());
hooks.doRefUpdatedHook(
new Branch.NameKey(project.getNameKey(), c.getRefName()),
@ -1384,7 +1384,7 @@ public class ReceiveCommits {
}
created = true;
replication.fire(project.getNameKey(), ps.getRefName(),
gitRefUpdated.fire(project.getNameKey(), ps.getRefName(),
ObjectId.zeroId(), commit);
hooks.doPatchsetCreatedHook(change, ps, db);
workQueue.getDefaultQueue()
@ -1747,7 +1747,7 @@ public class ReceiveCommits {
if (cmd.getResult() == NOT_ATTEMPTED) {
cmd.execute(rp);
}
replication.fire(project.getNameKey(), newPatchSet.getRefName(),
gitRefUpdated.fire(project.getNameKey(), newPatchSet.getRefName(),
ObjectId.zeroId(), newCommit);
hooks.doPatchsetCreatedHook(change, newPatchSet, db);
if (mergedIntoRef != null) {

View File

@ -50,7 +50,7 @@ public class SubmitStrategyFactory {
private final PatchSetInfoFactory patchSetInfoFactory;
private final Provider<String> urlProvider;
private final ApprovalTypes approvalTypes;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final RebaseChange rebaseChange;
@Inject
@ -59,14 +59,14 @@ public class SubmitStrategyFactory {
@GerritPersonIdent final PersonIdent myIdent,
final PatchSetInfoFactory patchSetInfoFactory,
@CanonicalWebUrl @Nullable final Provider<String> urlProvider,
final ApprovalTypes approvalTypes, final GitReferenceUpdated replication,
final ApprovalTypes approvalTypes, final GitReferenceUpdated gitRefUpdated,
final RebaseChange rebaseChange) {
this.identifiedUserFactory = identifiedUserFactory;
this.myIdent = myIdent;
this.patchSetInfoFactory = patchSetInfoFactory;
this.urlProvider = urlProvider;
this.approvalTypes = approvalTypes;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
this.rebaseChange = rebaseChange;
}
@ -82,7 +82,7 @@ public class SubmitStrategyFactory {
switch (submitType) {
case CHERRY_PICK:
return new CherryPick(args, patchSetInfoFactory, urlProvider,
approvalTypes, replication);
approvalTypes, gitRefUpdated);
case FAST_FORWARD_ONLY:
return new FastForwardOnly(args);
case MERGE_ALWAYS:

View File

@ -85,7 +85,7 @@ public class SubmoduleOp {
private final Map<Change.Id, CodeReviewCommit> commits;
private final PersonIdent myIdent;
private final GitRepositoryManager repoManager;
private final GitReferenceUpdated replication;
private final GitReferenceUpdated gitRefUpdated;
private final SchemaFactory<ReviewDb> schemaFactory;
private final Set<Branch.NameKey> updatedSubscribers;
@ -97,7 +97,7 @@ public class SubmoduleOp {
@Assisted Project destProject, @Assisted List<Change> submitted,
@Assisted final Map<Change.Id, CodeReviewCommit> commits,
@GerritPersonIdent final PersonIdent myIdent,
GitRepositoryManager repoManager, GitReferenceUpdated replication) {
GitRepositoryManager repoManager, GitReferenceUpdated gitRefUpdated) {
this.destBranch = destBranch;
this.mergeTip = mergeTip;
this.rw = rw;
@ -109,7 +109,7 @@ public class SubmoduleOp {
this.commits = commits;
this.myIdent = myIdent;
this.repoManager = repoManager;
this.replication = replication;
this.gitRefUpdated = gitRefUpdated;
updatedSubscribers = new HashSet<Branch.NameKey>();
}
@ -337,7 +337,7 @@ public class SubmoduleOp {
switch (rfu.update()) {
case NEW:
case FAST_FORWARD:
replication.fire(subscriber.getParentKey(), rfu);
gitRefUpdated.fire(subscriber.getParentKey(), rfu);
// TODO since this is performed "in the background" no mail will be
// sent to inform users about the updated branch
break;

View File

@ -260,7 +260,7 @@ public abstract class VersionedMetaData {
switch (result) {
case NEW:
revision = rw.parseCommit(ru.getNewObjectId());
update.replicate(ru);
update.fireGitRefUpdatedEvent(ru);
return revision;
default:
throw new IOException("Cannot update " + ru.getName() + " in "
@ -293,7 +293,7 @@ public abstract class VersionedMetaData {
case NEW:
case FAST_FORWARD:
revision = rw.parseCommit(ru.getNewObjectId());
update.replicate(ru);
update.fireGitRefUpdatedEvent(ru);
return revision;
default:

View File

@ -77,7 +77,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
private ReviewDb schema;
private Provider<String> urlProvider;
private GitRepositoryManager repoManager;
private GitReferenceUpdated replication;
private GitReferenceUpdated gitRefUpdated;
@SuppressWarnings("unchecked")
@Override
@ -90,17 +90,17 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
subscriptions = createStrictMock(SubmoduleSubscriptionAccess.class);
urlProvider = createStrictMock(Provider.class);
repoManager = createStrictMock(GitRepositoryManager.class);
replication = createStrictMock(GitReferenceUpdated.class);
gitRefUpdated = createStrictMock(GitReferenceUpdated.class);
}
private void doReplay() {
replay(schemaFactory, schema, subscriptions, urlProvider, repoManager,
replication);
gitRefUpdated);
}
private void doVerify() {
verify(schemaFactory, schema, subscriptions, urlProvider, repoManager,
replication);
gitRefUpdated);
}
/**
@ -645,7 +645,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
.andReturn(targetRepository);
Capture<RefUpdate> ruCapture = new Capture<RefUpdate>();
replication.fire(eq(targetBranchNameKey.getParentKey()),
gitRefUpdated.fire(eq(targetBranchNameKey.getParentKey()),
capture(ruCapture));
expect(schema.submoduleSubscriptions()).andReturn(subscriptions);
@ -665,7 +665,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
new SubmoduleOp(sourceBranchNameKey, sourceMergeTip, new RevWalk(
sourceRepository), urlProvider, schemaFactory, sourceRepository,
new Project(sourceBranchNameKey.getParentKey()), submitted,
mergedCommits, myIdent, repoManager, replication);
mergedCommits, myIdent, repoManager, gitRefUpdated);
submoduleOp.update();
@ -749,7 +749,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
.andReturn(targetRepository);
Capture<RefUpdate> ruCapture = new Capture<RefUpdate>();
replication.fire(eq(targetBranchNameKey.getParentKey()),
gitRefUpdated.fire(eq(targetBranchNameKey.getParentKey()),
capture(ruCapture));
expect(schema.submoduleSubscriptions()).andReturn(subscriptions);
@ -771,7 +771,7 @@ public class SubmoduleOpTest extends LocalDiskRepositoryTestCase {
new SubmoduleOp(sourceBranchNameKey, sourceMergeTip, new RevWalk(
sourceRepository), urlProvider, schemaFactory, sourceRepository,
new Project(sourceBranchNameKey.getParentKey()), submitted,
mergedCommits, myIdent, repoManager, replication);
mergedCommits, myIdent, repoManager, gitRefUpdated);
submoduleOp.update();