mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
ccc05d0d65
Summary: Also remove debug commands that are strictly related to remote lfs. Reviewed By: markbt Differential Revision: D17184902 fbshipit-source-id: da38a2150212500bab62191ddcfab0990276605e
25 lines
777 B
Python
25 lines
777 B
Python
# blobstore.py - local blob storage for snapshot metadata
|
|
#
|
|
# Copyright 2019 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from edenscm.mercurial import blobstore, vfs as vfsmod
|
|
|
|
|
|
class local(blobstore.localblobstore):
|
|
"""Local blobstore for snapshot metadata contents.
|
|
"""
|
|
|
|
def __init__(self, repo):
|
|
fullpath = repo.svfs.join("snapshots/objects")
|
|
vfs = vfsmod.blobvfs(fullpath)
|
|
cachevfs = None
|
|
usercachepath = repo.ui.config("snapshot", "usercache")
|
|
if usercachepath:
|
|
self.cachevfs = vfsmod.blobvfs(usercachepath)
|
|
super(local, self).__init__(vfs, cachevfs)
|