Mercurial > hg
diff hgext/remotefilelog/shallowutil.py @ 47551:b7a706e7843a
shallowutil: dedent code after the previous change
Differential Revision: https://phab.mercurial-scm.org/D11008
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 07 Jul 2021 11:48:08 -0400 |
parents | db31bafa4ae3 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/hgext/remotefilelog/shallowutil.py Wed Jul 07 11:47:02 2021 -0400 +++ b/hgext/remotefilelog/shallowutil.py Wed Jul 07 11:48:08 2021 -0400 @@ -251,23 +251,22 @@ raise BadRemotefilelogHeader( "unexpected remotefilelog header: illegal format" ) - if True: - header = raw[:index] - if header.startswith(b'v'): - # v1 and above, header starts with 'v' - if header.startswith(b'v1\n'): - for s in header.split(b'\n'): - if s.startswith(constants.METAKEYSIZE): - size = int(s[len(constants.METAKEYSIZE) :]) - elif s.startswith(constants.METAKEYFLAG): - flags = int(s[len(constants.METAKEYFLAG) :]) - else: - raise BadRemotefilelogHeader( - b'unsupported remotefilelog header: %s' % header - ) + header = raw[:index] + if header.startswith(b'v'): + # v1 and above, header starts with 'v' + if header.startswith(b'v1\n'): + for s in header.split(b'\n'): + if s.startswith(constants.METAKEYSIZE): + size = int(s[len(constants.METAKEYSIZE) :]) + elif s.startswith(constants.METAKEYFLAG): + flags = int(s[len(constants.METAKEYFLAG) :]) else: - # v0, str(int(size)) is the header - size = int(header) + raise BadRemotefilelogHeader( + b'unsupported remotefilelog header: %s' % header + ) + else: + # v0, str(int(size)) is the header + size = int(header) if size is None: raise BadRemotefilelogHeader( "unexpected remotefilelog header: no size found"