Show More
@@ -388,13 +388,13 b' class revlog(object):' | |||
|
388 | 388 | |
|
389 | 389 | if 'revlogv2' in opts: |
|
390 | 390 | # version 2 revlogs always use generaldelta. |
|
391 | v = REVLOGV2 | FLAG_GENERALDELTA | FLAG_INLINE_DATA | |
|
391 | versionflags = REVLOGV2 | FLAG_GENERALDELTA | FLAG_INLINE_DATA | |
|
392 | 392 | elif 'revlogv1' in opts: |
|
393 | v = REVLOGV1 | FLAG_INLINE_DATA | |
|
393 | versionflags = REVLOGV1 | FLAG_INLINE_DATA | |
|
394 | 394 | if 'generaldelta' in opts: |
|
395 | v |= FLAG_GENERALDELTA | |
|
395 | versionflags |= FLAG_GENERALDELTA | |
|
396 | 396 | else: |
|
397 | v = REVLOG_DEFAULT_VERSION | |
|
397 | versionflags = REVLOG_DEFAULT_VERSION | |
|
398 | 398 | |
|
399 | 399 | if 'chunkcachesize' in opts: |
|
400 | 400 | self._chunkcachesize = opts['chunkcachesize'] |
@@ -431,9 +431,9 b' class revlog(object):' | |||
|
431 | 431 | raise error.RevlogError(_('revlog chunk cache size %r is not a ' |
|
432 | 432 | 'power of 2') % self._chunkcachesize) |
|
433 | 433 | |
|
434 | self._loadindex(v, mmapindexthreshold) | |
|
435 | ||
|
436 | def _loadindex(self, v, mmapindexthreshold): | |
|
434 | self._loadindex(versionflags, mmapindexthreshold) | |
|
435 | ||
|
436 | def _loadindex(self, versionflags, mmapindexthreshold): | |
|
437 | 437 | indexdata = '' |
|
438 | 438 | self._initempty = True |
|
439 | 439 | try: |
@@ -444,17 +444,17 b' class revlog(object):' | |||
|
444 | 444 | else: |
|
445 | 445 | indexdata = f.read() |
|
446 | 446 | if len(indexdata) > 0: |
|
447 | v = versionformat_unpack(indexdata[:4])[0] | |
|
447 | versionflags = versionformat_unpack(indexdata[:4])[0] | |
|
448 | 448 | self._initempty = False |
|
449 | 449 | except IOError as inst: |
|
450 | 450 | if inst.errno != errno.ENOENT: |
|
451 | 451 | raise |
|
452 | 452 | |
|
453 | self.version = v | |
|
454 | self._inline = v & FLAG_INLINE_DATA | |
|
455 | self._generaldelta = v & FLAG_GENERALDELTA | |
|
456 | flags = v & ~0xFFFF | |
|
457 | fmt = v & 0xFFFF | |
|
453 | self.version = versionflags | |
|
454 | self._inline = versionflags & FLAG_INLINE_DATA | |
|
455 | self._generaldelta = versionflags & FLAG_GENERALDELTA | |
|
456 | flags = versionflags & ~0xFFFF | |
|
457 | fmt = versionflags & 0xFFFF | |
|
458 | 458 | if fmt == REVLOGV0: |
|
459 | 459 | if flags: |
|
460 | 460 | raise error.RevlogError(_('unknown flags (%#04x) in version %d ' |
General Comments 0
You need to be logged in to leave comments.
Login now