Mercurial > hg-stable
changeset 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 | 93ca7d3278b9 |
files | hgext/remotefilelog/shallowutil.py |
diffstat | 1 files changed, 15 insertions(+), 16 deletions(-) [+] |
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"