##// END OF EJS Templates
subrepo: Handle subrepo merge errors.
Martin Bornhold -
r1108:ebe0247c default
parent child
Show More
@@ -44,7 +44,7 from rhodecode.lib.vcs.backends.hg.diff
44 from rhodecode.lib.vcs.backends.hg.inmemory import MercurialInMemoryCommit
44 from rhodecode.lib.vcs.backends.hg.inmemory import MercurialInMemoryCommit
45 from rhodecode.lib.vcs.exceptions import (
45 from rhodecode.lib.vcs.exceptions import (
46 EmptyRepositoryError, RepositoryError, TagAlreadyExistError,
46 EmptyRepositoryError, RepositoryError, TagAlreadyExistError,
47 TagDoesNotExistError, CommitDoesNotExistError)
47 TagDoesNotExistError, CommitDoesNotExistError, SubrepoMergeError)
48
48
49 hexlify = binascii.hexlify
49 hexlify = binascii.hexlify
50 nullid = "\0" * 20
50 nullid = "\0" * 20
@@ -712,6 +712,11 class MercurialRepository(BaseRepository
712 # shadow repository.
712 # shadow repository.
713 shadow_repo.bookmark('pr-merge', revision=merge_commit_id)
713 shadow_repo.bookmark('pr-merge', revision=merge_commit_id)
714 merge_ref = Reference('book', 'pr-merge', merge_commit_id)
714 merge_ref = Reference('book', 'pr-merge', merge_commit_id)
715 except SubrepoMergeError:
716 log.exception(
717 'Subrepo merge error during local merge on hg shadow repo.')
718 merge_possible = False
719 merge_failure_reason = MergeFailureReason.SUBREPO_MERGE_FAILED
715 except RepositoryError:
720 except RepositoryError:
716 log.exception('Failure when doing local merge on hg shadow repo')
721 log.exception('Failure when doing local merge on hg shadow repo')
717 merge_possible = False
722 merge_possible = False
General Comments 0
You need to be logged in to leave comments. Login now