sapling/eden/scm/edenscm/hgext/infinitepush
Kostia Balytskyi 30e39de418 edenscm: add a separate path type for infinitepush writes
Summary:
In order to support gradual rollout of infinitepush for other backends (e.g. Mononoke), we need the ability to route read vs write requests separately. To achieve this, we need a separate path type: `infinitepush-write` (kind of like `default-push`, the naming inconsistency is a little unfortunate, as I don't want to use `infinitepush-push`).

The desired behavior of the new path type is as follows:
- takes precedence over `infinitepush` path when the user does `hg push -r . --to scratch/bla`
- replaces `infinitepush` path when the user does `hg push infinitepush -r . --to scratch/bla`
- absence of this path means draft pushes will go to `infinitepush` path
- draft pulls always go to `infinitepush` path, and *there's no fallback to `infinitepush-write`*
- commit cloud always talks to `infinitepush-write`, if it is present (meaning that commit cloud pulls do go to `infinitepush-write` path
  - this is done, as commitcloud uses infinitepush paths to also check whether something is backed up
  - and also, commitcloud may need to pull very soon after something has been pushed

Reviewed By: quark-zju

Differential Revision: D20368158

fbshipit-source-id: 59db174cebbf2b48765dff37bc93aad176c2d7c1
2020-03-12 03:22:12 -07:00
..
__init__.py py3: fix a number of commit cloud tests 2020-02-28 11:32:15 -08:00
bookmarks.py py3: fix a number of commit cloud tests 2020-02-28 11:32:15 -08:00
bundleparts.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00
bundlestore.py py3: fix some infinitepush py3 issues 2020-02-17 14:52:36 -08:00
client.py edenscm: add a separate path type for infinitepush writes 2020-03-12 03:22:12 -07:00
common.py py3: fix some infinitepush py3 issues 2020-02-17 14:52:36 -08:00
constants.py edenscm: add a separate path type for infinitepush writes 2020-03-12 03:22:12 -07:00
fileindex.py py3: fix some infinitepush py3 issues 2020-02-17 14:52:36 -08:00
infinitepushcommands.py py3: get several infinitepush tests passing 2020-02-17 14:52:36 -08:00
README Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
server.py py3: fix some infinitepush py3 issues 2020-02-17 14:52:36 -08:00
sqlindex.py py3: iter{keys,values,items} -> pycompat.iter{keys,values,items} 2020-01-28 16:27:28 -08:00

## 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