1 |
|
2 Initial setup |
|
3 |
|
4 $ . $TESTDIR/testlib/exchange-util.sh |
|
5 |
|
6 ==== A.1.1 pushing a single head ==== |
|
7 .. |
|
8 .. {{{ |
|
9 .. ⇠◔ A |
|
10 .. | |
|
11 .. ● O |
|
12 .. }}} |
|
13 .. |
|
14 .. Marker exist from: |
|
15 .. |
|
16 .. * A |
|
17 .. |
|
18 .. Command run: |
|
19 .. |
|
20 .. * hg push -r A |
|
21 .. * hg push |
|
22 .. |
|
23 .. Expected exchange: |
|
24 .. |
|
25 .. * chain from A |
|
26 |
|
27 Setup |
|
28 --------------- |
|
29 |
|
30 initial |
|
31 |
|
32 $ setuprepos A.1.1 |
|
33 creating test repo for test case A.1.1 |
|
34 - pulldest |
|
35 - main |
|
36 - pushdest |
|
37 cd into `main` and proceed with env setup |
|
38 $ cd main |
|
39 $ mkcommit A |
|
40 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` |
|
41 $ hg log -G |
|
42 @ f5bc6836db60 (draft): A |
|
43 | |
|
44 o a9bdc8b26820 (public): O |
|
45 |
|
46 $ hg debugobsolete |
|
47 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
48 $ hg debugobsrelsethashtree |
|
49 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 |
|
50 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 |
|
51 $ hg debugobshashrange --subranges --rev 'head()' |
|
52 rev node index size depth obshash |
|
53 1 f5bc6836db60 0 2 2 50656e04a95e |
|
54 0 a9bdc8b26820 0 1 1 000000000000 |
|
55 1 f5bc6836db60 1 1 2 50656e04a95e |
|
56 $ cd .. |
|
57 $ cd .. |
|
58 |
|
59 setup both variants |
|
60 |
|
61 $ cp -r A.1.1 A.1.1.a |
|
62 $ cp -r A.1.1 A.1.1.b |
|
63 |
|
64 |
|
65 Variant a: push -r A |
|
66 -------------------- |
|
67 |
|
68 $ dotest A.1.1.a A |
|
69 ## Running testcase A.1.1.a |
|
70 # testing echange of "A" (f5bc6836db60) |
|
71 ## initial state |
|
72 # obstore: main |
|
73 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
74 # obstore: pushdest |
|
75 # obstore: pulldest |
|
76 ## pushing "A" from main to pushdest |
|
77 pushing to pushdest |
|
78 searching for changes |
|
79 remote: adding changesets |
|
80 remote: adding manifests |
|
81 remote: adding file changes |
|
82 remote: added 1 changesets with 1 changes to 1 files |
|
83 remote: 1 new obsolescence markers |
|
84 ## post push state |
|
85 # obstore: main |
|
86 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
87 # obstore: pushdest |
|
88 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
89 # obstore: pulldest |
|
90 ## pulling "f5bc6836db60" from main into pulldest |
|
91 pulling from main |
|
92 searching for changes |
|
93 adding changesets |
|
94 adding manifests |
|
95 adding file changes |
|
96 added 1 changesets with 1 changes to 1 files |
|
97 1 new obsolescence markers |
|
98 (run 'hg update' to get a working copy) |
|
99 ## post pull state |
|
100 # obstore: main |
|
101 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
102 # obstore: pushdest |
|
103 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
104 # obstore: pulldest |
|
105 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 Variant b: push |
|
111 --------------- |
|
112 |
|
113 $ dotest A.1.1.b |
|
114 ## Running testcase A.1.1.b |
|
115 ## initial state |
|
116 # obstore: main |
|
117 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
118 # obstore: pushdest |
|
119 # obstore: pulldest |
|
120 ## pushing from main to pushdest |
|
121 pushing to pushdest |
|
122 searching for changes |
|
123 remote: adding changesets |
|
124 remote: adding manifests |
|
125 remote: adding file changes |
|
126 remote: added 1 changesets with 1 changes to 1 files |
|
127 remote: 1 new obsolescence markers |
|
128 ## post push state |
|
129 # obstore: main |
|
130 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
131 # obstore: pushdest |
|
132 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
133 # obstore: pulldest |
|
134 ## pulling from main into pulldest |
|
135 pulling from main |
|
136 searching for changes |
|
137 adding changesets |
|
138 adding manifests |
|
139 adding file changes |
|
140 added 1 changesets with 1 changes to 1 files |
|
141 1 new obsolescence markers |
|
142 (run 'hg update' to get a working copy) |
|
143 ## post pull state |
|
144 # obstore: main |
|
145 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
146 # obstore: pushdest |
|
147 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
148 # obstore: pulldest |
|
149 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 ==== A.1.2 pushing a multiple changeset into a single head ==== |
|
157 |
|
158 .. {{{ |
|
159 .. ◔ B |
|
160 .. | |
|
161 .. ⇠◔ A |
|
162 .. | |
|
163 .. ● O |
|
164 .. }}} |
|
165 .. |
|
166 .. Marker exist from: |
|
167 .. |
|
168 .. * A |
|
169 .. |
|
170 .. Command run: |
|
171 .. |
|
172 .. * hg push -r B |
|
173 .. * hg push |
|
174 .. |
|
175 .. Expected exchange: |
|
176 .. |
|
177 .. * chain from A |
|
178 |
|
179 Setup |
|
180 --------------- |
|
181 |
|
182 initial |
|
183 |
|
184 $ setuprepos A.1.2 |
|
185 creating test repo for test case A.1.2 |
|
186 - pulldest |
|
187 - main |
|
188 - pushdest |
|
189 cd into `main` and proceed with env setup |
|
190 $ cd main |
|
191 $ mkcommit A |
|
192 $ mkcommit B |
|
193 $ hg log -G |
|
194 @ f6fbb35d8ac9 (draft): B |
|
195 | |
|
196 o f5bc6836db60 (draft): A |
|
197 | |
|
198 o a9bdc8b26820 (public): O |
|
199 |
|
200 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` |
|
201 $ hg debugobsolete |
|
202 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
203 $ cd .. |
|
204 $ cd .. |
|
205 |
|
206 setup both variants |
|
207 |
|
208 $ cp -r A.1.2 A.1.2.a |
|
209 $ cp -r A.1.2 A.1.2.b |
|
210 |
|
211 |
|
212 Variant a: push -r A |
|
213 -------------------- |
|
214 |
|
215 $ dotest A.1.2.a B |
|
216 ## Running testcase A.1.2.a |
|
217 # testing echange of "B" (f6fbb35d8ac9) |
|
218 ## initial state |
|
219 # obstore: main |
|
220 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
221 # obstore: pushdest |
|
222 # obstore: pulldest |
|
223 ## pushing "B" from main to pushdest |
|
224 pushing to pushdest |
|
225 searching for changes |
|
226 remote: adding changesets |
|
227 remote: adding manifests |
|
228 remote: adding file changes |
|
229 remote: added 2 changesets with 2 changes to 2 files |
|
230 remote: 1 new obsolescence markers |
|
231 ## post push state |
|
232 # obstore: main |
|
233 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
234 # obstore: pushdest |
|
235 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
236 # obstore: pulldest |
|
237 ## pulling "f6fbb35d8ac9" from main into pulldest |
|
238 pulling from main |
|
239 searching for changes |
|
240 adding changesets |
|
241 adding manifests |
|
242 adding file changes |
|
243 added 2 changesets with 2 changes to 2 files |
|
244 1 new obsolescence markers |
|
245 (run 'hg update' to get a working copy) |
|
246 ## post pull state |
|
247 # obstore: main |
|
248 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
249 # obstore: pushdest |
|
250 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
251 # obstore: pulldest |
|
252 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
253 |
|
254 Variant b: push |
|
255 --------------- |
|
256 |
|
257 $ dotest A.1.2.b |
|
258 ## Running testcase A.1.2.b |
|
259 ## initial state |
|
260 # obstore: main |
|
261 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
262 # obstore: pushdest |
|
263 # obstore: pulldest |
|
264 ## pushing from main to pushdest |
|
265 pushing to pushdest |
|
266 searching for changes |
|
267 remote: adding changesets |
|
268 remote: adding manifests |
|
269 remote: adding file changes |
|
270 remote: added 2 changesets with 2 changes to 2 files |
|
271 remote: 1 new obsolescence markers |
|
272 ## post push state |
|
273 # obstore: main |
|
274 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
275 # obstore: pushdest |
|
276 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
277 # obstore: pulldest |
|
278 ## pulling from main into pulldest |
|
279 pulling from main |
|
280 searching for changes |
|
281 adding changesets |
|
282 adding manifests |
|
283 adding file changes |
|
284 added 2 changesets with 2 changes to 2 files |
|
285 1 new obsolescence markers |
|
286 (run 'hg update' to get a working copy) |
|
287 ## post pull state |
|
288 # obstore: main |
|
289 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
290 # obstore: pushdest |
|
291 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
292 # obstore: pulldest |
|
293 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|