mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
fe980ff373
Summary: Moves the remotefilelog extension into hgext/ and it's tests into tests/. I did not fix up all the check-module errors, since it's a ton of work for very little impact at this point. Test Plan: make local && ./run-tests.py Reviewers: #mercurial Differential Revision: https://phabricator.intern.facebook.com/D6680030
37 lines
839 B
Python
37 lines
839 B
Python
from __future__ import absolute_import
|
|
from mercurial.i18n import _
|
|
|
|
import struct
|
|
|
|
REQUIREMENT = "remotefilelog"
|
|
|
|
FILENAMESTRUCT = '!H'
|
|
FILENAMESIZE = struct.calcsize(FILENAMESTRUCT)
|
|
|
|
NODESIZE = 20
|
|
PACKREQUESTCOUNTSTRUCT = '!I'
|
|
|
|
NODECOUNTSTRUCT = '!I'
|
|
NODECOUNTSIZE = struct.calcsize(NODECOUNTSTRUCT)
|
|
|
|
PATHCOUNTSTRUCT = '!I'
|
|
PATHCOUNTSIZE = struct.calcsize(PATHCOUNTSTRUCT)
|
|
|
|
FILEPACK_CATEGORY=""
|
|
TREEPACK_CATEGORY="manifests"
|
|
|
|
ALL_CATEGORIES = [FILEPACK_CATEGORY, TREEPACK_CATEGORY]
|
|
|
|
# revision metadata keys. must be a single character.
|
|
METAKEYFLAG = 'f' # revlog flag
|
|
METAKEYSIZE = 's' # full rawtext size
|
|
|
|
def getunits(category):
|
|
if category == FILEPACK_CATEGORY:
|
|
return _("files")
|
|
if category == TREEPACK_CATEGORY:
|
|
return _("trees")
|
|
|
|
# Repack options passed to ``markledger``.
|
|
OPTION_PACKSONLY = 'packsonly'
|