Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Time
Author
Commit
Description
Fri, 28 Oct 2016 11:06:55
Martin Bornhold
r1106:490ebeeb75af
subrepo: Add merge failure reason code ad message for subrepo merge conflicts.
Fri, 28 Oct 2016 11:07:21
Martin Bornhold
r1107:6bc055e1504d
subrepo: Add exception for subrepo merge errors.
Fri, 28 Oct 2016 11:07:35
Martin Bornhold
r1108:ebe0247cd154
subrepo: Handle subrepo merge errors.
3 commits hidden, click expand to show them.
0
rhodecode/lib/vcs/backends/base.py
rhodecode/lib/vcs/backends/base.py
+4
0
@@
-104,6
+104,10
class MergeFailureReason(object):
104
104
# The source repo reference is missing.
105
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
107
111
108
112
class UpdateFailureReason ( object ):
109
113
"""
0
rhodecode/lib/vcs/backends/hg/repository.py
rhodecode/lib/vcs/backends/hg/repository.py
+6
-1
@@
-44,7
+44,7
from rhodecode.lib.vcs.backends.hg.diff
44
44
from rhodecode.lib.vcs.backends.hg.inmemory import MercurialInMemoryCommit
45
45
from rhodecode.lib.vcs.exceptions import (
46
46
EmptyRepositoryError , RepositoryError , TagAlreadyExistError ,
47
TagDoesNotExistError , CommitDoesNotExistError )
47
TagDoesNotExistError , CommitDoesNotExistError , SubrepoMergeError )
48
48
49
49
hexlify = binascii . hexlify
50
50
nullid = " \0 " * 20
@@
-712,6
+712,11
class MercurialRepository(BaseRepository
712
712
# shadow repository.
713
713
shadow_repo . bookmark ( 'pr-merge' , revision = merge_commit_id )
714
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
720
except RepositoryError :
716
721
log . exception ( 'Failure when doing local merge on hg shadow repo' )
717
722
merge_possible = False
0
rhodecode/lib/vcs/exceptions.py
rhodecode/lib/vcs/exceptions.py
+9
0
@@
-128,6
+128,14
class NodeAlreadyRemovedError(Committing
128
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
131
139
class ImproperArchiveTypeError ( VCSError ):
132
140
pass
133
141
@@
-156,6
+164,7
class UnhandledException(VCSError):
156
164
# TODO: johbo: Define our own exception for this and stop abusing
157
165
# urllib's exception class.
158
166
'url_error' : urllib2 . URLError ,
167
'subrepo_merge_error' : SubrepoMergeError ,
159
168
}
160
169
161
170
0
rhodecode/model/pull_request.py
rhodecode/model/pull_request.py
+3
0
@@
-105,6
+105,9
class PullRequestModel(BaseModel):
105
105
MergeFailureReason . MISSING_SOURCE_REF : lazy_ugettext (
106
106
'This pull request cannot be merged because the source '
107
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.' ),
108
111
}
109
112
110
113
UPDATE_STATUS_MESSAGES = {
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages