##// END OF EJS Templates
fastannotate: stop using the `pycompat.open()` shim
Matt Harbison -
r53271:472c30a4 default
parent child Browse files
Show More
@@ -12,9 +12,6 import contextlib
12 12 import os
13 13
14 14 from mercurial.i18n import _
15 from mercurial.pycompat import (
16 open,
17 )
18 15 from mercurial.node import (
19 16 bin,
20 17 hex,
@@ -222,7 +219,7 class _annotatecontext:
222 219 def linelog(self):
223 220 if self._linelog is None:
224 221 if os.path.exists(self.linelogpath):
225 with open(self.linelogpath, b'rb') as f:
222 with open(self.linelogpath, 'rb') as f:
226 223 try:
227 224 self._linelog = linelogmod.linelog.fromdata(f.read())
228 225 except linelogmod.LineLogError:
@@ -242,7 +239,7 class _annotatecontext:
242 239 self._revmap.flush()
243 240 self._revmap = None
244 241 if self._linelog is not None:
245 with open(self.linelogpath, b'wb') as f:
242 with open(self.linelogpath, 'wb') as f:
246 243 f.write(self._linelog.encode())
247 244 self._linelog = None
248 245
General Comments 0
You need to be logged in to leave comments. Login now