mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
6f15ced334
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
21 lines
395 B
Python
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")
|