comparison tests/test-exchange-obsmarkers-case-A6.t @ 2268:f2ebe960998b stable

tests: update test to match upstreamable version Name have been clarified, documentation has been updated and some test-case have been updated to match the intended test.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 08 Apr 2017 12:48:20 +0200
parents tests/test-exchange-A6.t@a202f3af890c
children e22de367fc74
comparison
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
1 ============================================
2 Testing obsolescence markers push: Cases A.6
3 ============================================
4
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
6 all changesets that requested to be "in sync" after the push (even if they are
7 already on both side).
8
9 This test belongs to a series of tests checking such set is properly computed
10 and applied. This does not tests "obsmarkers" discovery capabilities.
11
12 Category A: simple cases
13 TestCase 6: new markers between changesets already known on both side
14 Variants:
15 # a: explicit push
16 # b: bare push
17
18 A.6 new markers between changesets already known on both side
19 ==============================================================
20
21 .. {{{
22 .. A ◕⇠● B
23 .. |/
24 .. ● O
25 .. }}}
26 ..
27 .. Marker exist from:
28 ..
29 .. * `A◕⇠● B`
30 ..
31 .. Command runs:
32 ..
33 .. * hg push -r B
34 .. * hg push
35 ..
36 .. Expected exchange:
37 ..
38 .. * `A◕⇠● B`
39
40 Setup
41 -----
42
43 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
44
45 initial
46
47 $ setuprepos A.6
48 creating test repo for test case A.6
49 - pulldest
50 - main
51 - pushdest
52 cd into `main` and proceed with env setup
53 $ cd main
54 $ mkcommit A0
55 $ hg update -q 0
56 $ mkcommit A1
57 created new head
58
59 make both changeset known in remote
60
61 $ hg push -qf ../pushdest
62 $ hg push -qf ../pulldest
63
64 create a marker after this
65
66 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
67 $ hg log -G --hidden
68 @ e5ea8f9c7314 (draft): A1
69 |
70 | x 28b51eb45704 (draft): A0
71 |/
72 o a9bdc8b26820 (public): O
73
74 $ inspect_obsmarkers
75 obsstore content
76 ================
77 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
78 obshashtree
79 ===========
80 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
81 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
82 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
83 obshashrange
84 ============
85 rev node index size depth obshash
86 2 e5ea8f9c7314 0 2 2 3bc2ee626e11
87 0 a9bdc8b26820 0 1 1 000000000000
88 2 e5ea8f9c7314 1 1 2 3bc2ee626e11
89 $ cd ..
90 $ cd ..
91
92 $ cp -R A.6 A.6.a
93 $ cp -R A.6 A.6.b
94
95 Actual Test (explicit push version)
96 -----------------------------------
97
98 $ dotest A.6.a A1
99 ## Running testcase A.6.a
100 # testing echange of "A1" (e5ea8f9c7314)
101 ## initial state
102 # obstore: main
103 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
104 # obstore: pushdest
105 # obstore: pulldest
106 ## pushing "A1" from main to pushdest
107 pushing to pushdest
108 searching for changes
109 no changes found
110 remote: 1 new obsolescence markers
111 ## post push state
112 # obstore: main
113 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
114 # obstore: pushdest
115 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
116 # obstore: pulldest
117 ## pulling "e5ea8f9c7314" from main into pulldest
118 pulling from main
119 no changes found
120 1 new obsolescence markers
121 ## post pull state
122 # obstore: main
123 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
124 # obstore: pushdest
125 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 # obstore: pulldest
127 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
128
129 Actual Test (bare push version)
130 -------------------------------
131
132 $ dotest A.6.b
133 ## Running testcase A.6.b
134 ## initial state
135 # obstore: main
136 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
137 # obstore: pushdest
138 # obstore: pulldest
139 ## pushing from main to pushdest
140 pushing to pushdest
141 searching for changes
142 no changes found
143 remote: 1 new obsolescence markers
144 ## post push state
145 # obstore: main
146 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
147 # obstore: pushdest
148 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
149 # obstore: pulldest
150 ## pulling from main into pulldest
151 pulling from main
152 searching for changes
153 no changes found
154 1 new obsolescence markers
155 ## post pull state
156 # obstore: main
157 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
158 # obstore: pushdest
159 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
160 # obstore: pulldest
161 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}