sapling/edenscm/hgext
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
..
absorb codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
amend visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
commitcloud visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
convert convert: drop cvs support 2019-02-22 21:02:41 -08:00
extlib revisionstore: add a Store trait 2019-02-19 12:18:27 -08:00
fastannotate codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fastmanifest codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fsmonitor fsmonitor: use correct length for number of files changed 2019-02-18 10:03:12 -08:00
hgevents codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
hggit push: remove newbranch option 2019-02-25 17:51:10 -08:00
hgsubversion push: remove newbranch option 2019-02-25 17:51:10 -08:00
highlight codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
infinitepush infinitepush: don't include nullid in bundle roots 2019-03-11 04:25:20 -07:00
lfs hg: fix lfs and journal extension postshare wrapping 2019-02-07 18:58:40 -08:00
memcommit memcommit: reformat help text 2019-03-08 20:15:24 -08:00
p4fastimport codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
perfsuite doc: fix rst format 2019-01-30 14:57:42 -08:00
pushrebase visibility: add pushrebase support 2019-03-08 03:05:58 -08:00
remotefilelog treemanifest: include all trees when infinitepush rebundle converts trees 2019-03-11 05:39:49 -07:00
repogenerator codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
treemanifest treemanifest: include all trees when infinitepush rebundle converts trees 2019-03-11 05:39:49 -07:00
__init__.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
arcdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
automv.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
blackbox.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
catnotate.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
checkmessagehook.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
chistedit.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
churn.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
cleanobsstore.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
clienttelemetry.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
clindex.pyx codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
clonebundles.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
commitextras.py test-revset: do not use "hg branch" directly 2019-02-14 17:44:39 -08:00
conflictinfo.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
copytrace.py copytrace: fix an issue where undesirable entries are reported 2019-02-25 12:43:20 -08:00
crdump.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
debugcommitmessage.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
debugshell.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
dialect.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
directaccess.py branchmap: drop revbranchcache and other unused logic 2019-02-22 21:02:41 -08:00
dirsync.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
disablesymlinks.py disablesymlinks: add extension to disable symlinks 2019-02-06 08:41:34 -08:00
drop.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
edrecord.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
eol.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
errorredirect.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
extdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
extorder.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
extutil.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fastlog.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fbconduit.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fbhistedit.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fixcorrupt.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
generic_bisect.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
githelp.py improve githelp for 'rebase -i' 2019-03-07 13:11:28 -08:00
gitlookup.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
gitrevset.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
globalrevs.py globalrevs: fix formatting for 'hg help globalrevs' 2019-03-05 16:48:14 -08:00
gpg.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
grepdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
grpcheck.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
hgsql.py hgsql: execute memcommit with the hgsql lock 2019-02-26 13:16:35 -08:00
hiddenerror.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
histedit.py histedit: use mutation information for adjusting replacements 2019-03-08 03:05:57 -08:00
infinitepushbackup.py infinitepush - better handling changes of the path 2019-03-07 11:01:30 -08:00
interactiveui.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
journal.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
linkrevcache.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
logginghelper.py logginghelper: log normalized repo name 2019-03-04 00:05:00 -08:00
lz4revlog.py rust: move bindings to a single python extension 2019-02-01 17:53:22 -08:00
mergedriver.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
morecolors.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
morestatus.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
myparent.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
nointerrupt.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
ownercheck.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
patchrmdir.pyx codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
phabdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
phabstatus.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
phrevset.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
progressfile.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
pullcreatemarkers.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
purge.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
rage.py rage: add edenfs rage to hg rage 2019-03-08 06:02:22 -08:00
rebase.py visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
remotenames.py mutation: implement successorssets and foreground 2019-03-08 03:05:56 -08:00
reset.py visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
sampling.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
schemes.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
sendunbundlereplay.py pushrebase: support deletion of a bookmark in sendunbundlereplay 2019-02-25 13:08:00 -08:00
share.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
shelve.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
sigtrace.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
simplecache.py simplecache: add checksum to simplecache values 2019-02-20 13:56:33 -08:00
smartlog.py visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
sparse.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
sshaskpass.py sshaskpass: workaround sys.executable 2019-02-26 18:19:43 -08:00
stablerev.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
stat.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
traceprof.pyx codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
tweakdefaults.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
undo.py visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
whereami.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
win32mbcs.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
win32text.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00