comparison tests/test-clone.t @ 37338:cbc4425e81b5

tests: conditionalize tests based on presence of revlogs for files ~85 tests don't like our non-revlog file store for various reasons. This commit introduces hghave functionality for declaring and querying repository features. By default, we assume repositories have revlog-based file storage. But if the HGREPOFEATURES environment variable is set, we can override the default set of repository features. If you run the test harness with our simplestorerepo extension and an environment variable set to the proper value, you can override the hghave defaults to agree with simplestorerepo's version of reality. Various tests have been modified so behavior dependent on revlog-based file storage is marked as such. This fixes a handful of test failures with our custom file storage extension. But dozens remain. The point of this commit is to demonstrate how tests will need to be modified to account for custom storage implementations. TBH, I'm not convinced hghave is the proper layer for repository feature detection. I /think/ we'll eventually want something in run-tests.py itself. But that would require inventing a new primitive in the test harness. This is all very alpha at the moment. So I think hghave is an acceptable place to hang this feature detection. I think the right time to be thinking about integrating this into run-tests.py is *after* we have a stable alternate storage implementation in core. For now, let's try to make progress towards the idea of an alternate storage backend. Differential Revision: https://phab.mercurial-scm.org/D3030
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 03 Apr 2018 18:15:24 -0700
parents 1ee1a42bfdae
children e82a59bfc5e8
comparison
equal deleted inserted replaced
37337:d257c5f2a940 37338:cbc4425e81b5
26 > hg commit -m test 26 > hg commit -m test
27 > done 27 > done
28 28
29 List files in store/data (should show a 'b.d'): 29 List files in store/data (should show a 'b.d'):
30 30
31 #if reporevlogstore
31 $ for i in .hg/store/data/*; do 32 $ for i in .hg/store/data/*; do
32 > echo $i 33 > echo $i
33 > done 34 > done
34 .hg/store/data/a.i 35 .hg/store/data/a.i
35 .hg/store/data/b.d 36 .hg/store/data/b.d
36 .hg/store/data/b.i 37 .hg/store/data/b.i
38 #endif
37 39
38 Trigger branchcache creation: 40 Trigger branchcache creation:
39 41
40 $ hg branches 42 $ hg branches
41 default 10:a7949464abda 43 default 10:a7949464abda