##// END OF EJS Templates

Compare Commits

Target:

Source:

Time Author Commit Description
No commits in this compare
@@ -104,10 +104,6 b' class MergeFailureReason(object):'
104 # The source repo reference is missing.
104 # The source repo reference is missing.
105 MISSING_SOURCE_REF = 10
105 MISSING_SOURCE_REF = 10
106
106
107 # The merge was not successful, there are conflicts related to sub
108 # repositories.
109 SUBREPO_MERGE_FAILED = 11
110
111
107
112 class UpdateFailureReason(object):
108 class UpdateFailureReason(object):
113 """
109 """
@@ -44,7 +44,7 b' 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, SubrepoMergeError)
47 TagDoesNotExistError, CommitDoesNotExistError)
48
48
49 hexlify = binascii.hexlify
49 hexlify = binascii.hexlify
50 nullid = "\0" * 20
50 nullid = "\0" * 20
@@ -712,11 +712,6 b' 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
720 except RepositoryError:
715 except RepositoryError:
721 log.exception('Failure when doing local merge on hg shadow repo')
716 log.exception('Failure when doing local merge on hg shadow repo')
722 merge_possible = False
717 merge_possible = False
@@ -128,14 +128,6 b' class NodeAlreadyRemovedError(Committing'
128 pass
128 pass
129
129
130
130
131 class SubrepoMergeError(RepositoryError):
132 """
133 This happens if we try to merge a repository which contains subrepos and
134 the subrepos cannot be merged. The subrepos are not merged itself but
135 their references in the root repo are merged.
136 """
137
138
139 class ImproperArchiveTypeError(VCSError):
131 class ImproperArchiveTypeError(VCSError):
140 pass
132 pass
141
133
@@ -164,7 +156,6 b' class UnhandledException(VCSError):'
164 # TODO: johbo: Define our own exception for this and stop abusing
156 # TODO: johbo: Define our own exception for this and stop abusing
165 # urllib's exception class.
157 # urllib's exception class.
166 'url_error': urllib2.URLError,
158 'url_error': urllib2.URLError,
167 'subrepo_merge_error': SubrepoMergeError,
168 }
159 }
169
160
170
161
@@ -105,9 +105,6 b' class PullRequestModel(BaseModel):'
105 MergeFailureReason.MISSING_SOURCE_REF: lazy_ugettext(
105 MergeFailureReason.MISSING_SOURCE_REF: lazy_ugettext(
106 'This pull request cannot be merged because the source '
106 'This pull request cannot be merged because the source '
107 'reference is missing.'),
107 'reference is missing.'),
108 MergeFailureReason.SUBREPO_MERGE_FAILED: lazy_ugettext(
109 'This pull request cannot be merged because of conflicts related '
110 'to sub repositories.'),
111 }
108 }
112
109
113 UPDATE_STATUS_MESSAGES = {
110 UPDATE_STATUS_MESSAGES = {