Show More
@@ -385,15 +385,15 b' class revlog(object):' | |||||
385 | opts = self.opener.options |
|
385 | opts = self.opener.options | |
386 |
|
386 | |||
387 | if b'revlogv2' in opts: |
|
387 | if b'revlogv2' in opts: | |
388 |
new |
|
388 | new_header = REVLOGV2 | FLAG_INLINE_DATA | |
389 | elif b'revlogv1' in opts: |
|
389 | elif b'revlogv1' in opts: | |
390 |
new |
|
390 | new_header = REVLOGV1 | FLAG_INLINE_DATA | |
391 | if b'generaldelta' in opts: |
|
391 | if b'generaldelta' in opts: | |
392 |
new |
|
392 | new_header |= FLAG_GENERALDELTA | |
393 | elif b'revlogv0' in self.opener.options: |
|
393 | elif b'revlogv0' in self.opener.options: | |
394 |
new |
|
394 | new_header = REVLOGV0 | |
395 | else: |
|
395 | else: | |
396 |
new |
|
396 | new_header = REVLOG_DEFAULT_VERSION | |
397 |
|
397 | |||
398 | if b'chunkcachesize' in opts: |
|
398 | if b'chunkcachesize' in opts: | |
399 | self._chunkcachesize = opts[b'chunkcachesize'] |
|
399 | self._chunkcachesize = opts[b'chunkcachesize'] | |
@@ -444,7 +444,7 b' class revlog(object):' | |||||
444 | % self._chunkcachesize |
|
444 | % self._chunkcachesize | |
445 | ) |
|
445 | ) | |
446 | force_nodemap = opts.get(b'devel-force-nodemap', False) |
|
446 | force_nodemap = opts.get(b'devel-force-nodemap', False) | |
447 |
return new |
|
447 | return new_header, mmapindexthreshold, force_nodemap | |
448 |
|
448 | |||
449 | def _get_data(self, filepath, mmap_threshold): |
|
449 | def _get_data(self, filepath, mmap_threshold): | |
450 | """return a file content with or without mmap |
|
450 | """return a file content with or without mmap | |
@@ -466,7 +466,7 b' class revlog(object):' | |||||
466 |
|
466 | |||
467 | def _loadindex(self): |
|
467 | def _loadindex(self): | |
468 |
|
468 | |||
469 |
new |
|
469 | new_header, mmapindexthreshold, force_nodemap = self._init_opts() | |
470 |
|
470 | |||
471 | if self.postfix is None: |
|
471 | if self.postfix is None: | |
472 | index_file = b'%s.i' % self.radix |
|
472 | index_file = b'%s.i' % self.radix | |
@@ -488,7 +488,7 b' class revlog(object):' | |||||
488 | header = INDEX_HEADER.unpack(indexdata[:4])[0] |
|
488 | header = INDEX_HEADER.unpack(indexdata[:4])[0] | |
489 | self._initempty = False |
|
489 | self._initempty = False | |
490 | else: |
|
490 | else: | |
491 |
header = new |
|
491 | header = new_header | |
492 |
|
492 | |||
493 | flags = self._format_flags = header & ~0xFFFF |
|
493 | flags = self._format_flags = header & ~0xFFFF | |
494 | fmt = self._format_version = header & 0xFFFF |
|
494 | fmt = self._format_version = header & 0xFFFF |
General Comments 0
You need to be logged in to leave comments.
Login now