Show More
@@ -44,6 +44,7 b' from .revlogutils.constants import (' | |||
|
44 | 44 | INDEX_ENTRY_V0, |
|
45 | 45 | INDEX_ENTRY_V1, |
|
46 | 46 | INDEX_ENTRY_V2, |
|
47 | INDEX_HEADER, | |
|
47 | 48 | REVLOGV0, |
|
48 | 49 | REVLOGV1, |
|
49 | 50 | REVLOGV1_FLAGS, |
@@ -327,10 +328,6 b' class revlogoldio(object):' | |||
|
327 | 328 | return INDEX_ENTRY_V0.pack(*e2) |
|
328 | 329 | |
|
329 | 330 | |
|
330 | versionformat = struct.Struct(b">I") | |
|
331 | versionformat_pack = versionformat.pack | |
|
332 | versionformat_unpack = versionformat.unpack | |
|
333 | ||
|
334 | 331 | # corresponds to uncompressed length of indexformatng (2 gigs, 4-byte |
|
335 | 332 | # signed integer) |
|
336 | 333 | _maxentrysize = 0x7FFFFFFF |
@@ -348,7 +345,7 b' class revlogio(object):' | |||
|
348 | 345 | def packentry(self, entry, node, version, rev): |
|
349 | 346 | p = INDEX_ENTRY_V1.pack(*entry) |
|
350 | 347 | if rev == 0: |
|
351 |
p = |
|
|
348 | p = INDEX_HEADER.pack(version) + p[4:] | |
|
352 | 349 | return p |
|
353 | 350 | |
|
354 | 351 | |
@@ -363,7 +360,7 b' class revlogv2io(object):' | |||
|
363 | 360 | def packentry(self, entry, node, version, rev): |
|
364 | 361 | p = INDEX_ENTRY_V2.pack(*entry) |
|
365 | 362 | if rev == 0: |
|
366 |
p = |
|
|
363 | p = INDEX_HEADER.pack(version) + p[4:] | |
|
367 | 364 | return p |
|
368 | 365 | |
|
369 | 366 | |
@@ -579,7 +576,7 b' class revlog(object):' | |||
|
579 | 576 | else: |
|
580 | 577 | indexdata = f.read() |
|
581 | 578 | if len(indexdata) > 0: |
|
582 |
versionflags = |
|
|
579 | versionflags = INDEX_HEADER.unpack(indexdata[:4])[0] | |
|
583 | 580 | self._initempty = False |
|
584 | 581 | else: |
|
585 | 582 | versionflags = newversionflags |
General Comments 0
You need to be logged in to leave comments.
Login now