Merge branch 'stable-2.8'
* stable-2.8: Fix cherry pick of multiple changes Fix typos in 2.8.2 release notes Conflicts: gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/CherryPick.java Change-Id: Ib12351af322e8934f17909a56181e8953977c840
This commit is contained in:
@@ -63,7 +63,7 @@ that were set to a URL.
|
||||
If HEAD was detached the `GetHead` REST endpoint refused to resolve HEAD
|
||||
when the user was not a project owner.
|
||||
|
||||
* link:https://code.google.com/p/gerrit/issues/detail?id=2932[Issue 2932]:
|
||||
* link:https://code.google.com/p/gerrit/issues/detail?id=2392[Issue 2392]:
|
||||
Keep `status:closed` limit below MySQL Connector/J's hard limit.
|
||||
+
|
||||
Since MySQL Connector/J 5.1.21 does not allow limits above 50M rows
|
||||
@@ -96,7 +96,7 @@ Fix submit rule evaluation for non blocking labels.
|
||||
Putting a negative score on a label configured as `NoBlock` was causing
|
||||
the submit button to be disabled.
|
||||
|
||||
* link:https://code.google.com/p/gerrit/issues/detail?id=2331[Issue 2331]:
|
||||
* link:https://code.google.com/p/gerrit/issues/detail?id=2441[Issue 2441]:
|
||||
Allow to create branch with new commits.
|
||||
+
|
||||
Branches could not be created with a new commit which is not on other branches
|
||||
|
||||
@@ -60,18 +60,17 @@ public class CherryPick extends SubmitStrategy {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CodeReviewCommit _run(final CodeReviewCommit mergeTip,
|
||||
protected CodeReviewCommit _run(CodeReviewCommit mergeTip,
|
||||
final List<CodeReviewCommit> toMerge) throws MergeException {
|
||||
CodeReviewCommit newMergeTip = mergeTip;
|
||||
while (!toMerge.isEmpty()) {
|
||||
final CodeReviewCommit n = toMerge.remove(0);
|
||||
|
||||
try {
|
||||
if (newMergeTip == null) {
|
||||
if (mergeTip == null) {
|
||||
// The branch is unborn. Take a fast-forward resolution to
|
||||
// create the branch.
|
||||
//
|
||||
newMergeTip = n;
|
||||
mergeTip = n;
|
||||
n.setStatusCode(CommitMergeStatus.CLEAN_MERGE);
|
||||
|
||||
} else if (n.getParentCount() == 0) {
|
||||
@@ -86,10 +85,10 @@ public class CherryPick extends SubmitStrategy {
|
||||
// that on the current merge tip.
|
||||
//
|
||||
|
||||
newMergeTip = writeCherryPickCommit(mergeTip, n);
|
||||
mergeTip = writeCherryPickCommit(mergeTip, n);
|
||||
|
||||
if (newMergeTip != null) {
|
||||
newCommits.put(newMergeTip.getPatchsetId().getParentKey(), newMergeTip);
|
||||
if (mergeTip != null) {
|
||||
newCommits.put(mergeTip.getPatchsetId().getParentKey(), mergeTip);
|
||||
} else {
|
||||
n.setStatusCode(CommitMergeStatus.PATH_CONFLICT);
|
||||
}
|
||||
@@ -102,17 +101,17 @@ public class CherryPick extends SubmitStrategy {
|
||||
// instead behave as though MERGE_IF_NECESSARY was configured.
|
||||
//
|
||||
if (!args.mergeUtil.hasMissingDependencies(args.mergeSorter, n)) {
|
||||
if (args.rw.isMergedInto(newMergeTip, n)) {
|
||||
newMergeTip = n;
|
||||
if (args.rw.isMergedInto(mergeTip, n)) {
|
||||
mergeTip = n;
|
||||
} else {
|
||||
newMergeTip =
|
||||
mergeTip =
|
||||
args.mergeUtil.mergeOneCommit(args.myIdent, args.repo,
|
||||
args.rw, args.inserter, args.canMergeFlag,
|
||||
args.destBranch, newMergeTip, n);
|
||||
args.destBranch, mergeTip, n);
|
||||
}
|
||||
final PatchSetApproval submitApproval =
|
||||
args.mergeUtil.markCleanMerges(args.rw, args.canMergeFlag,
|
||||
newMergeTip, args.alreadyAccepted);
|
||||
mergeTip, args.alreadyAccepted);
|
||||
setRefLogIdent(submitApproval);
|
||||
|
||||
} else {
|
||||
@@ -127,7 +126,7 @@ public class CherryPick extends SubmitStrategy {
|
||||
throw new MergeException("Cannot merge " + n.name(), e);
|
||||
}
|
||||
}
|
||||
return newMergeTip;
|
||||
return mergeTip;
|
||||
}
|
||||
|
||||
private CodeReviewCommit writeCherryPickCommit(CodeReviewCommit mergeTip,
|
||||
|
||||
Reference in New Issue
Block a user