Show More
@@ -853,7 +853,8 b' class GitRepository(BaseRepository):' | |||||
853 | shadow_repo._checkout(pr_branch, create=True) |
|
853 | shadow_repo._checkout(pr_branch, create=True) | |
854 | try: |
|
854 | try: | |
855 | shadow_repo._local_fetch(source_repo.path, source_ref.name) |
|
855 | shadow_repo._local_fetch(source_repo.path, source_ref.name) | |
856 | except RepositoryError: |
|
856 | except RepositoryError as e: | |
|
857 | log.exception('Failure when doing local fetch on git shadow repo') | |||
857 | return MergeResponse( |
|
858 | return MergeResponse( | |
858 | False, False, None, MergeFailureReason.MISSING_COMMIT) |
|
859 | False, False, None, MergeFailureReason.MISSING_COMMIT) | |
859 |
|
860 | |||
@@ -863,7 +864,8 b' class GitRepository(BaseRepository):' | |||||
863 | shadow_repo._local_merge(merge_message, merger_name, merger_email, |
|
864 | shadow_repo._local_merge(merge_message, merger_name, merger_email, | |
864 | [source_ref.commit_id]) |
|
865 | [source_ref.commit_id]) | |
865 | merge_possible = True |
|
866 | merge_possible = True | |
866 | except RepositoryError: |
|
867 | except RepositoryError as e: | |
|
868 | log.exception('Failure when doing local merge on git shadow repo') | |||
867 | merge_possible = False |
|
869 | merge_possible = False | |
868 | merge_failure_reason = MergeFailureReason.MERGE_FAILED |
|
870 | merge_failure_reason = MergeFailureReason.MERGE_FAILED | |
869 |
|
871 | |||
@@ -877,7 +879,9 b' class GitRepository(BaseRepository):' | |||||
877 | # cannot retrieve the merge commit. |
|
879 | # cannot retrieve the merge commit. | |
878 | shadow_repo = GitRepository(shadow_repository_path) |
|
880 | shadow_repo = GitRepository(shadow_repository_path) | |
879 | merge_commit_id = shadow_repo.branches[pr_branch] |
|
881 | merge_commit_id = shadow_repo.branches[pr_branch] | |
880 | except RepositoryError: |
|
882 | except RepositoryError as e: | |
|
883 | log.exception( | |||
|
884 | 'Failure when doing local push on git shadow repo') | |||
881 | merge_succeeded = False |
|
885 | merge_succeeded = False | |
882 | merge_failure_reason = MergeFailureReason.PUSH_FAILED |
|
886 | merge_failure_reason = MergeFailureReason.PUSH_FAILED | |
883 | else: |
|
887 | else: |
@@ -669,7 +669,8 b' class MercurialRepository(BaseRepository' | |||||
669 | try: |
|
669 | try: | |
670 | source_repo._validate_pull_reference(source_ref) |
|
670 | source_repo._validate_pull_reference(source_ref) | |
671 | shadow_repo._local_pull(source_repo.path, source_ref) |
|
671 | shadow_repo._local_pull(source_repo.path, source_ref) | |
672 | except CommitDoesNotExistError: |
|
672 | except CommitDoesNotExistError as e: | |
|
673 | log.exception('Failure when doing local pull on hg shadow repo') | |||
673 | return MergeResponse( |
|
674 | return MergeResponse( | |
674 | False, False, None, MergeFailureReason.MISSING_COMMIT) |
|
675 | False, False, None, MergeFailureReason.MISSING_COMMIT) | |
675 |
|
676 | |||
@@ -681,7 +682,8 b' class MercurialRepository(BaseRepository' | |||||
681 | target_ref, merge_message, merger_name, merger_email, |
|
682 | target_ref, merge_message, merger_name, merger_email, | |
682 | source_ref) |
|
683 | source_ref) | |
683 | merge_possible = True |
|
684 | merge_possible = True | |
684 | except RepositoryError: |
|
685 | except RepositoryError as e: | |
|
686 | log.exception('Failure when doing local merge on hg shadow repo') | |||
685 | merge_possible = False |
|
687 | merge_possible = False | |
686 | merge_failure_reason = MergeFailureReason.MERGE_FAILED |
|
688 | merge_failure_reason = MergeFailureReason.MERGE_FAILED | |
687 |
|
689 | |||
@@ -705,7 +707,9 b' class MercurialRepository(BaseRepository' | |||||
705 | merge_commit_id, self.path, push_branches=True, |
|
707 | merge_commit_id, self.path, push_branches=True, | |
706 | enable_hooks=True) |
|
708 | enable_hooks=True) | |
707 | merge_succeeded = True |
|
709 | merge_succeeded = True | |
708 | except RepositoryError: |
|
710 | except RepositoryError as e: | |
|
711 | log.exception( | |||
|
712 | 'Failure when doing local push on hg shadow repo') | |||
709 | merge_succeeded = False |
|
713 | merge_succeeded = False | |
710 | merge_failure_reason = MergeFailureReason.PUSH_FAILED |
|
714 | merge_failure_reason = MergeFailureReason.PUSH_FAILED | |
711 | else: |
|
715 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now