Skip to content

Commit 97e94a1

Browse files
committed
Increase max commits in an integration to 200
Change-Id: I083c0212dde95ba0eed676198ae59216b70c8fc4 Reviewed-by: Toni Saario <[email protected]>
1 parent 16a55d1 commit 97e94a1

File tree

1 file changed

+7
-7
lines changed
  • src/main/java/com/googlesource/gerrit/plugins/qtcodereview

1 file changed

+7
-7
lines changed

src/main/java/com/googlesource/gerrit/plugins/qtcodereview/QtUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,12 @@ private List<ChangeData> arrangeOrderLikeInRef(
349349
// It can always be trusted that parent in index 0 is the correct one
350350
commit = revWalk.parseCommit(commit.getParent(0));
351351
}
352-
} while (commit != null && !revWalk.isMergedInto(commit, branchHead) && count < 100);
352+
} while (commit != null && !revWalk.isMergedInto(commit, branchHead) && count < 200);
353353
} catch (Exception e) {
354354
throw new Exception("arranging change order failed: " + e.getMessage());
355355
}
356356

357-
if (count == 100) throw new Exception("arranging change order failed: too many commits");
357+
if (count == 200) throw new Exception("arranging change order failed: too many commits");
358358

359359
return results;
360360
}
@@ -424,9 +424,9 @@ private ObjectId findReusableStagingHead(
424424
// It can always be trusted that parent in index 0 is the correct one
425425
commit = revWalk.parseCommit(commit.getParent(0));
426426
} else commit = null;
427-
} while (commit != null && !commit.equals(branchHead) && count < 100);
427+
} while (commit != null && !commit.equals(branchHead) && count < 200);
428428

429-
if (count == 100) throw new Exception("can't find ref, too many commits");
429+
if (count == 200) throw new Exception("can't find ref, too many commits");
430430
} catch (Exception e) {
431431
reusableHead = null;
432432
logger.atSevere().log("Finding reusable staging commit failed: %s", e.getMessage());
@@ -729,14 +729,14 @@ private List<RevCommit> listCommitsInIntegrationBranch(Repository git,
729729
} else commit = null;
730730
}
731731
count++;
732-
} while (commit != null && count < 100);
732+
} while (commit != null && count < 200);
733733
} catch (Exception e) {
734734
commits = null;
735735
logger.atWarning().log("listing commits in a branch failed: %s", e);
736736
}
737737

738-
if (count >= 100) {
739-
logger.atWarning().log("listing commits in a branch failed: too many commmits");
738+
if (count >= 200) {
739+
logger.atWarning().log("listing commits in a branch failed: too many commits");
740740
return null;
741741
}
742742

0 commit comments

Comments
 (0)