equal
deleted
inserted
replaced
1 from __future__ import absolute_import |
1 from __future__ import absolute_import |
2 |
2 |
3 import struct |
3 import struct |
4 import zlib |
4 import zlib |
5 |
5 |
6 from mercurial.node import hex, nullid |
6 from mercurial.node import ( |
|
7 hex, |
|
8 sha1nodeconstants, |
|
9 ) |
7 from mercurial.i18n import _ |
10 from mercurial.i18n import _ |
8 from mercurial import ( |
11 from mercurial import ( |
9 pycompat, |
12 pycompat, |
10 util, |
13 util, |
11 ) |
14 ) |
456 ) |
459 ) |
457 |
460 |
458 rawindex = b'' |
461 rawindex = b'' |
459 fmt = self.INDEXFORMAT |
462 fmt = self.INDEXFORMAT |
460 for node, deltabase, offset, size in entries: |
463 for node, deltabase, offset, size in entries: |
461 if deltabase == nullid: |
464 if deltabase == sha1nodeconstants.nullid: |
462 deltabaselocation = FULLTEXTINDEXMARK |
465 deltabaselocation = FULLTEXTINDEXMARK |
463 else: |
466 else: |
464 # Instead of storing the deltabase node in the index, let's |
467 # Instead of storing the deltabase node in the index, let's |
465 # store a pointer directly to the index entry for the deltabase. |
468 # store a pointer directly to the index entry for the deltabase. |
466 deltabaselocation = nodelocations.get( |
469 deltabaselocation = nodelocations.get( |