Commit Graph

7 Commits

Author SHA1 Message Date
Jun Wu
090d0eb5b7 tests: update tests output
Upstream 4a405ffd8b20 ("transaction-summary: show the range of new revisions
upon pull/unbundle (BC)", 2017-10-12) has changed the output.
2017-10-17 13:05:18 -07:00
Jun Wu
3d461ae600 check-ext: make checks stricter
Summary:
Enhance check-ext script to be more strict:

 - Only one foreign extension is allowed: `remotenames`
 - Require explicit path for in-repo extensions to avoid wrong extensions
   being tested

This would make the test more predicatable since system extensions
will be less likely to be imported. Explicit path is better than
setting `PYTHONPATH` since `hgext/name.py` could override
`hgext3rd/name.py` regardless of `PYTHONPATH`.

Test Plan: arc unit

Reviewers: phillco, durham, ikostia, #mercurial, stash

Reviewed By: stash

Subscribers: medson, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5271430

Signature: t1:5271430:1497861776:7dd35ec7c522cd9b26aa0871cb4306b4f1b8993a
2017-06-19 08:02:38 -07:00
Durham Goode
df97f609bf treemanifest: move history sorting responsibility into MutableHistoryPack
Summary:
Previously, the logic that added data to a mutable history pack was required to
add it in the correct order (all entries for a certain file at once, and in
newest-first order). This required the callers to jump through weird hoops if
the data came in out of order or at different times in the transaction.

This patch moves the ordering logic to be inside MutableHistoryPack, so callers
can add the data in any order they wish, and it will get sorted before being
serialized.

This does add memory pressure to things that read a lot of history, like repack.
If this becomes a problem we may want to add a 'historypack.flush()' api that
let's us tell the history pack it's ok to flush it's current contents to disk.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4956096

Signature: t1:4956096:1493264693:a2275a49e35565d4b11244e3e5dd82c25de7e16e
2017-04-27 10:44:34 -07:00
Durham Goode
8da9d7b37f treemanifest: automatically download missing trees on demand
Summary:
This adds a remote tree datastore to the store, so if we don't have a tree on
local disk, we can reach out to the server for it.

This also makes a small change to fastmanifest to use get() instead of
getmissing() to test if the tree is available. getmissing() would indicate the
tree is missing if it wasn't local, while get() will attempt to fetch it from
the server.

Test Plan: Added a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4864645

Signature: t1:4864645:1492627823:7afff5db54c895507507e57ab7263f4dbf10b5f7
2017-04-19 21:14:03 -07:00
Durham Goode
0942e94dcc treemanifest: reverse historypack entries
History pack entries need to be in newest-to-oldest order, so let's reverse
them.
2017-03-20 18:58:09 -07:00
Durham Goode
943afede25 treemanifest: add support for creating history packs
Summary:
Previously the treemanifest auto-tree-creation logic only produced data packs
containing the actual contents of the tree blobs. This lost history information
which is important for our ability to efficiently repack the data files.

This patch creates history packs during pull as well. A future patch will also
create history packs for the local tree blob store.

Test Plan: Updated the tests to cover this

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4638865

Signature: t1:4638865:1488449992:48b60961b50b90b6d0e75a64af1f36fb29944e7a
2017-03-07 11:15:25 -08:00
Durham Goode
5f0176753a treemanifeset: fix auto-tree creation for merges
Previously we were relying on mfrevlog.revdiff() to produce the delta for us.
This only showed us what files were added/modified, as compared to p1, and we
had to use a heuristic to know what files were deleted (by looking at the list
of files in the commit metadata). Merge commits have a different criteria for
what is in the commit metadata (it only contains entries where the file is
different from both parents), so we can't use it for the same heuristic. So
let's fall back to a normal manifest diff for merge commits, since they are
rare.

Adds a test for verifying that conversion of merge commits into a tree works.
2016-12-31 18:22:38 -08:00