##// END OF EJS Templates
remotefilelog: stop using the `pycompat.open()` shim
Matt Harbison -
r53268:035375d6 default
parent child Browse files
Show More
@@ -8,9 +8,6 import struct
8 import time
8 import time
9
9
10 from mercurial.i18n import _
10 from mercurial.i18n import _
11 from mercurial.pycompat import (
12 open,
13 )
14 from mercurial.node import hex
11 from mercurial.node import hex
15 from mercurial import (
12 from mercurial import (
16 policy,
13 policy,
@@ -334,12 +331,12 class basepack(versionmixin):
334 self._data.close()
331 self._data.close()
335
332
336 # TODO: use an opener/vfs to access these paths
333 # TODO: use an opener/vfs to access these paths
337 with open(self.indexpath, b'rb') as indexfp:
334 with open(self.indexpath, 'rb') as indexfp:
338 # memory-map the file, size 0 means whole file
335 # memory-map the file, size 0 means whole file
339 self._index = mmap.mmap(
336 self._index = mmap.mmap(
340 indexfp.fileno(), 0, access=mmap.ACCESS_READ
337 indexfp.fileno(), 0, access=mmap.ACCESS_READ
341 )
338 )
342 with open(self.packpath, b'rb') as datafp:
339 with open(self.packpath, 'rb') as datafp:
343 self._data = mmap.mmap(datafp.fileno(), 0, access=mmap.ACCESS_READ)
340 self._data = mmap.mmap(datafp.fileno(), 0, access=mmap.ACCESS_READ)
344
341
345 self._pagedin = 0
342 self._pagedin = 0
General Comments 0
You need to be logged in to leave comments. Login now