Show More
@@ -621,13 +621,12 b' class revlog(object):' | |||||
621 | indexdata = '' |
|
621 | indexdata = '' | |
622 | self._initempty = True |
|
622 | self._initempty = True | |
623 | try: |
|
623 | try: | |
624 |
|
|
624 | with self._indexfp() as f: | |
625 | if (mmapindexthreshold is not None and |
|
625 | if (mmapindexthreshold is not None and | |
626 | self.opener.fstat(f).st_size >= mmapindexthreshold): |
|
626 | self.opener.fstat(f).st_size >= mmapindexthreshold): | |
627 | indexdata = util.buffer(util.mmapread(f)) |
|
627 | indexdata = util.buffer(util.mmapread(f)) | |
628 | else: |
|
628 | else: | |
629 | indexdata = f.read() |
|
629 | indexdata = f.read() | |
630 | f.close() |
|
|||
631 | if len(indexdata) > 0: |
|
630 | if len(indexdata) > 0: | |
632 | v = versionformat_unpack(indexdata[:4])[0] |
|
631 | v = versionformat_unpack(indexdata[:4])[0] | |
633 | self._initempty = False |
|
632 | self._initempty = False |
General Comments 0
You need to be logged in to leave comments.
Login now