annotate tests/test-exchange-C4.t @ 1060:f6e0cfca1bf0 stable

test: work around a bug in debugobsolete The defautl date was wrong all along. So we use a fixed date for all tests.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 15 Aug 2014 16:54:32 -0700
parents 640f3280559e
children f355bbc124fc
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
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
70 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '0 0', 'user': 'test'}
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
71 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
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
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
84 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
85 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '0 0', 'user': 'test'}
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
86 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', '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
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 OBSEXC: computing relevant nodes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 OBSEXC: computing markers relevant to 1 nodes
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
95 OBSEXC: pushing 2 obsolescence markers (153 bytes)
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 ## post push state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
99 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
100 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '0 0', 'user': 'test'}
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
101 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
102 # obstore: pushdest
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
103 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
104 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 ## 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
107 pulling from main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
109 OBSEXC: pull obsolescence markers
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
110 OBSEXC: merging obsolescence markers (153 bytes)
1040
640f3280559e evolve: add "obsolescence" in front of marked in the previous message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
111 OBSEXC: 2 obsolescence markers added
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 ## post pull state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
115 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
116 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '0 0', 'user': 'test'}
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
117 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
119 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
120 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
121 # obstore: pulldest
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
123 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124