annotate tests/test-exchange-C4.t @ 2058:92c2a54f98ee

exchange: split between modern and legacy code We make it clearer what code is old crust and what code is the cutting edge part.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 07 Mar 2017 15:04:58 +0100
parents a49f2e7a2755
children 778afb036245
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3 Initial setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 $ . $TESTDIR/_exc-util.sh
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 === C.4 multiple successors, one is pruned ===
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 .. Another case were prune are confusing? (A is killed without its successors being
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 .. pushed)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. (could split of divergence, if split see the Z section)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. {{{
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 .. A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 .. B ○⇢ø⇠⊗ C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 .. \|/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 .. ● O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 .. }}}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. Marker exist from:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 .. * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 .. * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 .. * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 .. Command run:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 .. * hg push -r O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 .. Expected exchange:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 .. * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 .. * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 .. Expected exclude:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 .. * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 Implemented as the non-split version
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 $ setuprepos C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 creating test repo for test case C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45 - pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 - main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47 - pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 cd into `main` and proceed with env setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 $ cd main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 $ mkcommit A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 $ mkcommit B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 $ mkcommit C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 $ hg prune -qd '0 0' .
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 $ hg log -G --hidden
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 x 7f7f229b13a6 (draft): C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 |
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 | o 35b183996678 (draft): B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 | x f5bc6836db60 (draft): A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 @ a9bdc8b26820 (public): O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 $ hg debugobsolete
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
70 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
71 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
72 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 Actual Test
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 -------------------------------------
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 $ dotest C.4 O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 ## Running testcase C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 # testing echange of "O" (a9bdc8b26820)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 ## initial state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
84 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
85 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
86 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 ## pushing "O" from main to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 pushing to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
92 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
93 remote: 2 new obsolescence markers
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 ## post push state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
96 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
97 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
98 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
99 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
100 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
101 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 ## pulling "a9bdc8b26820" from main into pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 pulling from main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 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
106 2 new obsolescence markers
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 ## post pull state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
109 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
110 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
111 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
113 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
114 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
115 # obstore: pulldest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
116 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
117 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118