Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/pure/parsers.py @ 47262:6bfa6c2c5f15
revlogv2: preserve the compression mode on disk
The value is still the same and still not treated, but now it exists one disk.
Differential Revision: https://phab.mercurial-scm.org/D10648
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 18:41:51 +0200 |
parents | 130c9f7ed914 |
children | 2b69555e4875 |
comparison
equal
deleted
inserted
replaced
47261:4dca422d3907 | 47262:6bfa6c2c5f15 |
---|---|
313 entry = tuple(entry) | 313 entry = tuple(entry) |
314 new = self._pack_entry(entry) | 314 new = self._pack_entry(entry) |
315 self._extra[rev - self._lgt] = new | 315 self._extra[rev - self._lgt] = new |
316 | 316 |
317 def _unpack_entry(self, data): | 317 def _unpack_entry(self, data): |
318 return self.index_format.unpack(data) + ( | 318 return self.index_format.unpack(data) |
319 revlog_constants.COMP_MODE_INLINE, | |
320 ) | |
321 | 319 |
322 def _pack_entry(self, entry): | 320 def _pack_entry(self, entry): |
323 return self.index_format.pack(*entry[:10]) | 321 return self.index_format.pack(*entry[:11]) |
324 | 322 |
325 def entry_binary(self, rev): | 323 def entry_binary(self, rev): |
326 """return the raw binary string representing a revision""" | 324 """return the raw binary string representing a revision""" |
327 entry = self[rev] | 325 entry = self[rev] |
328 return self._pack_entry(entry) | 326 return self._pack_entry(entry) |