Mark ALREADY_MERGED changes as merged in the DB
If a change is marked ALREADY_MERGED, likely a result of a bug in the merge code, it does not end up in the toSubmit list and so was never being marked as merged, despite the branch head already having advanced. Fix this so ALREADY_MERGED changes are updated to match the branch state. This does not fix any bugs in the merge code proper, but at least allows recovery from a certain kind of bad state. Works around (does not fix) bug 1985 and perhaps bug 600. Change-Id: I44548cce039e303a86d579b0b0d76b12ad9bdcfb
This commit is contained in:
@@ -598,6 +598,11 @@ public class MergeOp {
|
||||
try {
|
||||
if (rw.isMergedInto(commit, branchTip)) {
|
||||
commit.statusCode = CommitMergeStatus.ALREADY_MERGED;
|
||||
try {
|
||||
setMergedPatchSet(chg.getId(), ps.getId());
|
||||
} catch (OrmException e) {
|
||||
log.error("Cannot mark change " + chg.getId() + " merged", e);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
} catch (IOException err) {
|
||||
|
||||
Reference in New Issue
Block a user