Show More
@@ -433,12 +433,14 b' class RepoPullRequestsView(RepoAppView, ' | |||
|
433 | 433 | source_scm = source_repo.scm_instance() |
|
434 | 434 | target_scm = target_repo.scm_instance() |
|
435 | 435 | |
|
436 | # try first shadow repo, fallback to regular repo | |
|
436 | shadow_scm = None | |
|
437 | 437 | try: |
|
438 |
|
|
|
438 | shadow_scm = pull_request_latest.get_shadow_repo() | |
|
439 | 439 | except Exception: |
|
440 | 440 | log.debug('Failed to get shadow repo', exc_info=True) |
|
441 | commits_source_repo = source_scm | |
|
441 | # try first the existing source_repo, and then shadow | |
|
442 | # repo if we can obtain one | |
|
443 | commits_source_repo = source_scm or shadow_scm | |
|
442 | 444 | |
|
443 | 445 | c.commits_source_repo = commits_source_repo |
|
444 | 446 | c.ancestor = None # set it to None, to hide it from PR view |
@@ -3763,7 +3763,8 b' class PullRequest(Base, _PullRequestBase' | |||
|
3763 | 3763 | vcs_obj = self.target_repo.scm_instance() |
|
3764 | 3764 | shadow_repository_path = vcs_obj._get_shadow_repository_path( |
|
3765 | 3765 | workspace_id) |
|
3766 | return vcs_obj._get_shadow_instance(shadow_repository_path) | |
|
3766 | if os.path.isdir(shadow_repository_path): | |
|
3767 | return vcs_obj._get_shadow_instance(shadow_repository_path) | |
|
3767 | 3768 | |
|
3768 | 3769 | |
|
3769 | 3770 | class PullRequestVersion(Base, _PullRequestBase): |
General Comments 0
You need to be logged in to leave comments.
Login now