annotate tests/test-exchange-B2.t @ 2205:bd5e2496e5cd

subranges: remove the recursivity of the call to isubranges(parentrange) We add some logic to ensure we'll have hot cache for the parent ranges when that matters, the cache is filled from ancestors to descendant to ensure this. The range are still 'created from descendant to ancestors to fill the revsfromrange cache since it important.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 23 Mar 2017 10:44:12 +0100
parents d0bc98161794
children 3b18440cca74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2 Initial setup
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3
2118
d0bc98161794 tests: move exchange utility in testlib
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2083
diff changeset
4 $ . $TESTDIR/testlib/exchange-util.sh
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
6 === B.2 Pruned changeset on head: nothing pushed ===
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8 .. {{{
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 .. ⊗ A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 .. |
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 .. ● O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. }}}
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. Marker exist from:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 .. * A (prune)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 .. Command run:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 .. * hg push -r O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. * hg push
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 .. Expected exchange:
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 .. * prune marker for A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 $ setuprepos B.2
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 creating test repo for test case B.2
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 - pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 - main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 - pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 cd into `main` and proceed with env setup
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 $ cd main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 $ mkcommit A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 $ hg prune -qd '0 0' .
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 $ hg log -G --hidden
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 x f5bc6836db60 (draft): A
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 |
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 @ a9bdc8b26820 (public): O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 $ hg debugobsolete
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
43 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
44 $ hg debugobsrelsethashtree
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
45 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
46 f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
47 $ hg debugstablerange --rev 'head()'
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
48 rev node index size depth obshash
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
49 0 a9bdc8b26820 0 1 1 52a5380bc047
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 $ cd ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 $ cd ..
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ cp -r B.2 B.2.a
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ cp -r B.2 B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
57 Actual Test (explicit push version)
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 -----------------------------------
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 $ dotest B.2.a O
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 ## Running testcase B.2.a
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 # testing echange of "O" (a9bdc8b26820)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 ## initial state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
65 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 ## pushing "O" from main to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 pushing to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
71 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
72 remote: 1 new obsolescence markers
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 ## post push state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
75 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
77 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 ## pulling "a9bdc8b26820" from main into pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 pulling from main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
82 1 new obsolescence markers
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 ## post pull state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
85 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
87 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 # obstore: pulldest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
89 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 Actual Test (bare push version)
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 -----------------------------------
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 $ dotest B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 ## Running testcase B.2.b
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 ## initial state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
98 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 # obstore: pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101 ## pushing from main to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 pushing to pushdest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
104 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
105 remote: 1 new obsolescence markers
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 ## post push state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
108 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
110 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
111 # obstore: pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 ## pulling from main into pulldest
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 pulling from main
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 searching for changes
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
116 1 new obsolescence markers
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 ## post pull state
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
119 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
121 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
838
b4087501d6a5 exchange: add test case for B.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 # obstore: pulldest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
123 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}