mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
2faa6709ca
Summary: Previously we saved bookmark hash and revision number as state of the last backup. Storing last backed up revision is error-prone. I saw a few corrupted backups where bookmarks pointed to non-backed up nodes. Also this approach puts more pressure on mysql bundle index. On every backup it first deletes all existing backup bookmarks and then it writes new bookmarks. Even if user changed one head or one bookmark (and that is the usual case) current approach still deletes bookmarks first and then rewrites them. Instead let's store all backed up heads and bookmarks locally in json format. Json was chosen because it's simple and human-readable. Then during backup let's compare last backed up state to the current state of the repo, and send to the server only the difference. Test Plan: arc unit Reviewers: #mercurial, durham Reviewed By: durham Subscribers: durham, mjpieters, #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D4700930 Tasks: 15389402 Signature: t1:4700930:1489613249:a34369bf53e0718c22258304493dfa27b578857f |
||
---|---|---|
.. | ||
integrationtests | ||
tests | ||
__init__.py | ||
backupcommands.py | ||
bundleparts.py | ||
common.py | ||
fileindexapi.py | ||
indexapi.py | ||
README | ||
sqlindexapi.py | ||
store.py |
## What is it? This extension adds ability to save certain pushes to a remote blob store as bundles and to serve commits from remote blob store. The revisions are stored on disk or in everstore. The metadata are stored in sql or on disk. ## Config options infinitepush.branchpattern: pattern to detect a scratchbranch, example 're:scratch/.+' infinitepush.indextype: disk or sql for the metadata infinitepush.reponame: only relevant for sql metadata backend, reponame to put in sql infinitepush.indexpath: only relevant for ondisk metadata backend, the path to store the index on disk. If not set will be under .hg in a folder named filebundlestore infinitepush.storepath: only relevant for ondisk metadata backend, the path to store the bundles. If not set, it will be .hg/filebundlestore