black.toml
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 07 Oct 2020 14:26:47 +0530
changeset 45787 225e513c444e
parent 44147 5e84a96d865b
permissions -rw-r--r--
tags: add safety check for len(record) while reading hgtagsfnodescache I am trying to fix a breakage where somehow we end up getting a node of 12 length from `getfnode()`. Understanding the hgtagsfnodescache code, it seems highly unlikely that it can happen unless one of `mctx.readfast().get()` or `ctx.filenode()` is returning a node of 12 length. For safety, I think it's better to add a check to make sure that record which we are parsing is of same length we are expecting otherwise we consider that as invalid record. Differential Revision: https://phab.mercurial-scm.org/D9169

[tool.black]
line-length = 80
exclude = '''
build/
| wheelhouse/
| dist/
| packages/
| \.hg/
| \.mypy_cache/
| \.venv/
| mercurial/thirdparty/
'''
skip-string-normalization = true
quiet = true