Make submit strategies re-executeable

The RevWalk used for the MergeOp must not be reset without retaining
the CAN_MERGE flag. If the CAN_MERGE flag is removed from the RevWalk
follow-up submit strategies cannot succeed anymore.

Change-Id: Ic7ddd5efa2937749020f91dc75a4f4f1ff2bd67c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2012-09-25 15:52:35 +02:00
parent 7d9ae387f4
commit 0ee523efdf
4 changed files with 26 additions and 21 deletions

View File

@@ -40,8 +40,9 @@ public class MergeIfNecessary extends SubmitStrategy {
while (!toMerge.isEmpty()) {
newMergeTip =
mergeOneCommit(args.db, args.identifiedUserFactory, args.myIdent,
args.repo, args.rw, args.inserter, args.useContentMerge,
args.destBranch, mergeTip, toMerge.remove(0));
args.repo, args.rw, args.inserter, args.canMergeFlag,
args.useContentMerge, args.destBranch, mergeTip,
toMerge.remove(0));
}
final PatchSetApproval submitApproval =