Commit Graph

8 Commits

Author SHA1 Message Date
Jun Wu
3884602d28 check-code: enfore checking before using common foreign extensions
Summary:
It's a common mistake that our tests require foreign extensions (namely evolve
and remotenames) without checking them first.

This diff adds checks to catch these mistakes, adds missing checks, and unifies
our checking logic using `require-ext.sh`, which is aware of `hgext3rd` and
prints skip message.

This affects `arc lint` so hopefully our new testing code would be free of this
kind of mistakes.

Test Plan: `arc lint` would catch errors

Reviewers: #mercurial, ttung, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

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

Signature: t1:3550977:1468455857:e849dfd9e3cbc446cc6e6c662050ee88a3366e6c
2016-07-12 20:39:34 +01:00
Laurent Charignon
f47791bbbc fastmanifest: fix setup to work with chg
Summary:
chg runs extsetup and uisetup with dummy ui objects. Before this
patch we were relying on ui objects in extsetup and uisetup. After this
patch, we move the logic to reposetup. We do things a little differently
because reposetup can be called multiple times and extsetup and uisetup are
called only once.

This caused one problem for `hg clone` in the test as reposetup is not
called for clone operation. I adapted the test a little bit to cover this case.

Test Plan: Modified tests pass

Reviewers: mitrandir, quark, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3499176:1467244335:a70d718725c1d19ab6b6feb4558a8ffd1a020ab2
2016-06-29 17:13:41 -07:00
Tony Tung
d24d1c4c86 [fastmanifest] fix incorrect table label
Summary: It's actually most relevant to least relevant.  Add a docblock.

Test Plan: pass unit tests

Reviewers: lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Signature: t1:3478616:1466787566:b38eceddf91c3e88341f9173e07244ac33ab6345
2016-06-24 16:13:39 -07:00
Tony Tung
f8e2cffbae [fastmanifest] get rid of --background
Summary:
Everything will be synchronous within the process.  We will do background work in a separate process.

Depends on D3468827

Test Plan: updated tests to remove the one background task.

Reviewers: durham, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters

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

Tasks: 11683504

Signature: t1:3468828:1466694717:556968a10717c3dd7ce403593cc6a1e97067633f
2016-06-23 13:41:26 -07:00
Laurent Charignon
21923d4d76 fastmanifest: better --list debug output
Summary:
Before this patch, it wasn't clear from hg debugcachemanifest --list
which manifest were older and newer or what rev were actually cached. This
patch improves the output of hg debugcachemanifest --list --debug to show
this information.

Test Plan: add debug output to the test

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3427791
2016-06-17 09:35:39 -07:00
Tony Tung
aa9b784f63 [fastmanifest] record repos that need cache updates, execute once at end
Summary:
Instead of refreshing the cache at the time of the trigger, accumulate the repos we need to refresh, and do so once at the end.

This also allows us to remove the hacky once-per-process gating.

Test Plan: pass most of the existing tests, update the remotenames test.

Reviewers: quark, lcharignon

Reviewed By: lcharignon

Subscribers: mitrandir, mjpieters, #mercurial

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

Tasks: 11475606

Signature: t1:3363061:1464465376:574c694d345b61109dca2c9e0b9fee0d8f742e46
2016-05-29 10:03:39 -07:00
Laurent Charignon
2f1d1d661d fastmanifest: fix non-determinism in remotenames test
Summary:
Before this patch, we were caching in the background in remotenames
test. This could result in a race condition making the test non deterministic.

Test Plan: Test changed

Reviewers: ttung

Differential Revision: https://phabricator.intern.facebook.com/D3353406
2016-05-26 11:39:31 -07:00
Laurent Charignon
ef5d7b06e3 fastmanifest: improve remotenames handling
Summary:
Before this patch, we didn't test that caching could be triggered by
remotename changes. When I tried testing it, I noticed that it wasn't working
because manifest for revisions with remotenames were not cached. I added
remote/master as a revision to cache to the fastmanifesttocache revset and
included a test.

Test Plan: Added a new test

Reviewers: simonfar, quark, ttung, durham

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3335931
2016-05-26 10:12:53 -07:00