sapling/remotefilelog/constants.py
Durham Goode 6f15ced334 remotefilelog: repack tree manifests
Summary:
Previously hg repack would only repack file content pack files. This patch makes
it also repack tree manifest pack files.

Test Plan:
Ran pull repack in a repo and verified the manifest packs were
repacked. I'll add some tests around this at some point.

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D4240723
2016-11-29 16:00:39 -08:00

21 lines
395 B
Python

from mercurial.i18n import _
import struct
REQUIREMENT = "remotefilelog"
FILENAMESTRUCT = '!H'
FILENAMESIZE = struct.calcsize(FILENAMESTRUCT)
NODESIZE = 20
PACKREQUESTCOUNTSTRUCT = '!I'
FILEPACK_CATEGORY=""
TREEPACK_CATEGORY="manifests"
def getunits(category):
if category == FILEPACK_CATEGORY:
return _("files")
if category == TREEPACK_CATEGORY:
return _("trees")