mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
memcache: add an option to use the indexedlog instead of packfile
Summary: When the option is set, the gets will be stored in the indexed log instead of in a packfile. With the Python code now able to read from it, this will allow us to get more real world testing. Reviewed By: quark-zju Differential Revision: D14895509 fbshipit-source-id: d73d49a028f7af199b7a0873551d7b18b047e50c
This commit is contained in:
parent
0b0f262d0f
commit
8e078ed66b
@ -765,14 +765,20 @@ class fileserverclient(object):
|
||||
|
||||
def connect(self):
|
||||
if self.cacheprocess:
|
||||
options = ""
|
||||
if self.ui.configbool("remotefilelog", "fetchpacks"):
|
||||
cachepath = shallowutil.getcachepackpath(
|
||||
self.repo, constants.FILEPACK_CATEGORY
|
||||
)
|
||||
|
||||
if self.ui.configbool("remotefilelog", "indexedlogdatastore"):
|
||||
path = shallowutil.getexperimentalcachepath(self.repo)
|
||||
path = os.path.join(path, "indexedlogdatastore")
|
||||
options += "--indexedlog_dir %s" % path
|
||||
else:
|
||||
cachepath = shallowutil.getcachepath(self.ui)
|
||||
|
||||
cmd = "%s %s" % (self.cacheprocess, cachepath)
|
||||
cmd = " ".join([self.cacheprocess, cachepath, options])
|
||||
self.remotecache.connect(cmd)
|
||||
else:
|
||||
# If no cache process is specified, we fake one that always
|
||||
|
Loading…
Reference in New Issue
Block a user