##// END OF EJS Templates
tests: update test-requires to pass our import checker
Augie Fackler -
r33987:68bc85f4 default
parent child Browse files
Show More
@@ -1,72 +1,73 b''
1 $ hg init t
1 $ hg init t
2 $ cd t
2 $ cd t
3 $ echo a > a
3 $ echo a > a
4 $ hg add a
4 $ hg add a
5 $ hg commit -m test
5 $ hg commit -m test
6 $ rm .hg/requires
6 $ rm .hg/requires
7 $ hg tip
7 $ hg tip
8 abort: unknown version (2) in revlog 00changelog.i!
8 abort: unknown version (2) in revlog 00changelog.i!
9 [255]
9 [255]
10 $ echo indoor-pool > .hg/requires
10 $ echo indoor-pool > .hg/requires
11 $ hg tip
11 $ hg tip
12 abort: repository requires features unknown to this Mercurial: indoor-pool!
12 abort: repository requires features unknown to this Mercurial: indoor-pool!
13 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
13 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
14 [255]
14 [255]
15 $ echo outdoor-pool >> .hg/requires
15 $ echo outdoor-pool >> .hg/requires
16 $ hg tip
16 $ hg tip
17 abort: repository requires features unknown to this Mercurial: indoor-pool outdoor-pool!
17 abort: repository requires features unknown to this Mercurial: indoor-pool outdoor-pool!
18 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
18 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
19 [255]
19 [255]
20 $ cd ..
20 $ cd ..
21
21
22 Test checking between features supported locally and ones required in
22 Test checking between features supported locally and ones required in
23 another repository of push/pull/clone on localhost:
23 another repository of push/pull/clone on localhost:
24
24
25 $ mkdir supported-locally
25 $ mkdir supported-locally
26 $ cd supported-locally
26 $ cd supported-locally
27
27
28 $ hg init supported
28 $ hg init supported
29 $ echo a > supported/a
29 $ echo a > supported/a
30 $ hg -R supported commit -Am '#0 at supported'
30 $ hg -R supported commit -Am '#0 at supported'
31 adding a
31 adding a
32
32
33 $ echo 'featuresetup-test' >> supported/.hg/requires
33 $ echo 'featuresetup-test' >> supported/.hg/requires
34 $ cat > $TESTTMP/supported-locally/supportlocally.py <<EOF
34 $ cat > $TESTTMP/supported-locally/supportlocally.py <<EOF
35 > from mercurial import localrepo, extensions
35 > from __future__ import absolute_import
36 > from mercurial import extensions, localrepo
36 > def featuresetup(ui, supported):
37 > def featuresetup(ui, supported):
37 > for name, module in extensions.extensions(ui):
38 > for name, module in extensions.extensions(ui):
38 > if __name__ == module.__name__:
39 > if __name__ == module.__name__:
39 > # support specific feature locally
40 > # support specific feature locally
40 > supported |= {'featuresetup-test'}
41 > supported |= {'featuresetup-test'}
41 > return
42 > return
42 > def uisetup(ui):
43 > def uisetup(ui):
43 > localrepo.localrepository.featuresetupfuncs.add(featuresetup)
44 > localrepo.localrepository.featuresetupfuncs.add(featuresetup)
44 > EOF
45 > EOF
45 $ cat > supported/.hg/hgrc <<EOF
46 $ cat > supported/.hg/hgrc <<EOF
46 > [extensions]
47 > [extensions]
47 > # enable extension locally
48 > # enable extension locally
48 > supportlocally = $TESTTMP/supported-locally/supportlocally.py
49 > supportlocally = $TESTTMP/supported-locally/supportlocally.py
49 > EOF
50 > EOF
50 $ hg -R supported status
51 $ hg -R supported status
51
52
52 $ hg init push-dst
53 $ hg init push-dst
53 $ hg -R supported push push-dst
54 $ hg -R supported push push-dst
54 pushing to push-dst
55 pushing to push-dst
55 abort: required features are not supported in the destination: featuresetup-test
56 abort: required features are not supported in the destination: featuresetup-test
56 [255]
57 [255]
57
58
58 $ hg init pull-src
59 $ hg init pull-src
59 $ hg -R pull-src pull supported
60 $ hg -R pull-src pull supported
60 pulling from supported
61 pulling from supported
61 abort: required features are not supported in the destination: featuresetup-test
62 abort: required features are not supported in the destination: featuresetup-test
62 [255]
63 [255]
63
64
64 $ hg clone supported clone-dst
65 $ hg clone supported clone-dst
65 abort: repository requires features unknown to this Mercurial: featuresetup-test!
66 abort: repository requires features unknown to this Mercurial: featuresetup-test!
66 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
67 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
67 [255]
68 [255]
68 $ hg clone --pull supported clone-dst
69 $ hg clone --pull supported clone-dst
69 abort: required features are not supported in the destination: featuresetup-test
70 abort: required features are not supported in the destination: featuresetup-test
70 [255]
71 [255]
71
72
72 $ cd ..
73 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now