A Scalable, User-Friendly Source Control System.
Go to file
Mark Thomas dbe1d30cf0 treemanifest: include all trees when infinitepush rebundle converts trees
Summary:
If an infinitepush bundle contains flat manifests and is served from a
treemanifest repository, it can potentially fail to send all the needed data to
the client.

Understanding the bug requires two bits of context:
1. When sending commits from a tree server to a tree client, we generally don't
send any trees because they can be fetched by the client ondemand later. The one
exception to this is for infinitepush bundles, where the trees inside the bundle
cannot be served ondemand, and therefore must be served at pull time. To do this
we check if a given manifest node exists in the repositories permanent storage,
and if it doesn't, we assume it came from an infinitepush bundle and serve it
with the pull.
2. When we lookup a manifest and fail to find a tree, our last resort is the
ondemandstore which knows how to convert a flat manifest into a tree manifest.
On the server, this is responsible for converting each of the flat bundle's
manifests into treemanifests before we serve the bundle to the client. As part
of converting the flat manifests into treemanifests, it writes the new tree
data into a pack file.

The bug is then, when serving a stack of commits, if we try to package up the
top tree first (i.e. the most recent tree), we end up converting the entire
stack from flat into trees, which inserts the bottom most trees into the
temporary pack file.  Because they exist in the temporary pack file, when we
later check if they are part of the repositories store we end up finding them,
which causes us to treat them as not-infinitepush-trees which means we don't
serve them to the client.

The fix is to change the infinitepush tree-serving code to not consider the
mutable packs when checking if it should send trees.

Reviewed By: mitrandir77

Differential Revision: D14403925

fbshipit-source-id: 38043dfc49df5ff9ea2fae1d3cac341c4936509c
2019-03-11 05:39:49 -07:00
contrib branchmap: drop revbranchcache and other unused logic 2019-02-22 21:02:41 -08:00
distutils_rust chg: learn to build a static lib 2018-11-05 10:08:29 -08:00
doc gendoc: import extensions properly 2019-01-30 14:57:42 -08:00
edenscm treemanifest: include all trees when infinitepush rebundle converts trees 2019-03-11 05:39:49 -07:00
exec hg: rename scratch to mkscratch and include in the hg build 2019-02-14 17:28:14 -08:00
i18n codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
lib config: stop %include from scaning directories 2019-03-08 16:57:06 -08:00
newdoc codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
slides slides: add indexedlog slide 2018-08-13 15:06:58 -07:00
tests treemanifest: include all trees when infinitepush rebundle converts trees 2019-03-11 05:39:49 -07:00
.editorconfig move scm/hg/.clang-format to scm/hg/mercurial/ 2018-05-25 14:35:51 -07:00
.flake8 codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
.gitignore ignore: stop using "{}" patterns 2019-02-06 13:02:59 -08:00
.hgsigs Added signature for changeset f51ae48a3fd9 2017-12-01 13:49:47 -06:00
.jshintrc hgweb: add .jshintrc with some basic rules 2017-11-22 22:18:06 +08:00
CONTRIBUTING contributing: add new file with a pointer to the wiki 2016-10-08 10:39:00 -04:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
gen_version.py generate __version__.py during the buck build 2018-06-25 15:52:25 -07:00
hg codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
Makefile Makefile: fix "make clean" 2019-02-13 13:57:07 -08:00
README.rst doc: rename README to README.rst 2017-09-26 08:37:17 +02:00
setup.py lfs: merge hg lfs-pointers into fbcode lfs-pointers 2019-03-08 12:25:59 -08:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.