It seems better to reuse the variable we carefully extracted
This also open the way to more flexible way to retrieve these flags.
( )
indygreg | |
Alphare |
hg-reviewers |
It seems better to reuse the variable we carefully extracted
This also open the way to more flexible way to retrieve these flags.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/revlog.py (4 lines) |
elif fmt == REVLOGV1: | elif fmt == REVLOGV1: | ||||
if flags & ~REVLOGV1_FLAGS: | if flags & ~REVLOGV1_FLAGS: | ||||
raise error.RevlogError( | raise error.RevlogError( | ||||
_(b'unknown flags (%#04x) in version %d revlog %s') | _(b'unknown flags (%#04x) in version %d revlog %s') | ||||
% (flags >> 16, fmt, self.display_id) | % (flags >> 16, fmt, self.display_id) | ||||
) | ) | ||||
self._inline = header & FLAG_INLINE_DATA | self._inline = self._format_flags & FLAG_INLINE_DATA | ||||
self._generaldelta = header & FLAG_GENERALDELTA | self._generaldelta = self._format_flags & FLAG_GENERALDELTA | ||||
elif fmt == REVLOGV2: | elif fmt == REVLOGV2: | ||||
if flags & ~REVLOGV2_FLAGS: | if flags & ~REVLOGV2_FLAGS: | ||||
raise error.RevlogError( | raise error.RevlogError( | ||||
_(b'unknown flags (%#04x) in version %d revlog %s') | _(b'unknown flags (%#04x) in version %d revlog %s') | ||||
% (flags >> 16, fmt, self.display_id) | % (flags >> 16, fmt, self.display_id) | ||||
) | ) | ||||