annotate black.toml @ 45871:a985c4fb23ca

transaction: change list of journal entries into a dictionary The transaction object used to keep a mapping table of path names to journal entries and a list of journal entries consisting of path and file offset to truncate on rollback. The offsets are used in three cases. repair.strip and rollback process all of them in one go, but they care about the order. For them, it is perfectly reasonable to read the journal back from disk as both operations already involve at least one system call per journal entry. The other consumer is the revlog logic for moving from inline to external data storage. It doesn't care about the order of the journal and just needs to original offset stored. Further optimisations are possible here to move the in-memory journal to a set(), but without memoisation of the original revlog size this could turn it into O(n^2) behavior in worst case when many revlogs need to migrated. Differential Revision: https://phab.mercurial-scm.org/D9277
author Joerg Sonnenberger <joerg@bec.de>
date Sat, 07 Nov 2020 21:34:09 +0100
parents 5e84a96d865b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43064
929678eb4cbd black: add a pyproject.toml that contains our black settings
Augie Fackler <augie@google.com>
parents:
diff changeset
1 [tool.black]
929678eb4cbd black: add a pyproject.toml that contains our black settings
Augie Fackler <augie@google.com>
parents:
diff changeset
2 line-length = 80
43224
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
3 exclude = '''
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
4 build/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
5 | wheelhouse/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
6 | dist/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
7 | packages/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
8 | \.hg/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
9 | \.mypy_cache/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
10 | \.venv/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
11 | mercurial/thirdparty/
2a201b366d5b black: use multiline exclude definition
Augie Fackler <augie@google.com>
parents: 43223
diff changeset
12 '''
43223
15c05732d177 black: move remaining config knobs into toml file
Augie Fackler <augie@google.com>
parents: 43222
diff changeset
13 skip-string-normalization = true
15c05732d177 black: move remaining config knobs into toml file
Augie Fackler <augie@google.com>
parents: 43222
diff changeset
14 quiet = true