Mercurial > public > mercurial-scm > hg-stable
changeset 52406:472c30a4df0e
fastannotate: stop using the `pycompat.open()` shim
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 04 Dec 2024 21:13:40 -0500 |
parents | 7688ecd56bbd |
children | bb07b1ca23eb |
files | hgext/fastannotate/context.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fastannotate/context.py Wed Dec 04 21:12:54 2024 -0500 +++ b/hgext/fastannotate/context.py Wed Dec 04 21:13:40 2024 -0500 @@ -12,9 +12,6 @@ import os from mercurial.i18n import _ -from mercurial.pycompat import ( - open, -) from mercurial.node import ( bin, hex, @@ -222,7 +219,7 @@ def linelog(self): if self._linelog is None: if os.path.exists(self.linelogpath): - with open(self.linelogpath, b'rb') as f: + with open(self.linelogpath, 'rb') as f: try: self._linelog = linelogmod.linelog.fromdata(f.read()) except linelogmod.LineLogError: @@ -242,7 +239,7 @@ self._revmap.flush() self._revmap = None if self._linelog is not None: - with open(self.linelogpath, b'wb') as f: + with open(self.linelogpath, 'wb') as f: f.write(self._linelog.encode()) self._linelog = None