mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
8b3bb637b4
Summary: `bundlefile` variable wasn't initialized if `head in nodestobundle` were true. Even worse, the previous version of `bundlefile` were used. That means that in some cases infinitepush sends back a wrong bundle. Adding a unittest is quite tricky because problem shows up only in one rare case. Example: we have a stack of 2 commits A and B and each commit in the stack has a bookmark that points to it. Then `getbundlechunks()` `heads` parameter contains two heads: commit A and commit B in undefined order. If it happens that first element in the list is commit A we'll create a bundle that contains only commit A. And we'll reuse the same bundle when we process commit B. That means that we'll send the same bundle with commit A twice, but no bundles with commit B. I refactored the code to make sure we won't get the same bug in the future. Test Plan: arc unit Reviewers: #mercurial, durham Reviewed By: durham Subscribers: durham, mjpieters, #sourcecontrol Differential Revision: https://phabricator.intern.facebook.com/D4969547 Tasks: 17719083, 15389402 Signature: t1:4969547:1493749313:587f9e4446a3c21b47c081a0fe4cd9e200dab5cd |
||
---|---|---|
.. | ||
__init__.py | ||
backupcommands.py | ||
bundleparts.py | ||
common.py | ||
fileindexapi.py | ||
indexapi.py | ||
README | ||
schema.sql | ||
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