annotate tests/test-exchange-B6.t @ 905:b177fde040dd

exchange: use fixed order for obstore content The obsstore content seems unstable from one version of python to another (we most certainly use some dict) we fix the order once and for all.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 22 Apr 2014 17:00:24 -0700
parents 9b9bb01b9286
children 010c7e4aa820
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 Initial setup
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 $ . $TESTDIR/_exc-util.sh
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 == B.6 Pruned changeset with ancestors not in pushed set ===
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 .. {{{
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. B ø⇠⊗ B'
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 .. | |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. A ○ |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 .. |/
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 .. ● O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 .. }}}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 .. Marker exist from:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. * `Bø⇠⊗ B'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 .. * B' prune
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 .. Command run:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26 .. * hg push -r O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 .. Expected exchange:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 .. * `Bø⇠⊗ B'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 .. * B' prune
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 $ setuprepos B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 creating test repo for test case B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 - pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 - main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 - pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 cd into `main` and proceed with env setup
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 $ cd main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 $ mkcommit A
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 $ mkcommit B0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 $ hg up --quiet 0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 $ mkcommit B1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 created new head
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45 $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 $ hg prune -qd '0 0' .
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47 $ hg log -G --hidden
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 x f6298a8ac3a4 (draft): B1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 | x 962ecf6b1afc (draft): B0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 | |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 | o f5bc6836db60 (draft): A
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 |/
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 @ a9bdc8b26820 (public): O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 $ hg debugobsolete
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 $ cd ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 $ cd ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 Actual Test
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 -------------------------------------
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 $ dotest B.6 O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 ## Running testcase B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 # testing echange of "O" (a9bdc8b26820)
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 ## initial state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 # obstore: main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 # obstore: pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 # obstore: pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 ## pushing "O" from main to pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 pushing to pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 searching for changes
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 no changes found
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 OBSEXC: computing relevant nodes
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 OBSEXC: computing markers relevant to 1 nodes
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 OBSEXC: encoding 2 markers
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 OBSEXC: sending 1 pushkey payload (188 bytes)
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 OBSEXC: DONE
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 ## post push state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 # obstore: main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 # obstore: pushdest
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 842
diff changeset
88 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 # obstore: pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 ## pulling "a9bdc8b26820" from main into pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 pulling from main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 no changes found
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 OBSEXC: pull obsolescence markers
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 OBSEXC: merging obsolescence markers (150 bytes)
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 OBSEXC: 2 markers added
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 OBSEXC: DONE
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 ## post pull state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 # obstore: main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 # obstore: pushdest
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 842
diff changeset
103 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 # obstore: pulldest
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 842
diff changeset
106 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108