Show More
@@ -148,6 +148,16 b' def offset_type(offset, type):' | |||||
148 | return int(int(offset) << 16 | type) |
|
148 | return int(int(offset) << 16 | type) | |
149 |
|
149 | |||
150 |
|
150 | |||
|
151 | def _verify_revision(rl, skipflags, state, node): | |||
|
152 | """Verify the integrity of the given revlog ``node`` while providing a hook | |||
|
153 | point for extensions to influence the operation.""" | |||
|
154 | if skipflags: | |||
|
155 | state[b'skipread'].add(node) | |||
|
156 | else: | |||
|
157 | # Side-effect: read content and verify hash. | |||
|
158 | rl.revision(node) | |||
|
159 | ||||
|
160 | ||||
151 | @attr.s(slots=True, frozen=True) |
|
161 | @attr.s(slots=True, frozen=True) | |
152 | class _revisioninfo(object): |
|
162 | class _revisioninfo(object): | |
153 | """Information about a revision that allows building its fulltext |
|
163 | """Information about a revision that allows building its fulltext | |
@@ -2914,11 +2924,7 b' class revlog(object):' | |||||
2914 | if skipflags: |
|
2924 | if skipflags: | |
2915 | skipflags &= self.flags(rev) |
|
2925 | skipflags &= self.flags(rev) | |
2916 |
|
2926 | |||
2917 |
if skipflags |
|
2927 | _verify_revision(self, skipflags, state, node) | |
2918 | state[b'skipread'].add(node) |
|
|||
2919 | else: |
|
|||
2920 | # Side-effect: read content and verify hash. |
|
|||
2921 | self.revision(node) |
|
|||
2922 |
|
2928 | |||
2923 | l1 = self.rawsize(rev) |
|
2929 | l1 = self.rawsize(rev) | |
2924 | l2 = len(self.rawdata(node)) |
|
2930 | l2 = len(self.rawdata(node)) |
General Comments 0
You need to be logged in to leave comments.
Login now