Show More
@@ -510,6 +510,7 b' class PullRequestModel(BaseModel):' | |||
|
510 | 510 | reviewer.rule_data = rule_data |
|
511 | 511 | |
|
512 | 512 | Session().add(reviewer) |
|
513 | Session().flush() | |
|
513 | 514 | |
|
514 | 515 | # Set approval status to "Under Review" for all commits which are |
|
515 | 516 | # part of this pull request. |
@@ -519,7 +520,13 b' class PullRequestModel(BaseModel):' | |||
|
519 | 520 | user=created_by_user, |
|
520 | 521 | pull_request=pull_request |
|
521 | 522 | ) |
|
523 | # we commit early at this point. This has to do with a fact | |
|
524 | # that before queries do some row-locking. And because of that | |
|
525 | # we need to commit and finish transation before below validate call | |
|
526 | # that for large repos could be long resulting in long row locks | |
|
527 | Session().commit() | |
|
522 | 528 | |
|
529 | # prepare workspace, and run initial merge simulation | |
|
523 | 530 | MergeCheck.validate( |
|
524 | 531 | pull_request, user=created_by_user, translator=translator) |
|
525 | 532 | |
@@ -1629,7 +1636,7 b' class MergeCheck(object):' | |||
|
1629 | 1636 | if fail_early: |
|
1630 | 1637 | return merge_check |
|
1631 | 1638 | |
|
1632 | # merge possible | |
|
1639 | # merge possible, here is the filesystem simulation + shadow repo | |
|
1633 | 1640 | merge_status, msg = PullRequestModel().merge_status( |
|
1634 | 1641 | pull_request, translator=translator, |
|
1635 | 1642 | force_shadow_repo_refresh=force_shadow_repo_refresh) |
General Comments 0
You need to be logged in to leave comments.
Login now