Show More
@@ -247,6 +247,11 b' def parsesizeflags(raw):' | |||||
247 | size = None |
|
247 | size = None | |
248 | try: |
|
248 | try: | |
249 | index = raw.index(b'\0') |
|
249 | index = raw.index(b'\0') | |
|
250 | except ValueError: | |||
|
251 | raise BadRemotefilelogHeader( | |||
|
252 | "unexpected remotefilelog header: illegal format" | |||
|
253 | ) | |||
|
254 | if True: | |||
250 | header = raw[:index] |
|
255 | header = raw[:index] | |
251 | if header.startswith(b'v'): |
|
256 | if header.startswith(b'v'): | |
252 | # v1 and above, header starts with 'v' |
|
257 | # v1 and above, header starts with 'v' | |
@@ -263,10 +268,6 b' def parsesizeflags(raw):' | |||||
263 | else: |
|
268 | else: | |
264 | # v0, str(int(size)) is the header |
|
269 | # v0, str(int(size)) is the header | |
265 | size = int(header) |
|
270 | size = int(header) | |
266 | except ValueError: |
|
|||
267 | raise BadRemotefilelogHeader( |
|
|||
268 | "unexpected remotefilelog header: illegal format" |
|
|||
269 | ) |
|
|||
270 | if size is None: |
|
271 | if size is None: | |
271 | raise BadRemotefilelogHeader( |
|
272 | raise BadRemotefilelogHeader( | |
272 | "unexpected remotefilelog header: no size found" |
|
273 | "unexpected remotefilelog header: no size found" |
General Comments 0
You need to be logged in to leave comments.
Login now