annotate tests/test-exchange-D2.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 cddac452fa40
children 010c7e4aa820
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
849
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3 Initial setup
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5 $ . $TESTDIR/_exc-util.sh
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7 === D.2 missing prune target (prune in "pushed set") ===
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 {{{
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10 }}}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 Marker exist from:
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 * A' succeed to A
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 * A' (prune)
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 Command run:
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 * hg push
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 Expected exchange:
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 * `A ø⇠o A'`
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 * A' (prune)
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 $ setuprepos D.2
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 creating test repo for test case D.2
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29 - pulldest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30 - main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 - pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32 cd into `main` and proceed with env setup
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 $ cd main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 $ mkcommit A0
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 $ hg up -q 0
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 $ mkcommit A1
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 created new head
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 $ hg prune --date '0 0' .
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 1 changesets pruned
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 working directory now at a9bdc8b26820
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 $ hg strip --hidden -q 'desc(A1)'
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44 $ hg log -G --hidden
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
45 x 28b51eb45704 (draft): A0
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46 |
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47 @ a9bdc8b26820 (public): O
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49 $ hg debugobsolete
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 $ cd ..
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 $ cd ..
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 Actual Test
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 -------------------------------------
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 $ dotest D.2
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59 ## Running testcase D.2
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 ## initial state
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
61 # obstore: main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64 # obstore: pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 # obstore: pulldest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 ## pushing from main to pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67 pushing to pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 searching for changes
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 no changes found
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70 OBSEXC: computing relevant nodes
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 OBSEXC: computing markers relevant to 1 nodes
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 OBSEXC: encoding 2 markers
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 OBSEXC: sending 1 pushkey payload (188 bytes)
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 OBSEXC: DONE
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 ## post push state
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
76 # obstore: main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 # obstore: pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
82 # obstore: pulldest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
83 ## pulling from main into pulldest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 pulling from main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 searching for changes
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
86 no changes found
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 OBSEXC: pull obsolescence markers
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
88 OBSEXC: merging obsolescence markers (150 bytes)
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 OBSEXC: 2 markers added
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 OBSEXC: DONE
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 ## post pull state
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 # obstore: main
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
93 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 # obstore: pushdest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
96 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
98 # obstore: pulldest
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
100 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
cddac452fa40 exchange: add test case for D.2
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101