( )⚙ D3059 tests: use `hg unbundle` instead of `hg pull` in some tests

This is an archive of the discontinued Mercurial Phabricator instance.

tests: use `hg unbundle` instead of `hg pull` in some tests
ClosedPublic

Authored by indygreg on Apr 3 2018, 9:56 PM.

Details

Summary

hg pull <bundle> uses the special "bundlerepo" repository. The
bundlerepo code makes many assumptions about the storage of
repositories. It will be difficult to teach bundlerepo to use
non-revlog storage before a better storage interface is established.

Many test failures using our "simple store" are related to
bundlerepo: the simple store just isn't compatible with bundlerepo
because of storage assumptions in bundlerepo.

In order to mitigate the impact of bundlerepo on our code base,
this commit changes various tests to use hg unbundle instead
of hg pull. This bypasses the bundlerepo code.

Tests exercising exchange functionality have not been altered, as
they should be using hg pull and going through the bundlerepo
code paths.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Apr 3 2018, 9:56 PM

Quick question before I'm okay with this: do we still have an explicit test of hg pull from a bundle somewhere?

If so, this is strictly an improvement, since pull-from-bundle is slower than straight-unbundle.

Quick question before I'm okay with this: do we still have an explicit test of hg pull from a bundle somewhere?
If so, this is strictly an improvement, since pull-from-bundle is slower than straight-unbundle.

It has to be evaluated on a case-by-case basis. I attempted to only make changes where the test was simply adding revisions to a repo and not testing behavior w.r.t. exchange. That being said, I audited this again and found at least one error. So will submit a follow-up.

indygreg updated this revision to Diff 7633.Apr 4 2018, 2:36 PM

Answered my own question, a couple of callsites are left. :)

durin42 accepted this revision.Apr 4 2018, 2:55 PM
This revision is now accepted and ready to land.Apr 4 2018, 2:55 PM
This revision was automatically updated to reflect the committed changes.