equal
deleted
inserted
replaced
13 from ..node import ( |
13 from ..node import ( |
14 nullrev, |
14 nullrev, |
15 sha1nodeconstants, |
15 sha1nodeconstants, |
16 ) |
16 ) |
17 from .. import ( |
17 from .. import ( |
|
18 error, |
18 pycompat, |
19 pycompat, |
19 util, |
20 util, |
20 ) |
21 ) |
21 |
22 |
22 from ..revlogutils import nodemap as nodemaputil |
23 from ..revlogutils import nodemap as nodemaputil |
309 |
310 |
310 def entry_binary(self, rev): |
311 def entry_binary(self, rev): |
311 """return the raw binary string representing a revision""" |
312 """return the raw binary string representing a revision""" |
312 entry = self[rev] |
313 entry = self[rev] |
313 p = revlog_constants.INDEX_ENTRY_V2.pack(*entry) |
314 p = revlog_constants.INDEX_ENTRY_V2.pack(*entry) |
314 if rev == 0: |
|
315 p = p[revlog_constants.INDEX_HEADER.size :] |
|
316 return p |
315 return p |
|
316 |
|
317 def pack_header(self, header): |
|
318 """pack header information as binary""" |
|
319 msg = 'version header should go in the docket, not the index: %d' |
|
320 msg %= header |
|
321 raise error.ProgrammingError(msg) |
317 |
322 |
318 |
323 |
319 class IndexObject2(Index2Mixin, IndexObject): |
324 class IndexObject2(Index2Mixin, IndexObject): |
320 pass |
325 pass |
321 |
326 |