sapling/edenscm/hgext/snapshot/blobstore.py
Aleksei Kulikov ccc05d0d65 snapshot: remove lfs dependency completely
Summary: Also remove debug commands that are strictly related to remote lfs.

Reviewed By: markbt

Differential Revision: D17184902

fbshipit-source-id: da38a2150212500bab62191ddcfab0990276605e
2019-09-06 08:18:35 -07:00

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)