changelog: change the implementation of `_divertopener`
During a transaction, new data to the changelog index are "diverted". The
previous implementat ways pretty basic, we need something better to be able to
use the changelog vfs fully during transaction. (eg: accessing the vfs options).
Differential Revision: https://phab.mercurial-scm.org/D8185
[tool.black]
line-length = 80
exclude = '''
build/
| wheelhouse/
| dist/
| packages/
| \.hg/
| \.mypy_cache/
| \.venv/
| mercurial/thirdparty/
'''
skip-string-normalization = true
quiet = true