##// END OF EJS Templates
shallowutil: dedent code after the previous change...
Augie Fackler -
r48340:e2888ebb default draft
parent child Browse files
Show More
@@ -251,23 +251,22 b' def parsesizeflags(raw):'
251 251 raise BadRemotefilelogHeader(
252 252 "unexpected remotefilelog header: illegal format"
253 253 )
254 if True:
255 header = raw[:index]
256 if header.startswith(b'v'):
257 # v1 and above, header starts with 'v'
258 if header.startswith(b'v1\n'):
259 for s in header.split(b'\n'):
260 if s.startswith(constants.METAKEYSIZE):
261 size = int(s[len(constants.METAKEYSIZE) :])
262 elif s.startswith(constants.METAKEYFLAG):
263 flags = int(s[len(constants.METAKEYFLAG) :])
264 else:
265 raise BadRemotefilelogHeader(
266 b'unsupported remotefilelog header: %s' % header
267 )
254 header = raw[:index]
255 if header.startswith(b'v'):
256 # v1 and above, header starts with 'v'
257 if header.startswith(b'v1\n'):
258 for s in header.split(b'\n'):
259 if s.startswith(constants.METAKEYSIZE):
260 size = int(s[len(constants.METAKEYSIZE) :])
261 elif s.startswith(constants.METAKEYFLAG):
262 flags = int(s[len(constants.METAKEYFLAG) :])
268 263 else:
269 # v0, str(int(size)) is the header
270 size = int(header)
264 raise BadRemotefilelogHeader(
265 b'unsupported remotefilelog header: %s' % header
266 )
267 else:
268 # v0, str(int(size)) is the header
269 size = int(header)
271 270 if size is None:
272 271 raise BadRemotefilelogHeader(
273 272 "unexpected remotefilelog header: no size found"
General Comments 0
You need to be logged in to leave comments. Login now