Show More
@@ -87,6 +87,8 b' class flagprocessorsmixin(object):' | |||||
87 | See the documentation of the ``_processflags`` method for details. |
|
87 | See the documentation of the ``_processflags`` method for details. | |
88 | """ |
|
88 | """ | |
89 |
|
89 | |||
|
90 | _flagserrorclass = error.RevlogError | |||
|
91 | ||||
90 | def _processflags(self, text, flags, operation, raw=False): |
|
92 | def _processflags(self, text, flags, operation, raw=False): | |
91 | """Inspect revision data flags and applies transforms defined by |
|
93 | """Inspect revision data flags and applies transforms defined by | |
92 | registered flag processors. |
|
94 | registered flag processors. | |
@@ -117,8 +119,8 b' class flagprocessorsmixin(object):' | |||||
117 | operation) |
|
119 | operation) | |
118 | # Check all flags are known. |
|
120 | # Check all flags are known. | |
119 | if flags & ~REVIDX_KNOWN_FLAGS: |
|
121 | if flags & ~REVIDX_KNOWN_FLAGS: | |
120 |
raise |
|
122 | raise self._flagserrorclass(_("incompatible revision flag '%#x'") % | |
121 | (flags & ~REVIDX_KNOWN_FLAGS)) |
|
123 | (flags & ~REVIDX_KNOWN_FLAGS)) | |
122 | validatehash = True |
|
124 | validatehash = True | |
123 | # Depending on the operation (read or write), the order might be |
|
125 | # Depending on the operation (read or write), the order might be | |
124 | # reversed due to non-commutative transforms. |
|
126 | # reversed due to non-commutative transforms. | |
@@ -134,7 +136,7 b' class flagprocessorsmixin(object):' | |||||
134 |
|
136 | |||
135 | if flag not in self._flagprocessors: |
|
137 | if flag not in self._flagprocessors: | |
136 | message = _("missing processor for flag '%#x'") % (flag) |
|
138 | message = _("missing processor for flag '%#x'") % (flag) | |
137 |
raise |
|
139 | raise self._flagserrorclass(message) | |
138 |
|
140 | |||
139 | processor = self._flagprocessors[flag] |
|
141 | processor = self._flagprocessors[flag] | |
140 | if processor is not None: |
|
142 | if processor is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now