Show More
@@ -1,866 +1,866 b'' | |||
|
1 | 1 | #require serve |
|
2 | 2 | |
|
3 | 3 | $ cat << EOF >> $HGRCPATH |
|
4 | 4 | > [ui] |
|
5 | 5 | > logtemplate={rev}:{node|short} {desc|firstline} |
|
6 | 6 | > [phases] |
|
7 | 7 | > publish=False |
|
8 | 8 | > [experimental] |
|
9 | 9 | > evolution=createmarkers,exchange |
|
10 | 10 | > EOF |
|
11 | 11 | |
|
12 | 12 | initialize |
|
13 | 13 | |
|
14 | 14 | $ hg init a |
|
15 | 15 | $ cd a |
|
16 | 16 | $ echo 'test' > test |
|
17 | 17 | $ hg commit -Am'test' |
|
18 | 18 | adding test |
|
19 | 19 | |
|
20 | 20 | set bookmarks |
|
21 | 21 | |
|
22 | 22 | $ hg bookmark X |
|
23 | 23 | $ hg bookmark Y |
|
24 | 24 | $ hg bookmark Z |
|
25 | 25 | |
|
26 | 26 | import bookmark by name |
|
27 | 27 | |
|
28 | 28 | $ hg init ../b |
|
29 | 29 | $ cd ../b |
|
30 | 30 | $ hg book Y |
|
31 | 31 | $ hg book |
|
32 | 32 | * Y -1:000000000000 |
|
33 | 33 | $ hg pull ../a |
|
34 | 34 | pulling from ../a |
|
35 | 35 | requesting all changes |
|
36 | 36 | adding changesets |
|
37 | 37 | adding manifests |
|
38 | 38 | adding file changes |
|
39 | 39 | added 1 changesets with 1 changes to 1 files |
|
40 | 40 | adding remote bookmark X |
|
41 | 41 | updating bookmark Y |
|
42 | 42 | adding remote bookmark Z |
|
43 | 43 | (run 'hg update' to get a working copy) |
|
44 | 44 | $ hg bookmarks |
|
45 | 45 | X 0:4e3505fd9583 |
|
46 | 46 | * Y 0:4e3505fd9583 |
|
47 | 47 | Z 0:4e3505fd9583 |
|
48 | 48 | $ hg debugpushkey ../a namespaces |
|
49 | 49 | bookmarks |
|
50 | 50 | namespaces |
|
51 | 51 | obsolete |
|
52 | 52 | phases |
|
53 | 53 | $ hg debugpushkey ../a bookmarks |
|
54 | 54 | X 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
55 | 55 | Y 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
56 | 56 | Z 4e3505fd95835d721066b76e75dbb8cc554d7f77 |
|
57 | 57 | |
|
58 | 58 | delete the bookmark to re-pull it |
|
59 | 59 | |
|
60 | 60 | $ hg book -d X |
|
61 | 61 | $ hg pull -B X ../a |
|
62 | 62 | pulling from ../a |
|
63 | 63 | no changes found |
|
64 | 64 | adding remote bookmark X |
|
65 | 65 | |
|
66 | 66 | finally no-op pull |
|
67 | 67 | |
|
68 | 68 | $ hg pull -B X ../a |
|
69 | 69 | pulling from ../a |
|
70 | 70 | no changes found |
|
71 | 71 | $ hg bookmark |
|
72 | 72 | X 0:4e3505fd9583 |
|
73 | 73 | * Y 0:4e3505fd9583 |
|
74 | 74 | Z 0:4e3505fd9583 |
|
75 | 75 | |
|
76 | 76 | export bookmark by name |
|
77 | 77 | |
|
78 | 78 | $ hg bookmark W |
|
79 | 79 | $ hg bookmark foo |
|
80 | 80 | $ hg bookmark foobar |
|
81 | 81 | $ hg push -B W ../a |
|
82 | 82 | pushing to ../a |
|
83 | 83 | searching for changes |
|
84 | 84 | no changes found |
|
85 | 85 | exporting bookmark W |
|
86 | 86 | [1] |
|
87 | 87 | $ hg -R ../a bookmarks |
|
88 | 88 | W -1:000000000000 |
|
89 | 89 | X 0:4e3505fd9583 |
|
90 | 90 | Y 0:4e3505fd9583 |
|
91 | 91 | * Z 0:4e3505fd9583 |
|
92 | 92 | |
|
93 | 93 | delete a remote bookmark |
|
94 | 94 | |
|
95 | 95 | $ hg book -d W |
|
96 | 96 | $ hg push -B W ../a |
|
97 | 97 | pushing to ../a |
|
98 | 98 | searching for changes |
|
99 | 99 | no changes found |
|
100 | 100 | deleting remote bookmark W |
|
101 | 101 | [1] |
|
102 | 102 | |
|
103 | 103 | export the active bookmark |
|
104 | 104 | |
|
105 | 105 | $ hg bookmark V |
|
106 | 106 | $ hg push -B . ../a |
|
107 | 107 | pushing to ../a |
|
108 | 108 | searching for changes |
|
109 | 109 | no changes found |
|
110 | 110 | exporting bookmark V |
|
111 | 111 | [1] |
|
112 | 112 | |
|
113 | 113 | exporting the active bookmark with 'push -B .' |
|
114 | 114 | demand that one of the bookmarks is activated |
|
115 | 115 | |
|
116 | 116 | $ hg update -r default |
|
117 | 117 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
118 | 118 | (leaving bookmark V) |
|
119 | 119 | $ hg push -B . ../a |
|
120 | 120 | abort: no active bookmark |
|
121 | 121 | [255] |
|
122 | 122 | $ hg update -r V |
|
123 | 123 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
124 | 124 | (activating bookmark V) |
|
125 | 125 | |
|
126 | 126 | delete the bookmark |
|
127 | 127 | |
|
128 | 128 | $ hg book -d V |
|
129 | 129 | $ hg push -B V ../a |
|
130 | 130 | pushing to ../a |
|
131 | 131 | searching for changes |
|
132 | 132 | no changes found |
|
133 | 133 | deleting remote bookmark V |
|
134 | 134 | [1] |
|
135 | 135 | $ hg up foobar |
|
136 | 136 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
137 | 137 | (activating bookmark foobar) |
|
138 | 138 | |
|
139 | 139 | push/pull name that doesn't exist |
|
140 | 140 | |
|
141 | 141 | $ hg push -B badname ../a |
|
142 | 142 | pushing to ../a |
|
143 | 143 | searching for changes |
|
144 | 144 | bookmark badname does not exist on the local or remote repository! |
|
145 | 145 | no changes found |
|
146 | 146 | [2] |
|
147 | 147 | $ hg pull -B anotherbadname ../a |
|
148 | 148 | pulling from ../a |
|
149 | 149 | abort: remote bookmark anotherbadname not found! |
|
150 | 150 | [255] |
|
151 | 151 | |
|
152 | 152 | divergent bookmarks |
|
153 | 153 | |
|
154 | 154 | $ cd ../a |
|
155 | 155 | $ echo c1 > f1 |
|
156 | 156 | $ hg ci -Am1 |
|
157 | 157 | adding f1 |
|
158 | 158 | $ hg book -f @ |
|
159 | 159 | $ hg book -f X |
|
160 | 160 | $ hg book |
|
161 | 161 | @ 1:0d2164f0ce0d |
|
162 | 162 | * X 1:0d2164f0ce0d |
|
163 | 163 | Y 0:4e3505fd9583 |
|
164 | 164 | Z 1:0d2164f0ce0d |
|
165 | 165 | |
|
166 | 166 | $ cd ../b |
|
167 | 167 | $ hg up |
|
168 | 168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
169 | 169 | updating bookmark foobar |
|
170 | 170 | $ echo c2 > f2 |
|
171 | 171 | $ hg ci -Am2 |
|
172 | 172 | adding f2 |
|
173 | 173 | $ hg book -if @ |
|
174 | 174 | $ hg book -if X |
|
175 | 175 | $ hg book |
|
176 | 176 | @ 1:9b140be10808 |
|
177 | 177 | X 1:9b140be10808 |
|
178 | 178 | Y 0:4e3505fd9583 |
|
179 | 179 | Z 0:4e3505fd9583 |
|
180 | 180 | foo -1:000000000000 |
|
181 | 181 | * foobar 1:9b140be10808 |
|
182 | 182 | |
|
183 | 183 | $ hg pull --config paths.foo=../a foo |
|
184 | 184 | pulling from $TESTTMP/a (glob) |
|
185 | 185 | searching for changes |
|
186 | 186 | adding changesets |
|
187 | 187 | adding manifests |
|
188 | 188 | adding file changes |
|
189 | 189 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
190 | 190 | divergent bookmark @ stored as @foo |
|
191 | 191 | divergent bookmark X stored as X@foo |
|
192 | 192 | updating bookmark Z |
|
193 | 193 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
194 | 194 | $ hg book |
|
195 | 195 | @ 1:9b140be10808 |
|
196 | 196 | @foo 2:0d2164f0ce0d |
|
197 | 197 | X 1:9b140be10808 |
|
198 | 198 | X@foo 2:0d2164f0ce0d |
|
199 | 199 | Y 0:4e3505fd9583 |
|
200 | 200 | Z 2:0d2164f0ce0d |
|
201 | 201 | foo -1:000000000000 |
|
202 | 202 | * foobar 1:9b140be10808 |
|
203 | 203 | |
|
204 | 204 | (test that too many divergence of bookmark) |
|
205 | 205 | |
|
206 | 206 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done |
|
207 | 207 | $ hg pull ../a |
|
208 | 208 | pulling from ../a |
|
209 | 209 | searching for changes |
|
210 | 210 | no changes found |
|
211 | 211 | warning: failed to assign numbered name to divergent bookmark X |
|
212 | 212 | divergent bookmark @ stored as @1 |
|
213 | 213 | $ hg bookmarks | grep '^ X' | grep -v ':000000000000' |
|
214 | 214 | X 1:9b140be10808 |
|
215 | 215 | X@foo 2:0d2164f0ce0d |
|
216 | 216 | |
|
217 | 217 | (test that remotely diverged bookmarks are reused if they aren't changed) |
|
218 | 218 | |
|
219 | 219 | $ hg bookmarks | grep '^ @' |
|
220 | 220 | @ 1:9b140be10808 |
|
221 | 221 | @1 2:0d2164f0ce0d |
|
222 | 222 | @foo 2:0d2164f0ce0d |
|
223 | 223 | $ hg pull ../a |
|
224 | 224 | pulling from ../a |
|
225 | 225 | searching for changes |
|
226 | 226 | no changes found |
|
227 | 227 | warning: failed to assign numbered name to divergent bookmark X |
|
228 | 228 | divergent bookmark @ stored as @1 |
|
229 | 229 | $ hg bookmarks | grep '^ @' |
|
230 | 230 | @ 1:9b140be10808 |
|
231 | 231 | @1 2:0d2164f0ce0d |
|
232 | 232 | @foo 2:0d2164f0ce0d |
|
233 | 233 | |
|
234 | 234 | $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done |
|
235 | 235 | $ hg bookmarks -d "@1" |
|
236 | 236 | |
|
237 | 237 | $ hg push -f ../a |
|
238 | 238 | pushing to ../a |
|
239 | 239 | searching for changes |
|
240 | 240 | adding changesets |
|
241 | 241 | adding manifests |
|
242 | 242 | adding file changes |
|
243 | 243 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
244 | 244 | $ hg -R ../a book |
|
245 | 245 | @ 1:0d2164f0ce0d |
|
246 | 246 | * X 1:0d2164f0ce0d |
|
247 | 247 | Y 0:4e3505fd9583 |
|
248 | 248 | Z 1:0d2164f0ce0d |
|
249 | 249 | |
|
250 | 250 | explicit pull should overwrite the local version (issue4439) |
|
251 | 251 | |
|
252 | 252 | $ hg update -r X |
|
253 | 253 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
254 | 254 | (activating bookmark X) |
|
255 | 255 | $ hg pull --config paths.foo=../a foo -B . |
|
256 | 256 | pulling from $TESTTMP/a (glob) |
|
257 | 257 | no changes found |
|
258 | 258 | divergent bookmark @ stored as @foo |
|
259 | 259 | importing bookmark X |
|
260 | 260 | |
|
261 | 261 | reinstall state for further testing: |
|
262 | 262 | |
|
263 | 263 | $ hg book -fr 9b140be10808 X |
|
264 | 264 | |
|
265 | 265 | revsets should not ignore divergent bookmarks |
|
266 | 266 | |
|
267 | 267 | $ hg bookmark -fr 1 Z |
|
268 | 268 | $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n' |
|
269 | 269 | 0:4e3505fd9583 Y |
|
270 | 270 | 1:9b140be10808 @ X Z foobar |
|
271 | 271 | 2:0d2164f0ce0d @foo X@foo |
|
272 | 272 | $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
273 | 273 | 2:0d2164f0ce0d @foo X@foo |
|
274 | 274 | $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n' |
|
275 | 275 | 2:0d2164f0ce0d @foo X@foo |
|
276 | 276 | |
|
277 | 277 | update a remote bookmark from a non-head to a head |
|
278 | 278 | |
|
279 | 279 | $ hg up -q Y |
|
280 | 280 | $ echo c3 > f2 |
|
281 | 281 | $ hg ci -Am3 |
|
282 | 282 | adding f2 |
|
283 | 283 | created new head |
|
284 | 284 | $ hg push ../a |
|
285 | 285 | pushing to ../a |
|
286 | 286 | searching for changes |
|
287 | 287 | adding changesets |
|
288 | 288 | adding manifests |
|
289 | 289 | adding file changes |
|
290 | 290 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
291 | 291 | updating bookmark Y |
|
292 | 292 | $ hg -R ../a book |
|
293 | 293 | @ 1:0d2164f0ce0d |
|
294 | 294 | * X 1:0d2164f0ce0d |
|
295 | 295 | Y 3:f6fc62dde3c0 |
|
296 | 296 | Z 1:0d2164f0ce0d |
|
297 | 297 | |
|
298 | 298 | update a bookmark in the middle of a client pulling changes |
|
299 | 299 | |
|
300 | 300 | $ cd .. |
|
301 | 301 | $ hg clone -q a pull-race |
|
302 | 302 | |
|
303 | 303 | We want to use http because it is stateless and therefore more susceptible to |
|
304 | 304 | race conditions |
|
305 | 305 | |
|
306 | 306 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
307 | 307 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
308 | 308 | |
|
309 | 309 | $ hg clone -q http://localhost:$HGPORT/ pull-race2 |
|
310 | 310 | $ cd pull-race |
|
311 | 311 | $ hg up -q Y |
|
312 | 312 | $ echo c4 > f2 |
|
313 | 313 | $ hg ci -Am4 |
|
314 | 314 | $ echo c5 > f3 |
|
315 | 315 | $ cat <<EOF > .hg/hgrc |
|
316 | 316 | > [hooks] |
|
317 | 317 | > outgoing.makecommit = hg ci -Am5; echo committed in pull-race |
|
318 | 318 | > EOF |
|
319 | 319 | |
|
320 | 320 | (new config needs a server restart) |
|
321 | 321 | |
|
322 | 322 | $ cd .. |
|
323 | 323 | $ killdaemons.py |
|
324 | 324 | $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log |
|
325 | 325 | $ cat pull-race.pid >> $DAEMON_PIDS |
|
326 | 326 | $ cd pull-race2 |
|
327 | 327 | $ hg -R $TESTTMP/pull-race book |
|
328 | 328 | @ 1:0d2164f0ce0d |
|
329 | 329 | X 1:0d2164f0ce0d |
|
330 | 330 | * Y 4:b0a5eff05604 |
|
331 | 331 | Z 1:0d2164f0ce0d |
|
332 | 332 | $ hg pull |
|
333 | 333 | pulling from http://localhost:$HGPORT/ |
|
334 | 334 | searching for changes |
|
335 | 335 | adding changesets |
|
336 | 336 | adding manifests |
|
337 | 337 | adding file changes |
|
338 | 338 | added 1 changesets with 1 changes to 1 files |
|
339 | 339 | updating bookmark Y |
|
340 | 340 | (run 'hg update' to get a working copy) |
|
341 | 341 | $ hg book |
|
342 | 342 | * @ 1:0d2164f0ce0d |
|
343 | 343 | X 1:0d2164f0ce0d |
|
344 | 344 | Y 4:b0a5eff05604 |
|
345 | 345 | Z 1:0d2164f0ce0d |
|
346 | 346 | |
|
347 | 347 | Update a bookmark right after the initial lookup -B (issue4689) |
|
348 | 348 | |
|
349 | 349 | $ echo c6 > ../pull-race/f3 # to be committed during the race |
|
350 | 350 | $ cat <<EOF > ../pull-race/.hg/hgrc |
|
351 | 351 | > [hooks] |
|
352 | 352 | > # If anything to commit, commit it right after the first key listing used |
|
353 | 353 | > # during lookup. This makes the commit appear before the actual getbundle |
|
354 | 354 | > # call. |
|
355 | 355 | > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0 |
|
356 | 356 | > EOF |
|
357 | 357 | |
|
358 | 358 | (new config need server restart) |
|
359 | 359 | |
|
360 | 360 | $ killdaemons.py |
|
361 | 361 | $ hg serve -R ../pull-race -p $HGPORT -d --pid-file=../pull-race.pid -E main-error.log |
|
362 | 362 | $ cat ../pull-race.pid >> $DAEMON_PIDS |
|
363 | 363 | |
|
364 | 364 | $ hg -R $TESTTMP/pull-race book |
|
365 | 365 | @ 1:0d2164f0ce0d |
|
366 | 366 | X 1:0d2164f0ce0d |
|
367 | 367 | * Y 5:35d1ef0a8d1b |
|
368 | 368 | Z 1:0d2164f0ce0d |
|
369 | 369 | $ hg update -r Y |
|
370 | 370 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
371 | 371 | (activating bookmark Y) |
|
372 | 372 | $ hg pull -B . |
|
373 | 373 | pulling from http://localhost:$HGPORT/ |
|
374 | 374 | searching for changes |
|
375 | 375 | adding changesets |
|
376 | 376 | adding manifests |
|
377 | 377 | adding file changes |
|
378 | 378 | added 1 changesets with 1 changes to 1 files |
|
379 | 379 | updating bookmark Y |
|
380 | 380 | (run 'hg update' to get a working copy) |
|
381 | 381 | $ hg book |
|
382 | 382 | @ 1:0d2164f0ce0d |
|
383 | 383 | X 1:0d2164f0ce0d |
|
384 | 384 | * Y 5:35d1ef0a8d1b |
|
385 | 385 | Z 1:0d2164f0ce0d |
|
386 | 386 | |
|
387 | 387 | (done with this section of the test) |
|
388 | 388 | |
|
389 | 389 | $ killdaemons.py |
|
390 | 390 | $ cd ../b |
|
391 | 391 | |
|
392 | 392 | diverging a remote bookmark fails |
|
393 | 393 | |
|
394 | 394 | $ hg up -q 4e3505fd9583 |
|
395 | 395 | $ echo c4 > f2 |
|
396 | 396 | $ hg ci -Am4 |
|
397 | 397 | adding f2 |
|
398 | 398 | created new head |
|
399 | 399 | $ echo c5 > f2 |
|
400 | 400 | $ hg ci -Am5 |
|
401 | 401 | $ hg log -G |
|
402 | 402 | @ 5:c922c0139ca0 5 |
|
403 | 403 | | |
|
404 | 404 | o 4:4efff6d98829 4 |
|
405 | 405 | | |
|
406 | 406 | | o 3:f6fc62dde3c0 3 |
|
407 | 407 | |/ |
|
408 | 408 | | o 2:0d2164f0ce0d 1 |
|
409 | 409 | |/ |
|
410 | 410 | | o 1:9b140be10808 2 |
|
411 | 411 | |/ |
|
412 | 412 | o 0:4e3505fd9583 test |
|
413 | 413 | |
|
414 | 414 | |
|
415 | 415 | $ hg book -f Y |
|
416 | 416 | |
|
417 | 417 | $ cat <<EOF > ../a/.hg/hgrc |
|
418 | 418 | > [web] |
|
419 | 419 | > push_ssl = false |
|
420 | 420 | > allow_push = * |
|
421 | 421 | > EOF |
|
422 | 422 | |
|
423 | 423 | $ hg serve -R ../a -p $HGPORT2 -d --pid-file=../hg2.pid |
|
424 | 424 | $ cat ../hg2.pid >> $DAEMON_PIDS |
|
425 | 425 | |
|
426 | 426 | $ hg push http://localhost:$HGPORT2/ |
|
427 | 427 | pushing to http://localhost:$HGPORT2/ |
|
428 | 428 | searching for changes |
|
429 | 429 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
430 | 430 | (merge or see "hg help push" for details about pushing new heads) |
|
431 | 431 | [255] |
|
432 | 432 | $ hg -R ../a book |
|
433 | 433 | @ 1:0d2164f0ce0d |
|
434 | 434 | * X 1:0d2164f0ce0d |
|
435 | 435 | Y 3:f6fc62dde3c0 |
|
436 | 436 | Z 1:0d2164f0ce0d |
|
437 | 437 | |
|
438 | 438 | |
|
439 | 439 | Unrelated marker does not alter the decision |
|
440 | 440 | |
|
441 | 441 | $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
442 | 442 | $ hg push http://localhost:$HGPORT2/ |
|
443 | 443 | pushing to http://localhost:$HGPORT2/ |
|
444 | 444 | searching for changes |
|
445 | 445 | abort: push creates new remote head c922c0139ca0 with bookmark 'Y'! |
|
446 | 446 | (merge or see "hg help push" for details about pushing new heads) |
|
447 | 447 | [255] |
|
448 | 448 | $ hg -R ../a book |
|
449 | 449 | @ 1:0d2164f0ce0d |
|
450 | 450 | * X 1:0d2164f0ce0d |
|
451 | 451 | Y 3:f6fc62dde3c0 |
|
452 | 452 | Z 1:0d2164f0ce0d |
|
453 | 453 | |
|
454 | 454 | Update to a successor works |
|
455 | 455 | |
|
456 | 456 | $ hg id --debug -r 3 |
|
457 | 457 | f6fc62dde3c0771e29704af56ba4d8af77abcc2f |
|
458 | 458 | $ hg id --debug -r 4 |
|
459 | 459 | 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
460 | 460 | $ hg id --debug -r 5 |
|
461 | 461 | c922c0139ca03858f655e4a2af4dd02796a63969 tip Y |
|
462 | 462 | $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc |
|
463 | 463 | $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f |
|
464 | 464 | $ hg push http://localhost:$HGPORT2/ |
|
465 | 465 | pushing to http://localhost:$HGPORT2/ |
|
466 | 466 | searching for changes |
|
467 | 467 | remote: adding changesets |
|
468 | 468 | remote: adding manifests |
|
469 | 469 | remote: adding file changes |
|
470 | 470 | remote: added 2 changesets with 2 changes to 1 files (+1 heads) |
|
471 | 471 | remote: 2 new obsolescence markers |
|
472 | 472 | updating bookmark Y |
|
473 | 473 | $ hg -R ../a book |
|
474 | 474 | @ 1:0d2164f0ce0d |
|
475 | 475 | * X 1:0d2164f0ce0d |
|
476 | 476 | Y 5:c922c0139ca0 |
|
477 | 477 | Z 1:0d2164f0ce0d |
|
478 | 478 | |
|
479 | 479 | hgweb |
|
480 | 480 | |
|
481 | 481 | $ cat <<EOF > .hg/hgrc |
|
482 | 482 | > [web] |
|
483 | 483 | > push_ssl = false |
|
484 | 484 | > allow_push = * |
|
485 | 485 | > EOF |
|
486 | 486 | |
|
487 | 487 | $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log |
|
488 | 488 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
489 | 489 | $ cd ../a |
|
490 | 490 | |
|
491 | 491 | $ hg debugpushkey http://localhost:$HGPORT/ namespaces |
|
492 | 492 | bookmarks |
|
493 | 493 | namespaces |
|
494 | 494 | obsolete |
|
495 | 495 | phases |
|
496 | 496 | $ hg debugpushkey http://localhost:$HGPORT/ bookmarks |
|
497 | 497 | @ 9b140be1080824d768c5a4691a564088eede71f9 |
|
498 | 498 | X 9b140be1080824d768c5a4691a564088eede71f9 |
|
499 | 499 | Y c922c0139ca03858f655e4a2af4dd02796a63969 |
|
500 | 500 | Z 9b140be1080824d768c5a4691a564088eede71f9 |
|
501 | 501 | foo 0000000000000000000000000000000000000000 |
|
502 | 502 | foobar 9b140be1080824d768c5a4691a564088eede71f9 |
|
503 | 503 | $ hg out -B http://localhost:$HGPORT/ |
|
504 | 504 | comparing with http://localhost:$HGPORT/ |
|
505 | 505 | searching for changed bookmarks |
|
506 | 506 | @ 0d2164f0ce0d |
|
507 | 507 | X 0d2164f0ce0d |
|
508 | 508 | Z 0d2164f0ce0d |
|
509 | 509 | foo |
|
510 | 510 | foobar |
|
511 | 511 | $ hg push -B Z http://localhost:$HGPORT/ |
|
512 | 512 | pushing to http://localhost:$HGPORT/ |
|
513 | 513 | searching for changes |
|
514 | 514 | no changes found |
|
515 | 515 | updating bookmark Z |
|
516 | 516 | [1] |
|
517 | 517 | $ hg book -d Z |
|
518 | 518 | $ hg in -B http://localhost:$HGPORT/ |
|
519 | 519 | comparing with http://localhost:$HGPORT/ |
|
520 | 520 | searching for changed bookmarks |
|
521 | 521 | @ 9b140be10808 |
|
522 | 522 | X 9b140be10808 |
|
523 | 523 | Z 0d2164f0ce0d |
|
524 | 524 | foo 000000000000 |
|
525 | 525 | foobar 9b140be10808 |
|
526 | 526 | $ hg pull -B Z http://localhost:$HGPORT/ |
|
527 | 527 | pulling from http://localhost:$HGPORT/ |
|
528 | 528 | no changes found |
|
529 | 529 | divergent bookmark @ stored as @1 |
|
530 | 530 | divergent bookmark X stored as X@1 |
|
531 | 531 | adding remote bookmark Z |
|
532 | 532 | adding remote bookmark foo |
|
533 | 533 | adding remote bookmark foobar |
|
534 | 534 | $ hg clone http://localhost:$HGPORT/ cloned-bookmarks |
|
535 | 535 | requesting all changes |
|
536 | 536 | adding changesets |
|
537 | 537 | adding manifests |
|
538 | 538 | adding file changes |
|
539 | 539 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
540 | 540 | 2 new obsolescence markers |
|
541 | 541 | updating to bookmark @ |
|
542 | 542 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
543 | 543 | $ hg -R cloned-bookmarks bookmarks |
|
544 | 544 | * @ 1:9b140be10808 |
|
545 | 545 | X 1:9b140be10808 |
|
546 | 546 | Y 4:c922c0139ca0 |
|
547 | 547 | Z 2:0d2164f0ce0d |
|
548 | 548 | foo -1:000000000000 |
|
549 | 549 | foobar 1:9b140be10808 |
|
550 | 550 | |
|
551 | 551 | $ cd .. |
|
552 | 552 | |
|
553 | 553 | Test to show result of bookmarks comparision |
|
554 | 554 | |
|
555 | 555 | $ mkdir bmcomparison |
|
556 | 556 | $ cd bmcomparison |
|
557 | 557 | |
|
558 | 558 | $ hg init source |
|
559 | 559 | $ hg -R source debugbuilddag '+2*2*3*4' |
|
560 | 560 | $ hg -R source log -G --template '{rev}:{node|short}' |
|
561 | 561 | o 4:e7bd5218ca15 |
|
562 | 562 | | |
|
563 | 563 | | o 3:6100d3090acf |
|
564 | 564 | |/ |
|
565 | 565 | | o 2:fa942426a6fd |
|
566 | 566 | |/ |
|
567 | 567 | | o 1:66f7d451a68b |
|
568 | 568 | |/ |
|
569 | 569 | o 0:1ea73414a91b |
|
570 | 570 | |
|
571 | 571 | $ hg -R source bookmarks -r 0 SAME |
|
572 | 572 | $ hg -R source bookmarks -r 0 ADV_ON_REPO1 |
|
573 | 573 | $ hg -R source bookmarks -r 0 ADV_ON_REPO2 |
|
574 | 574 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1 |
|
575 | 575 | $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2 |
|
576 | 576 | $ hg -R source bookmarks -r 1 DIVERGED |
|
577 | 577 | |
|
578 | 578 | $ hg clone -U source repo1 |
|
579 | 579 | |
|
580 | 580 | (test that incoming/outgoing exit with 1, if there is no bookmark to |
|
581 | 581 | be exchanged) |
|
582 | 582 | |
|
583 | 583 | $ hg -R repo1 incoming -B |
|
584 | 584 | comparing with $TESTTMP/bmcomparison/source |
|
585 | 585 | searching for changed bookmarks |
|
586 | 586 | no changed bookmarks found |
|
587 | 587 | [1] |
|
588 | 588 | $ hg -R repo1 outgoing -B |
|
589 | 589 | comparing with $TESTTMP/bmcomparison/source |
|
590 | 590 | searching for changed bookmarks |
|
591 | 591 | no changed bookmarks found |
|
592 | 592 | [1] |
|
593 | 593 | |
|
594 | 594 | $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1 |
|
595 | 595 | $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1 |
|
596 | 596 | $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1 |
|
597 | 597 | $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED |
|
598 | 598 | $ hg -R repo1 -q --config extensions.mq= strip 4 |
|
599 | 599 | $ hg -R repo1 log -G --template '{node|short} ({bookmarks})' |
|
600 | 600 | o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED) |
|
601 | 601 | | |
|
602 | 602 | | o fa942426a6fd (ADV_ON_REPO1) |
|
603 | 603 | |/ |
|
604 | 604 | | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED) |
|
605 | 605 | |/ |
|
606 | 606 | o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME) |
|
607 | 607 | |
|
608 | 608 | |
|
609 | 609 | $ hg clone -U source repo2 |
|
610 | 610 | $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2 |
|
611 | 611 | $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2 |
|
612 | 612 | $ hg -R repo2 bookmarks -f -r 2 DIVERGED |
|
613 | 613 | $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2 |
|
614 | 614 | $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED |
|
615 | 615 | $ hg -R repo2 -q --config extensions.mq= strip 3 |
|
616 | 616 | $ hg -R repo2 log -G --template '{node|short} ({bookmarks})' |
|
617 | 617 | o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED) |
|
618 | 618 | | |
|
619 | 619 | | o fa942426a6fd (DIVERGED) |
|
620 | 620 | |/ |
|
621 | 621 | | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2) |
|
622 | 622 | |/ |
|
623 | 623 | o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME) |
|
624 | 624 | |
|
625 | 625 | |
|
626 | 626 | (test that difference of bookmarks between repositories are fully shown) |
|
627 | 627 | |
|
628 | 628 | $ hg -R repo1 incoming -B repo2 -v |
|
629 | 629 | comparing with repo2 |
|
630 | 630 | searching for changed bookmarks |
|
631 | 631 | ADD_ON_REPO2 66f7d451a68b added |
|
632 | 632 | ADV_ON_REPO2 66f7d451a68b advanced |
|
633 | 633 | DIFF_ADV_ON_REPO2 e7bd5218ca15 changed |
|
634 | 634 | DIFF_DIVERGED e7bd5218ca15 changed |
|
635 | 635 | DIVERGED fa942426a6fd diverged |
|
636 | 636 | $ hg -R repo1 outgoing -B repo2 -v |
|
637 | 637 | comparing with repo2 |
|
638 | 638 | searching for changed bookmarks |
|
639 | 639 | ADD_ON_REPO1 66f7d451a68b added |
|
640 | 640 | ADD_ON_REPO2 deleted |
|
641 | 641 | ADV_ON_REPO1 fa942426a6fd advanced |
|
642 | 642 | DIFF_ADV_ON_REPO1 6100d3090acf advanced |
|
643 | 643 | DIFF_ADV_ON_REPO2 1ea73414a91b changed |
|
644 | 644 | DIFF_DIVERGED 6100d3090acf changed |
|
645 | 645 | DIVERGED 66f7d451a68b diverged |
|
646 | 646 | |
|
647 | 647 | $ hg -R repo2 incoming -B repo1 -v |
|
648 | 648 | comparing with repo1 |
|
649 | 649 | searching for changed bookmarks |
|
650 | 650 | ADD_ON_REPO1 66f7d451a68b added |
|
651 | 651 | ADV_ON_REPO1 fa942426a6fd advanced |
|
652 | 652 | DIFF_ADV_ON_REPO1 6100d3090acf changed |
|
653 | 653 | DIFF_DIVERGED 6100d3090acf changed |
|
654 | 654 | DIVERGED 66f7d451a68b diverged |
|
655 | 655 | $ hg -R repo2 outgoing -B repo1 -v |
|
656 | 656 | comparing with repo1 |
|
657 | 657 | searching for changed bookmarks |
|
658 | 658 | ADD_ON_REPO1 deleted |
|
659 | 659 | ADD_ON_REPO2 66f7d451a68b added |
|
660 | 660 | ADV_ON_REPO2 66f7d451a68b advanced |
|
661 | 661 | DIFF_ADV_ON_REPO1 1ea73414a91b changed |
|
662 | 662 | DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced |
|
663 | 663 | DIFF_DIVERGED e7bd5218ca15 changed |
|
664 | 664 | DIVERGED fa942426a6fd diverged |
|
665 | 665 | |
|
666 | 666 | $ cd .. |
|
667 | 667 | |
|
668 | 668 | Pushing a bookmark should only push the changes required by that |
|
669 | 669 | bookmark, not all outgoing changes: |
|
670 | 670 | $ hg clone http://localhost:$HGPORT/ addmarks |
|
671 | 671 | requesting all changes |
|
672 | 672 | adding changesets |
|
673 | 673 | adding manifests |
|
674 | 674 | adding file changes |
|
675 | 675 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
676 | 676 | 2 new obsolescence markers |
|
677 | 677 | updating to bookmark @ |
|
678 | 678 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
679 | 679 | $ cd addmarks |
|
680 | 680 | $ echo foo > foo |
|
681 | 681 | $ hg add foo |
|
682 | 682 | $ hg commit -m 'add foo' |
|
683 | 683 | $ echo bar > bar |
|
684 | 684 | $ hg add bar |
|
685 | 685 | $ hg commit -m 'add bar' |
|
686 | 686 | $ hg co "tip^" |
|
687 | 687 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
688 | 688 | (leaving bookmark @) |
|
689 | 689 | $ hg book add-foo |
|
690 | 690 | $ hg book -r tip add-bar |
|
691 | 691 | Note: this push *must* push only a single changeset, as that's the point |
|
692 | 692 | of this test. |
|
693 | 693 | $ hg push -B add-foo --traceback |
|
694 | 694 | pushing to http://localhost:$HGPORT/ |
|
695 | 695 | searching for changes |
|
696 | 696 | remote: adding changesets |
|
697 | 697 | remote: adding manifests |
|
698 | 698 | remote: adding file changes |
|
699 | 699 | remote: added 1 changesets with 1 changes to 1 files |
|
700 | 700 | exporting bookmark add-foo |
|
701 | 701 | |
|
702 | 702 | pushing a new bookmark on a new head does not require -f if -B is specified |
|
703 | 703 | |
|
704 | 704 | $ hg up -q X |
|
705 | 705 | $ hg book W |
|
706 | 706 | $ echo c5 > f2 |
|
707 | 707 | $ hg ci -Am5 |
|
708 | 708 | created new head |
|
709 | 709 | $ hg push -B . |
|
710 | 710 | pushing to http://localhost:$HGPORT/ |
|
711 | 711 | searching for changes |
|
712 | 712 | remote: adding changesets |
|
713 | 713 | remote: adding manifests |
|
714 | 714 | remote: adding file changes |
|
715 | 715 | remote: added 1 changesets with 1 changes to 1 files (+1 heads) |
|
716 | 716 | exporting bookmark W |
|
717 | 717 | $ hg -R ../b id -r W |
|
718 | 718 | cc978a373a53 tip W |
|
719 | 719 | |
|
720 | 720 | pushing an existing but divergent bookmark with -B still requires -f |
|
721 | 721 | |
|
722 | 722 | $ hg clone -q . ../r |
|
723 | 723 | $ hg up -q X |
|
724 | 724 | $ echo 1 > f2 |
|
725 | 725 | $ hg ci -qAml |
|
726 | 726 | |
|
727 | 727 | $ cd ../r |
|
728 | 728 | $ hg up -q X |
|
729 | 729 | $ echo 2 > f2 |
|
730 | 730 | $ hg ci -qAmr |
|
731 | 731 | $ hg push -B X |
|
732 | 732 | pushing to $TESTTMP/addmarks (glob) |
|
733 | 733 | searching for changes |
|
734 | 734 | remote has heads on branch 'default' that are not known locally: a2a606d9ff1b |
|
735 | 735 | abort: push creates new remote head 54694f811df9 with bookmark 'X'! |
|
736 | 736 | (pull and merge or see "hg help push" for details about pushing new heads) |
|
737 | 737 | [255] |
|
738 | 738 | $ cd ../addmarks |
|
739 | 739 | |
|
740 | 740 | Check summary output for incoming/outgoing bookmarks |
|
741 | 741 | |
|
742 | 742 | $ hg bookmarks -d X |
|
743 | 743 | $ hg bookmarks -d Y |
|
744 | 744 | $ hg summary --remote | grep '^remote:' |
|
745 | 745 | remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob) |
|
746 | 746 | |
|
747 | 747 | $ cd .. |
|
748 | 748 | |
|
749 | 749 | pushing an unchanged bookmark should result in no changes |
|
750 | 750 | |
|
751 | 751 | $ hg init unchanged-a |
|
752 | 752 | $ hg init unchanged-b |
|
753 | 753 | $ cd unchanged-a |
|
754 | 754 | $ echo initial > foo |
|
755 | 755 | $ hg commit -A -m initial |
|
756 | 756 | adding foo |
|
757 | 757 | $ hg bookmark @ |
|
758 | 758 | $ hg push -B @ ../unchanged-b |
|
759 | 759 | pushing to ../unchanged-b |
|
760 | 760 | searching for changes |
|
761 | 761 | adding changesets |
|
762 | 762 | adding manifests |
|
763 | 763 | adding file changes |
|
764 | 764 | added 1 changesets with 1 changes to 1 files |
|
765 | 765 | exporting bookmark @ |
|
766 | 766 | |
|
767 | 767 | $ hg push -B @ ../unchanged-b |
|
768 | 768 | pushing to ../unchanged-b |
|
769 | 769 | searching for changes |
|
770 | 770 | no changes found |
|
771 | 771 | [1] |
|
772 | 772 | |
|
773 | 773 | |
|
774 | 774 | Check hook preventing push (issue4455) |
|
775 | 775 | ====================================== |
|
776 | 776 | |
|
777 | 777 | $ hg bookmarks |
|
778 | 778 | * @ 0:55482a6fb4b1 |
|
779 | 779 | $ hg log -G |
|
780 | 780 | @ 0:55482a6fb4b1 initial |
|
781 | 781 | |
|
782 | 782 | $ hg init ../issue4455-dest |
|
783 | 783 | $ hg push ../issue4455-dest # changesets only |
|
784 | 784 | pushing to ../issue4455-dest |
|
785 | 785 | searching for changes |
|
786 | 786 | adding changesets |
|
787 | 787 | adding manifests |
|
788 | 788 | adding file changes |
|
789 | 789 | added 1 changesets with 1 changes to 1 files |
|
790 | 790 | $ cat >> .hg/hgrc << EOF |
|
791 | 791 | > [paths] |
|
792 | 792 | > local=../issue4455-dest/ |
|
793 | 793 | > ssh=ssh://user@dummy/issue4455-dest |
|
794 | 794 | > http=http://localhost:$HGPORT/ |
|
795 | 795 | > [ui] |
|
796 | 796 | > ssh=python "$TESTDIR/dummyssh" |
|
797 | 797 | > EOF |
|
798 | 798 | $ cat >> ../issue4455-dest/.hg/hgrc << EOF |
|
799 | 799 | > [hooks] |
|
800 | 800 | > prepushkey=false |
|
801 | 801 | > [web] |
|
802 | 802 | > push_ssl = false |
|
803 | 803 | > allow_push = * |
|
804 | 804 | > EOF |
|
805 | 805 | $ killdaemons.py |
|
806 | 806 | $ hg serve -R ../issue4455-dest -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log |
|
807 | 807 | $ cat ../issue4455.pid >> $DAEMON_PIDS |
|
808 | 808 | |
|
809 | 809 | Local push |
|
810 | 810 | ---------- |
|
811 | 811 | |
|
812 | 812 | $ hg push -B @ local |
|
813 | 813 | pushing to $TESTTMP/issue4455-dest (glob) |
|
814 | 814 | searching for changes |
|
815 | 815 | no changes found |
|
816 | 816 | pushkey-abort: prepushkey hook exited with status 1 |
|
817 | 817 | abort: exporting bookmark @ failed! |
|
818 | 818 | [255] |
|
819 | 819 | $ hg -R ../issue4455-dest/ bookmarks |
|
820 | 820 | no bookmarks set |
|
821 | 821 | |
|
822 | 822 | Using ssh |
|
823 | 823 | --------- |
|
824 | 824 | |
|
825 | 825 | $ hg push -B @ ssh --config experimental.bundle2-exp=True |
|
826 | 826 | pushing to ssh://user@dummy/issue4455-dest |
|
827 | 827 | searching for changes |
|
828 | 828 | no changes found |
|
829 | 829 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
830 | 830 | abort: exporting bookmark @ failed! |
|
831 | 831 | [255] |
|
832 | 832 | $ hg -R ../issue4455-dest/ bookmarks |
|
833 | 833 | no bookmarks set |
|
834 | 834 | |
|
835 |
$ hg push -B @ ssh --config |
|
|
835 | $ hg push -B @ ssh --config devel.legacy.exchange=bundle1 | |
|
836 | 836 | pushing to ssh://user@dummy/issue4455-dest |
|
837 | 837 | searching for changes |
|
838 | 838 | no changes found |
|
839 | 839 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
840 | 840 | exporting bookmark @ failed! |
|
841 | 841 | [1] |
|
842 | 842 | $ hg -R ../issue4455-dest/ bookmarks |
|
843 | 843 | no bookmarks set |
|
844 | 844 | |
|
845 | 845 | Using http |
|
846 | 846 | ---------- |
|
847 | 847 | |
|
848 | 848 | $ hg push -B @ http --config experimental.bundle2-exp=True |
|
849 | 849 | pushing to http://localhost:$HGPORT/ |
|
850 | 850 | searching for changes |
|
851 | 851 | no changes found |
|
852 | 852 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
853 | 853 | abort: exporting bookmark @ failed! |
|
854 | 854 | [255] |
|
855 | 855 | $ hg -R ../issue4455-dest/ bookmarks |
|
856 | 856 | no bookmarks set |
|
857 | 857 | |
|
858 |
$ hg push -B @ http --config |
|
|
858 | $ hg push -B @ http --config devel.legacy.exchange=bundle1 | |
|
859 | 859 | pushing to http://localhost:$HGPORT/ |
|
860 | 860 | searching for changes |
|
861 | 861 | no changes found |
|
862 | 862 | remote: pushkey-abort: prepushkey hook exited with status 1 |
|
863 | 863 | exporting bookmark @ failed! |
|
864 | 864 | [1] |
|
865 | 865 | $ hg -R ../issue4455-dest/ bookmarks |
|
866 | 866 | no bookmarks set |
@@ -1,1191 +1,1191 b'' | |||
|
1 | 1 | #require killdaemons |
|
2 | 2 | |
|
3 | 3 | $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } |
|
4 | 4 | |
|
5 | 5 | $ mkcommit() { |
|
6 | 6 | > echo "$1" > "$1" |
|
7 | 7 | > hg add "$1" |
|
8 | 8 | > message="$1" |
|
9 | 9 | > shift |
|
10 | 10 | > hg ci -m "$message" $* |
|
11 | 11 | > } |
|
12 | 12 | |
|
13 | 13 | $ hg init alpha |
|
14 | 14 | $ cd alpha |
|
15 | 15 | $ mkcommit a-A |
|
16 | 16 | $ mkcommit a-B |
|
17 | 17 | $ mkcommit a-C |
|
18 | 18 | $ mkcommit a-D |
|
19 | 19 | $ hgph |
|
20 | 20 | @ 3 draft a-D - b555f63b6063 |
|
21 | 21 | | |
|
22 | 22 | o 2 draft a-C - 54acac6f23ab |
|
23 | 23 | | |
|
24 | 24 | o 1 draft a-B - 548a3d25dbf0 |
|
25 | 25 | | |
|
26 | 26 | o 0 draft a-A - 054250a37db4 |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | $ hg init ../beta |
|
30 | 30 | $ hg push -r 1 ../beta |
|
31 | 31 | pushing to ../beta |
|
32 | 32 | searching for changes |
|
33 | 33 | adding changesets |
|
34 | 34 | adding manifests |
|
35 | 35 | adding file changes |
|
36 | 36 | added 2 changesets with 2 changes to 2 files |
|
37 | 37 | $ hgph |
|
38 | 38 | @ 3 draft a-D - b555f63b6063 |
|
39 | 39 | | |
|
40 | 40 | o 2 draft a-C - 54acac6f23ab |
|
41 | 41 | | |
|
42 | 42 | o 1 public a-B - 548a3d25dbf0 |
|
43 | 43 | | |
|
44 | 44 | o 0 public a-A - 054250a37db4 |
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | $ cd ../beta |
|
48 | 48 | $ hgph |
|
49 | 49 | o 1 public a-B - 548a3d25dbf0 |
|
50 | 50 | | |
|
51 | 51 | o 0 public a-A - 054250a37db4 |
|
52 | 52 | |
|
53 | 53 | $ hg up -q |
|
54 | 54 | $ mkcommit b-A |
|
55 | 55 | $ hgph |
|
56 | 56 | @ 2 draft b-A - f54f1bb90ff3 |
|
57 | 57 | | |
|
58 | 58 | o 1 public a-B - 548a3d25dbf0 |
|
59 | 59 | | |
|
60 | 60 | o 0 public a-A - 054250a37db4 |
|
61 | 61 | |
|
62 | 62 | $ hg pull ../alpha |
|
63 | 63 | pulling from ../alpha |
|
64 | 64 | searching for changes |
|
65 | 65 | adding changesets |
|
66 | 66 | adding manifests |
|
67 | 67 | adding file changes |
|
68 | 68 | added 2 changesets with 2 changes to 2 files (+1 heads) |
|
69 | 69 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
70 | 70 | $ hgph |
|
71 | 71 | o 4 public a-D - b555f63b6063 |
|
72 | 72 | | |
|
73 | 73 | o 3 public a-C - 54acac6f23ab |
|
74 | 74 | | |
|
75 | 75 | | @ 2 draft b-A - f54f1bb90ff3 |
|
76 | 76 | |/ |
|
77 | 77 | o 1 public a-B - 548a3d25dbf0 |
|
78 | 78 | | |
|
79 | 79 | o 0 public a-A - 054250a37db4 |
|
80 | 80 | |
|
81 | 81 | |
|
82 | 82 | pull did not updated ../alpha state. |
|
83 | 83 | push from alpha to beta should update phase even if nothing is transferred |
|
84 | 84 | |
|
85 | 85 | $ cd ../alpha |
|
86 | 86 | $ hgph # not updated by remote pull |
|
87 | 87 | @ 3 draft a-D - b555f63b6063 |
|
88 | 88 | | |
|
89 | 89 | o 2 draft a-C - 54acac6f23ab |
|
90 | 90 | | |
|
91 | 91 | o 1 public a-B - 548a3d25dbf0 |
|
92 | 92 | | |
|
93 | 93 | o 0 public a-A - 054250a37db4 |
|
94 | 94 | |
|
95 | 95 | $ hg push -r 2 ../beta |
|
96 | 96 | pushing to ../beta |
|
97 | 97 | searching for changes |
|
98 | 98 | no changes found |
|
99 | 99 | [1] |
|
100 | 100 | $ hgph |
|
101 | 101 | @ 3 draft a-D - b555f63b6063 |
|
102 | 102 | | |
|
103 | 103 | o 2 public a-C - 54acac6f23ab |
|
104 | 104 | | |
|
105 | 105 | o 1 public a-B - 548a3d25dbf0 |
|
106 | 106 | | |
|
107 | 107 | o 0 public a-A - 054250a37db4 |
|
108 | 108 | |
|
109 | 109 | $ hg push ../beta |
|
110 | 110 | pushing to ../beta |
|
111 | 111 | searching for changes |
|
112 | 112 | no changes found |
|
113 | 113 | [1] |
|
114 | 114 | $ hgph |
|
115 | 115 | @ 3 public a-D - b555f63b6063 |
|
116 | 116 | | |
|
117 | 117 | o 2 public a-C - 54acac6f23ab |
|
118 | 118 | | |
|
119 | 119 | o 1 public a-B - 548a3d25dbf0 |
|
120 | 120 | | |
|
121 | 121 | o 0 public a-A - 054250a37db4 |
|
122 | 122 | |
|
123 | 123 | |
|
124 | 124 | update must update phase of common changeset too |
|
125 | 125 | |
|
126 | 126 | $ hg pull ../beta # getting b-A |
|
127 | 127 | pulling from ../beta |
|
128 | 128 | searching for changes |
|
129 | 129 | adding changesets |
|
130 | 130 | adding manifests |
|
131 | 131 | adding file changes |
|
132 | 132 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
133 | 133 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
134 | 134 | |
|
135 | 135 | $ cd ../beta |
|
136 | 136 | $ hgph # not updated by remote pull |
|
137 | 137 | o 4 public a-D - b555f63b6063 |
|
138 | 138 | | |
|
139 | 139 | o 3 public a-C - 54acac6f23ab |
|
140 | 140 | | |
|
141 | 141 | | @ 2 draft b-A - f54f1bb90ff3 |
|
142 | 142 | |/ |
|
143 | 143 | o 1 public a-B - 548a3d25dbf0 |
|
144 | 144 | | |
|
145 | 145 | o 0 public a-A - 054250a37db4 |
|
146 | 146 | |
|
147 | 147 | $ hg pull ../alpha |
|
148 | 148 | pulling from ../alpha |
|
149 | 149 | searching for changes |
|
150 | 150 | no changes found |
|
151 | 151 | $ hgph |
|
152 | 152 | o 4 public a-D - b555f63b6063 |
|
153 | 153 | | |
|
154 | 154 | o 3 public a-C - 54acac6f23ab |
|
155 | 155 | | |
|
156 | 156 | | @ 2 public b-A - f54f1bb90ff3 |
|
157 | 157 | |/ |
|
158 | 158 | o 1 public a-B - 548a3d25dbf0 |
|
159 | 159 | | |
|
160 | 160 | o 0 public a-A - 054250a37db4 |
|
161 | 161 | |
|
162 | 162 | |
|
163 | 163 | Publish configuration option |
|
164 | 164 | ---------------------------- |
|
165 | 165 | |
|
166 | 166 | Pull |
|
167 | 167 | ```` |
|
168 | 168 | |
|
169 | 169 | changegroup are added without phase movement |
|
170 | 170 | |
|
171 | 171 | $ hg bundle -a ../base.bundle |
|
172 | 172 | 5 changesets found |
|
173 | 173 | $ cd .. |
|
174 | 174 | $ hg init mu |
|
175 | 175 | $ cd mu |
|
176 | 176 | $ cat > .hg/hgrc << EOF |
|
177 | 177 | > [phases] |
|
178 | 178 | > publish=0 |
|
179 | 179 | > EOF |
|
180 | 180 | $ hg unbundle ../base.bundle |
|
181 | 181 | adding changesets |
|
182 | 182 | adding manifests |
|
183 | 183 | adding file changes |
|
184 | 184 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
185 | 185 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
186 | 186 | $ hgph |
|
187 | 187 | o 4 draft a-D - b555f63b6063 |
|
188 | 188 | | |
|
189 | 189 | o 3 draft a-C - 54acac6f23ab |
|
190 | 190 | | |
|
191 | 191 | | o 2 draft b-A - f54f1bb90ff3 |
|
192 | 192 | |/ |
|
193 | 193 | o 1 draft a-B - 548a3d25dbf0 |
|
194 | 194 | | |
|
195 | 195 | o 0 draft a-A - 054250a37db4 |
|
196 | 196 | |
|
197 | 197 | $ cd .. |
|
198 | 198 | |
|
199 | 199 | Pulling from publish=False to publish=False does not move boundary. |
|
200 | 200 | |
|
201 | 201 | $ hg init nu |
|
202 | 202 | $ cd nu |
|
203 | 203 | $ cat > .hg/hgrc << EOF |
|
204 | 204 | > [phases] |
|
205 | 205 | > publish=0 |
|
206 | 206 | > EOF |
|
207 | 207 | $ hg pull ../mu -r 54acac6f23ab |
|
208 | 208 | pulling from ../mu |
|
209 | 209 | adding changesets |
|
210 | 210 | adding manifests |
|
211 | 211 | adding file changes |
|
212 | 212 | added 3 changesets with 3 changes to 3 files |
|
213 | 213 | (run 'hg update' to get a working copy) |
|
214 | 214 | $ hgph |
|
215 | 215 | o 2 draft a-C - 54acac6f23ab |
|
216 | 216 | | |
|
217 | 217 | o 1 draft a-B - 548a3d25dbf0 |
|
218 | 218 | | |
|
219 | 219 | o 0 draft a-A - 054250a37db4 |
|
220 | 220 | |
|
221 | 221 | |
|
222 | 222 | Even for common |
|
223 | 223 | |
|
224 | 224 | $ hg pull ../mu -r f54f1bb90ff3 |
|
225 | 225 | pulling from ../mu |
|
226 | 226 | searching for changes |
|
227 | 227 | adding changesets |
|
228 | 228 | adding manifests |
|
229 | 229 | adding file changes |
|
230 | 230 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
231 | 231 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
232 | 232 | $ hgph |
|
233 | 233 | o 3 draft b-A - f54f1bb90ff3 |
|
234 | 234 | | |
|
235 | 235 | | o 2 draft a-C - 54acac6f23ab |
|
236 | 236 | |/ |
|
237 | 237 | o 1 draft a-B - 548a3d25dbf0 |
|
238 | 238 | | |
|
239 | 239 | o 0 draft a-A - 054250a37db4 |
|
240 | 240 | |
|
241 | 241 | |
|
242 | 242 | |
|
243 | 243 | Pulling from Publish=True to Publish=False move boundary in common set. |
|
244 | 244 | we are in nu |
|
245 | 245 | |
|
246 | 246 | $ hg pull ../alpha -r b555f63b6063 |
|
247 | 247 | pulling from ../alpha |
|
248 | 248 | searching for changes |
|
249 | 249 | adding changesets |
|
250 | 250 | adding manifests |
|
251 | 251 | adding file changes |
|
252 | 252 | added 1 changesets with 1 changes to 1 files |
|
253 | 253 | (run 'hg update' to get a working copy) |
|
254 | 254 | $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r |
|
255 | 255 | o 4 public a-D - b555f63b6063 |
|
256 | 256 | | |
|
257 | 257 | | o 3 draft b-A - f54f1bb90ff3 |
|
258 | 258 | | | |
|
259 | 259 | o | 2 public a-C - 54acac6f23ab |
|
260 | 260 | |/ |
|
261 | 261 | o 1 public a-B - 548a3d25dbf0 |
|
262 | 262 | | |
|
263 | 263 | o 0 public a-A - 054250a37db4 |
|
264 | 264 | |
|
265 | 265 | |
|
266 | 266 | pulling from Publish=False to publish=False with some public |
|
267 | 267 | |
|
268 | 268 | $ hg up -q f54f1bb90ff3 |
|
269 | 269 | $ mkcommit n-A |
|
270 | 270 | $ mkcommit n-B |
|
271 | 271 | $ hgph |
|
272 | 272 | @ 6 draft n-B - 145e75495359 |
|
273 | 273 | | |
|
274 | 274 | o 5 draft n-A - d6bcb4f74035 |
|
275 | 275 | | |
|
276 | 276 | | o 4 public a-D - b555f63b6063 |
|
277 | 277 | | | |
|
278 | 278 | o | 3 draft b-A - f54f1bb90ff3 |
|
279 | 279 | | | |
|
280 | 280 | | o 2 public a-C - 54acac6f23ab |
|
281 | 281 | |/ |
|
282 | 282 | o 1 public a-B - 548a3d25dbf0 |
|
283 | 283 | | |
|
284 | 284 | o 0 public a-A - 054250a37db4 |
|
285 | 285 | |
|
286 | 286 | $ cd ../mu |
|
287 | 287 | $ hg pull ../nu |
|
288 | 288 | pulling from ../nu |
|
289 | 289 | searching for changes |
|
290 | 290 | adding changesets |
|
291 | 291 | adding manifests |
|
292 | 292 | adding file changes |
|
293 | 293 | added 2 changesets with 2 changes to 2 files |
|
294 | 294 | (run 'hg update' to get a working copy) |
|
295 | 295 | $ hgph |
|
296 | 296 | o 6 draft n-B - 145e75495359 |
|
297 | 297 | | |
|
298 | 298 | o 5 draft n-A - d6bcb4f74035 |
|
299 | 299 | | |
|
300 | 300 | | o 4 public a-D - b555f63b6063 |
|
301 | 301 | | | |
|
302 | 302 | | o 3 public a-C - 54acac6f23ab |
|
303 | 303 | | | |
|
304 | 304 | o | 2 draft b-A - f54f1bb90ff3 |
|
305 | 305 | |/ |
|
306 | 306 | o 1 public a-B - 548a3d25dbf0 |
|
307 | 307 | | |
|
308 | 308 | o 0 public a-A - 054250a37db4 |
|
309 | 309 | |
|
310 | 310 | $ cd .. |
|
311 | 311 | |
|
312 | 312 | pulling into publish=True |
|
313 | 313 | |
|
314 | 314 | $ cd alpha |
|
315 | 315 | $ hgph |
|
316 | 316 | o 4 public b-A - f54f1bb90ff3 |
|
317 | 317 | | |
|
318 | 318 | | @ 3 public a-D - b555f63b6063 |
|
319 | 319 | | | |
|
320 | 320 | | o 2 public a-C - 54acac6f23ab |
|
321 | 321 | |/ |
|
322 | 322 | o 1 public a-B - 548a3d25dbf0 |
|
323 | 323 | | |
|
324 | 324 | o 0 public a-A - 054250a37db4 |
|
325 | 325 | |
|
326 | 326 | $ hg pull ../mu |
|
327 | 327 | pulling from ../mu |
|
328 | 328 | searching for changes |
|
329 | 329 | adding changesets |
|
330 | 330 | adding manifests |
|
331 | 331 | adding file changes |
|
332 | 332 | added 2 changesets with 2 changes to 2 files |
|
333 | 333 | (run 'hg update' to get a working copy) |
|
334 | 334 | $ hgph |
|
335 | 335 | o 6 draft n-B - 145e75495359 |
|
336 | 336 | | |
|
337 | 337 | o 5 draft n-A - d6bcb4f74035 |
|
338 | 338 | | |
|
339 | 339 | o 4 public b-A - f54f1bb90ff3 |
|
340 | 340 | | |
|
341 | 341 | | @ 3 public a-D - b555f63b6063 |
|
342 | 342 | | | |
|
343 | 343 | | o 2 public a-C - 54acac6f23ab |
|
344 | 344 | |/ |
|
345 | 345 | o 1 public a-B - 548a3d25dbf0 |
|
346 | 346 | | |
|
347 | 347 | o 0 public a-A - 054250a37db4 |
|
348 | 348 | |
|
349 | 349 | $ cd .. |
|
350 | 350 | |
|
351 | 351 | pulling back into original repo |
|
352 | 352 | |
|
353 | 353 | $ cd nu |
|
354 | 354 | $ hg pull ../alpha |
|
355 | 355 | pulling from ../alpha |
|
356 | 356 | searching for changes |
|
357 | 357 | no changes found |
|
358 | 358 | $ hgph |
|
359 | 359 | @ 6 public n-B - 145e75495359 |
|
360 | 360 | | |
|
361 | 361 | o 5 public n-A - d6bcb4f74035 |
|
362 | 362 | | |
|
363 | 363 | | o 4 public a-D - b555f63b6063 |
|
364 | 364 | | | |
|
365 | 365 | o | 3 public b-A - f54f1bb90ff3 |
|
366 | 366 | | | |
|
367 | 367 | | o 2 public a-C - 54acac6f23ab |
|
368 | 368 | |/ |
|
369 | 369 | o 1 public a-B - 548a3d25dbf0 |
|
370 | 370 | | |
|
371 | 371 | o 0 public a-A - 054250a37db4 |
|
372 | 372 | |
|
373 | 373 | |
|
374 | 374 | Push |
|
375 | 375 | ```` |
|
376 | 376 | |
|
377 | 377 | (inserted) |
|
378 | 378 | |
|
379 | 379 | Test that phase are pushed even when they are nothing to pus |
|
380 | 380 | (this might be tested later bu are very convenient to not alter too much test) |
|
381 | 381 | |
|
382 | 382 | Push back to alpha |
|
383 | 383 | |
|
384 | 384 | $ hg push ../alpha # from nu |
|
385 | 385 | pushing to ../alpha |
|
386 | 386 | searching for changes |
|
387 | 387 | no changes found |
|
388 | 388 | [1] |
|
389 | 389 | $ cd .. |
|
390 | 390 | $ cd alpha |
|
391 | 391 | $ hgph |
|
392 | 392 | o 6 public n-B - 145e75495359 |
|
393 | 393 | | |
|
394 | 394 | o 5 public n-A - d6bcb4f74035 |
|
395 | 395 | | |
|
396 | 396 | o 4 public b-A - f54f1bb90ff3 |
|
397 | 397 | | |
|
398 | 398 | | @ 3 public a-D - b555f63b6063 |
|
399 | 399 | | | |
|
400 | 400 | | o 2 public a-C - 54acac6f23ab |
|
401 | 401 | |/ |
|
402 | 402 | o 1 public a-B - 548a3d25dbf0 |
|
403 | 403 | | |
|
404 | 404 | o 0 public a-A - 054250a37db4 |
|
405 | 405 | |
|
406 | 406 | |
|
407 | 407 | (end insertion) |
|
408 | 408 | |
|
409 | 409 | |
|
410 | 410 | initial setup |
|
411 | 411 | |
|
412 | 412 | $ hg log -G # of alpha |
|
413 | 413 | o changeset: 6:145e75495359 |
|
414 | 414 | | tag: tip |
|
415 | 415 | | user: test |
|
416 | 416 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
417 | 417 | | summary: n-B |
|
418 | 418 | | |
|
419 | 419 | o changeset: 5:d6bcb4f74035 |
|
420 | 420 | | user: test |
|
421 | 421 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | 422 | | summary: n-A |
|
423 | 423 | | |
|
424 | 424 | o changeset: 4:f54f1bb90ff3 |
|
425 | 425 | | parent: 1:548a3d25dbf0 |
|
426 | 426 | | user: test |
|
427 | 427 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
428 | 428 | | summary: b-A |
|
429 | 429 | | |
|
430 | 430 | | @ changeset: 3:b555f63b6063 |
|
431 | 431 | | | user: test |
|
432 | 432 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
433 | 433 | | | summary: a-D |
|
434 | 434 | | | |
|
435 | 435 | | o changeset: 2:54acac6f23ab |
|
436 | 436 | |/ user: test |
|
437 | 437 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
438 | 438 | | summary: a-C |
|
439 | 439 | | |
|
440 | 440 | o changeset: 1:548a3d25dbf0 |
|
441 | 441 | | user: test |
|
442 | 442 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
443 | 443 | | summary: a-B |
|
444 | 444 | | |
|
445 | 445 | o changeset: 0:054250a37db4 |
|
446 | 446 | user: test |
|
447 | 447 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
448 | 448 | summary: a-A |
|
449 | 449 | |
|
450 | 450 | $ mkcommit a-E |
|
451 | 451 | $ mkcommit a-F |
|
452 | 452 | $ mkcommit a-G |
|
453 | 453 | $ hg up d6bcb4f74035 -q |
|
454 | 454 | $ mkcommit a-H |
|
455 | 455 | created new head |
|
456 | 456 | $ hgph |
|
457 | 457 | @ 10 draft a-H - 967b449fbc94 |
|
458 | 458 | | |
|
459 | 459 | | o 9 draft a-G - 3e27b6f1eee1 |
|
460 | 460 | | | |
|
461 | 461 | | o 8 draft a-F - b740e3e5c05d |
|
462 | 462 | | | |
|
463 | 463 | | o 7 draft a-E - e9f537e46dea |
|
464 | 464 | | | |
|
465 | 465 | +---o 6 public n-B - 145e75495359 |
|
466 | 466 | | | |
|
467 | 467 | o | 5 public n-A - d6bcb4f74035 |
|
468 | 468 | | | |
|
469 | 469 | o | 4 public b-A - f54f1bb90ff3 |
|
470 | 470 | | | |
|
471 | 471 | | o 3 public a-D - b555f63b6063 |
|
472 | 472 | | | |
|
473 | 473 | | o 2 public a-C - 54acac6f23ab |
|
474 | 474 | |/ |
|
475 | 475 | o 1 public a-B - 548a3d25dbf0 |
|
476 | 476 | | |
|
477 | 477 | o 0 public a-A - 054250a37db4 |
|
478 | 478 | |
|
479 | 479 | |
|
480 | 480 | Pulling from bundle does not alter phases of changeset not present in the bundle |
|
481 | 481 | |
|
482 | 482 | $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg |
|
483 | 483 | 5 changesets found |
|
484 | 484 | $ hg pull ../partial-bundle.hg |
|
485 | 485 | pulling from ../partial-bundle.hg |
|
486 | 486 | searching for changes |
|
487 | 487 | no changes found |
|
488 | 488 | $ hgph |
|
489 | 489 | @ 10 draft a-H - 967b449fbc94 |
|
490 | 490 | | |
|
491 | 491 | | o 9 draft a-G - 3e27b6f1eee1 |
|
492 | 492 | | | |
|
493 | 493 | | o 8 draft a-F - b740e3e5c05d |
|
494 | 494 | | | |
|
495 | 495 | | o 7 draft a-E - e9f537e46dea |
|
496 | 496 | | | |
|
497 | 497 | +---o 6 public n-B - 145e75495359 |
|
498 | 498 | | | |
|
499 | 499 | o | 5 public n-A - d6bcb4f74035 |
|
500 | 500 | | | |
|
501 | 501 | o | 4 public b-A - f54f1bb90ff3 |
|
502 | 502 | | | |
|
503 | 503 | | o 3 public a-D - b555f63b6063 |
|
504 | 504 | | | |
|
505 | 505 | | o 2 public a-C - 54acac6f23ab |
|
506 | 506 | |/ |
|
507 | 507 | o 1 public a-B - 548a3d25dbf0 |
|
508 | 508 | | |
|
509 | 509 | o 0 public a-A - 054250a37db4 |
|
510 | 510 | |
|
511 | 511 | |
|
512 | 512 | Pushing to Publish=False (unknown changeset) |
|
513 | 513 | |
|
514 | 514 | $ hg push ../mu -r b740e3e5c05d # a-F |
|
515 | 515 | pushing to ../mu |
|
516 | 516 | searching for changes |
|
517 | 517 | adding changesets |
|
518 | 518 | adding manifests |
|
519 | 519 | adding file changes |
|
520 | 520 | added 2 changesets with 2 changes to 2 files |
|
521 | 521 | $ hgph |
|
522 | 522 | @ 10 draft a-H - 967b449fbc94 |
|
523 | 523 | | |
|
524 | 524 | | o 9 draft a-G - 3e27b6f1eee1 |
|
525 | 525 | | | |
|
526 | 526 | | o 8 draft a-F - b740e3e5c05d |
|
527 | 527 | | | |
|
528 | 528 | | o 7 draft a-E - e9f537e46dea |
|
529 | 529 | | | |
|
530 | 530 | +---o 6 public n-B - 145e75495359 |
|
531 | 531 | | | |
|
532 | 532 | o | 5 public n-A - d6bcb4f74035 |
|
533 | 533 | | | |
|
534 | 534 | o | 4 public b-A - f54f1bb90ff3 |
|
535 | 535 | | | |
|
536 | 536 | | o 3 public a-D - b555f63b6063 |
|
537 | 537 | | | |
|
538 | 538 | | o 2 public a-C - 54acac6f23ab |
|
539 | 539 | |/ |
|
540 | 540 | o 1 public a-B - 548a3d25dbf0 |
|
541 | 541 | | |
|
542 | 542 | o 0 public a-A - 054250a37db4 |
|
543 | 543 | |
|
544 | 544 | |
|
545 | 545 | $ cd ../mu |
|
546 | 546 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
547 | 547 | > # not ancestor of -r |
|
548 | 548 | o 8 draft a-F - b740e3e5c05d |
|
549 | 549 | | |
|
550 | 550 | o 7 draft a-E - e9f537e46dea |
|
551 | 551 | | |
|
552 | 552 | | o 6 draft n-B - 145e75495359 |
|
553 | 553 | | | |
|
554 | 554 | | o 5 draft n-A - d6bcb4f74035 |
|
555 | 555 | | | |
|
556 | 556 | o | 4 public a-D - b555f63b6063 |
|
557 | 557 | | | |
|
558 | 558 | o | 3 public a-C - 54acac6f23ab |
|
559 | 559 | | | |
|
560 | 560 | | o 2 draft b-A - f54f1bb90ff3 |
|
561 | 561 | |/ |
|
562 | 562 | o 1 public a-B - 548a3d25dbf0 |
|
563 | 563 | | |
|
564 | 564 | o 0 public a-A - 054250a37db4 |
|
565 | 565 | |
|
566 | 566 | |
|
567 | 567 | Pushing to Publish=True (unknown changeset) |
|
568 | 568 | |
|
569 | 569 | $ hg push ../beta -r b740e3e5c05d |
|
570 | 570 | pushing to ../beta |
|
571 | 571 | searching for changes |
|
572 | 572 | adding changesets |
|
573 | 573 | adding manifests |
|
574 | 574 | adding file changes |
|
575 | 575 | added 2 changesets with 2 changes to 2 files |
|
576 | 576 | $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft, |
|
577 | 577 | > # not ancestor of -r |
|
578 | 578 | o 8 public a-F - b740e3e5c05d |
|
579 | 579 | | |
|
580 | 580 | o 7 public a-E - e9f537e46dea |
|
581 | 581 | | |
|
582 | 582 | | o 6 draft n-B - 145e75495359 |
|
583 | 583 | | | |
|
584 | 584 | | o 5 draft n-A - d6bcb4f74035 |
|
585 | 585 | | | |
|
586 | 586 | o | 4 public a-D - b555f63b6063 |
|
587 | 587 | | | |
|
588 | 588 | o | 3 public a-C - 54acac6f23ab |
|
589 | 589 | | | |
|
590 | 590 | | o 2 draft b-A - f54f1bb90ff3 |
|
591 | 591 | |/ |
|
592 | 592 | o 1 public a-B - 548a3d25dbf0 |
|
593 | 593 | | |
|
594 | 594 | o 0 public a-A - 054250a37db4 |
|
595 | 595 | |
|
596 | 596 | |
|
597 | 597 | Pushing to Publish=True (common changeset) |
|
598 | 598 | |
|
599 | 599 | $ cd ../beta |
|
600 | 600 | $ hg push ../alpha |
|
601 | 601 | pushing to ../alpha |
|
602 | 602 | searching for changes |
|
603 | 603 | no changes found |
|
604 | 604 | [1] |
|
605 | 605 | $ hgph |
|
606 | 606 | o 6 public a-F - b740e3e5c05d |
|
607 | 607 | | |
|
608 | 608 | o 5 public a-E - e9f537e46dea |
|
609 | 609 | | |
|
610 | 610 | o 4 public a-D - b555f63b6063 |
|
611 | 611 | | |
|
612 | 612 | o 3 public a-C - 54acac6f23ab |
|
613 | 613 | | |
|
614 | 614 | | @ 2 public b-A - f54f1bb90ff3 |
|
615 | 615 | |/ |
|
616 | 616 | o 1 public a-B - 548a3d25dbf0 |
|
617 | 617 | | |
|
618 | 618 | o 0 public a-A - 054250a37db4 |
|
619 | 619 | |
|
620 | 620 | $ cd ../alpha |
|
621 | 621 | $ hgph |
|
622 | 622 | @ 10 draft a-H - 967b449fbc94 |
|
623 | 623 | | |
|
624 | 624 | | o 9 draft a-G - 3e27b6f1eee1 |
|
625 | 625 | | | |
|
626 | 626 | | o 8 public a-F - b740e3e5c05d |
|
627 | 627 | | | |
|
628 | 628 | | o 7 public a-E - e9f537e46dea |
|
629 | 629 | | | |
|
630 | 630 | +---o 6 public n-B - 145e75495359 |
|
631 | 631 | | | |
|
632 | 632 | o | 5 public n-A - d6bcb4f74035 |
|
633 | 633 | | | |
|
634 | 634 | o | 4 public b-A - f54f1bb90ff3 |
|
635 | 635 | | | |
|
636 | 636 | | o 3 public a-D - b555f63b6063 |
|
637 | 637 | | | |
|
638 | 638 | | o 2 public a-C - 54acac6f23ab |
|
639 | 639 | |/ |
|
640 | 640 | o 1 public a-B - 548a3d25dbf0 |
|
641 | 641 | | |
|
642 | 642 | o 0 public a-A - 054250a37db4 |
|
643 | 643 | |
|
644 | 644 | |
|
645 | 645 | Pushing to Publish=False (common changeset that change phase + unknown one) |
|
646 | 646 | |
|
647 | 647 | $ hg push ../mu -r 967b449fbc94 -f |
|
648 | 648 | pushing to ../mu |
|
649 | 649 | searching for changes |
|
650 | 650 | adding changesets |
|
651 | 651 | adding manifests |
|
652 | 652 | adding file changes |
|
653 | 653 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
654 | 654 | $ hgph |
|
655 | 655 | @ 10 draft a-H - 967b449fbc94 |
|
656 | 656 | | |
|
657 | 657 | | o 9 draft a-G - 3e27b6f1eee1 |
|
658 | 658 | | | |
|
659 | 659 | | o 8 public a-F - b740e3e5c05d |
|
660 | 660 | | | |
|
661 | 661 | | o 7 public a-E - e9f537e46dea |
|
662 | 662 | | | |
|
663 | 663 | +---o 6 public n-B - 145e75495359 |
|
664 | 664 | | | |
|
665 | 665 | o | 5 public n-A - d6bcb4f74035 |
|
666 | 666 | | | |
|
667 | 667 | o | 4 public b-A - f54f1bb90ff3 |
|
668 | 668 | | | |
|
669 | 669 | | o 3 public a-D - b555f63b6063 |
|
670 | 670 | | | |
|
671 | 671 | | o 2 public a-C - 54acac6f23ab |
|
672 | 672 | |/ |
|
673 | 673 | o 1 public a-B - 548a3d25dbf0 |
|
674 | 674 | | |
|
675 | 675 | o 0 public a-A - 054250a37db4 |
|
676 | 676 | |
|
677 | 677 | $ cd ../mu |
|
678 | 678 | $ hgph # d6bcb4f74035 should have changed phase |
|
679 | 679 | > # 145e75495359 is still draft. not ancestor of -r |
|
680 | 680 | o 9 draft a-H - 967b449fbc94 |
|
681 | 681 | | |
|
682 | 682 | | o 8 public a-F - b740e3e5c05d |
|
683 | 683 | | | |
|
684 | 684 | | o 7 public a-E - e9f537e46dea |
|
685 | 685 | | | |
|
686 | 686 | +---o 6 draft n-B - 145e75495359 |
|
687 | 687 | | | |
|
688 | 688 | o | 5 public n-A - d6bcb4f74035 |
|
689 | 689 | | | |
|
690 | 690 | | o 4 public a-D - b555f63b6063 |
|
691 | 691 | | | |
|
692 | 692 | | o 3 public a-C - 54acac6f23ab |
|
693 | 693 | | | |
|
694 | 694 | o | 2 public b-A - f54f1bb90ff3 |
|
695 | 695 | |/ |
|
696 | 696 | o 1 public a-B - 548a3d25dbf0 |
|
697 | 697 | | |
|
698 | 698 | o 0 public a-A - 054250a37db4 |
|
699 | 699 | |
|
700 | 700 | |
|
701 | 701 | |
|
702 | 702 | Pushing to Publish=True (common changeset from publish=False) |
|
703 | 703 | |
|
704 | 704 | (in mu) |
|
705 | 705 | $ hg push ../alpha |
|
706 | 706 | pushing to ../alpha |
|
707 | 707 | searching for changes |
|
708 | 708 | no changes found |
|
709 | 709 | [1] |
|
710 | 710 | $ hgph |
|
711 | 711 | o 9 public a-H - 967b449fbc94 |
|
712 | 712 | | |
|
713 | 713 | | o 8 public a-F - b740e3e5c05d |
|
714 | 714 | | | |
|
715 | 715 | | o 7 public a-E - e9f537e46dea |
|
716 | 716 | | | |
|
717 | 717 | +---o 6 public n-B - 145e75495359 |
|
718 | 718 | | | |
|
719 | 719 | o | 5 public n-A - d6bcb4f74035 |
|
720 | 720 | | | |
|
721 | 721 | | o 4 public a-D - b555f63b6063 |
|
722 | 722 | | | |
|
723 | 723 | | o 3 public a-C - 54acac6f23ab |
|
724 | 724 | | | |
|
725 | 725 | o | 2 public b-A - f54f1bb90ff3 |
|
726 | 726 | |/ |
|
727 | 727 | o 1 public a-B - 548a3d25dbf0 |
|
728 | 728 | | |
|
729 | 729 | o 0 public a-A - 054250a37db4 |
|
730 | 730 | |
|
731 | 731 | $ hgph -R ../alpha # a-H should have been synced to 0 |
|
732 | 732 | @ 10 public a-H - 967b449fbc94 |
|
733 | 733 | | |
|
734 | 734 | | o 9 draft a-G - 3e27b6f1eee1 |
|
735 | 735 | | | |
|
736 | 736 | | o 8 public a-F - b740e3e5c05d |
|
737 | 737 | | | |
|
738 | 738 | | o 7 public a-E - e9f537e46dea |
|
739 | 739 | | | |
|
740 | 740 | +---o 6 public n-B - 145e75495359 |
|
741 | 741 | | | |
|
742 | 742 | o | 5 public n-A - d6bcb4f74035 |
|
743 | 743 | | | |
|
744 | 744 | o | 4 public b-A - f54f1bb90ff3 |
|
745 | 745 | | | |
|
746 | 746 | | o 3 public a-D - b555f63b6063 |
|
747 | 747 | | | |
|
748 | 748 | | o 2 public a-C - 54acac6f23ab |
|
749 | 749 | |/ |
|
750 | 750 | o 1 public a-B - 548a3d25dbf0 |
|
751 | 751 | | |
|
752 | 752 | o 0 public a-A - 054250a37db4 |
|
753 | 753 | |
|
754 | 754 | |
|
755 | 755 | |
|
756 | 756 | Bare push with next changeset and common changeset needing sync (issue3575) |
|
757 | 757 | |
|
758 | 758 | (reset some stat on remote repo to avoid confusing other tests) |
|
759 | 759 | |
|
760 | 760 | $ hg -R ../alpha --config extensions.strip= strip --no-backup 967b449fbc94 |
|
761 | 761 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
762 | 762 | $ hg phase --force --draft b740e3e5c05d 967b449fbc94 |
|
763 | 763 | $ hg push -fv ../alpha |
|
764 | 764 | pushing to ../alpha |
|
765 | 765 | searching for changes |
|
766 | 766 | 1 changesets found |
|
767 | 767 | uncompressed size of bundle content: |
|
768 | 768 | 192 (changelog) |
|
769 | 769 | 165 (manifests) |
|
770 | 770 | 131 a-H |
|
771 | 771 | adding changesets |
|
772 | 772 | adding manifests |
|
773 | 773 | adding file changes |
|
774 | 774 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
775 | 775 | $ hgph |
|
776 | 776 | o 9 public a-H - 967b449fbc94 |
|
777 | 777 | | |
|
778 | 778 | | o 8 public a-F - b740e3e5c05d |
|
779 | 779 | | | |
|
780 | 780 | | o 7 public a-E - e9f537e46dea |
|
781 | 781 | | | |
|
782 | 782 | +---o 6 public n-B - 145e75495359 |
|
783 | 783 | | | |
|
784 | 784 | o | 5 public n-A - d6bcb4f74035 |
|
785 | 785 | | | |
|
786 | 786 | | o 4 public a-D - b555f63b6063 |
|
787 | 787 | | | |
|
788 | 788 | | o 3 public a-C - 54acac6f23ab |
|
789 | 789 | | | |
|
790 | 790 | o | 2 public b-A - f54f1bb90ff3 |
|
791 | 791 | |/ |
|
792 | 792 | o 1 public a-B - 548a3d25dbf0 |
|
793 | 793 | | |
|
794 | 794 | o 0 public a-A - 054250a37db4 |
|
795 | 795 | |
|
796 | 796 | |
|
797 | 797 | $ hg -R ../alpha update 967b449fbc94 #for latter test consistency |
|
798 | 798 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
799 | 799 | $ hgph -R ../alpha |
|
800 | 800 | @ 10 public a-H - 967b449fbc94 |
|
801 | 801 | | |
|
802 | 802 | | o 9 draft a-G - 3e27b6f1eee1 |
|
803 | 803 | | | |
|
804 | 804 | | o 8 public a-F - b740e3e5c05d |
|
805 | 805 | | | |
|
806 | 806 | | o 7 public a-E - e9f537e46dea |
|
807 | 807 | | | |
|
808 | 808 | +---o 6 public n-B - 145e75495359 |
|
809 | 809 | | | |
|
810 | 810 | o | 5 public n-A - d6bcb4f74035 |
|
811 | 811 | | | |
|
812 | 812 | o | 4 public b-A - f54f1bb90ff3 |
|
813 | 813 | | | |
|
814 | 814 | | o 3 public a-D - b555f63b6063 |
|
815 | 815 | | | |
|
816 | 816 | | o 2 public a-C - 54acac6f23ab |
|
817 | 817 | |/ |
|
818 | 818 | o 1 public a-B - 548a3d25dbf0 |
|
819 | 819 | | |
|
820 | 820 | o 0 public a-A - 054250a37db4 |
|
821 | 821 | |
|
822 | 822 | |
|
823 | 823 | Discovery locally secret changeset on a remote repository: |
|
824 | 824 | |
|
825 | 825 | - should make it non-secret |
|
826 | 826 | |
|
827 | 827 | $ cd ../alpha |
|
828 | 828 | $ mkcommit A-secret --config phases.new-commit=2 |
|
829 | 829 | $ hgph |
|
830 | 830 | @ 11 secret A-secret - 435b5d83910c |
|
831 | 831 | | |
|
832 | 832 | o 10 public a-H - 967b449fbc94 |
|
833 | 833 | | |
|
834 | 834 | | o 9 draft a-G - 3e27b6f1eee1 |
|
835 | 835 | | | |
|
836 | 836 | | o 8 public a-F - b740e3e5c05d |
|
837 | 837 | | | |
|
838 | 838 | | o 7 public a-E - e9f537e46dea |
|
839 | 839 | | | |
|
840 | 840 | +---o 6 public n-B - 145e75495359 |
|
841 | 841 | | | |
|
842 | 842 | o | 5 public n-A - d6bcb4f74035 |
|
843 | 843 | | | |
|
844 | 844 | o | 4 public b-A - f54f1bb90ff3 |
|
845 | 845 | | | |
|
846 | 846 | | o 3 public a-D - b555f63b6063 |
|
847 | 847 | | | |
|
848 | 848 | | o 2 public a-C - 54acac6f23ab |
|
849 | 849 | |/ |
|
850 | 850 | o 1 public a-B - 548a3d25dbf0 |
|
851 | 851 | | |
|
852 | 852 | o 0 public a-A - 054250a37db4 |
|
853 | 853 | |
|
854 | 854 | $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg |
|
855 | 855 | 1 changesets found |
|
856 | 856 | $ hg -R ../mu unbundle ../secret-bundle.hg |
|
857 | 857 | adding changesets |
|
858 | 858 | adding manifests |
|
859 | 859 | adding file changes |
|
860 | 860 | added 1 changesets with 1 changes to 1 files |
|
861 | 861 | (run 'hg update' to get a working copy) |
|
862 | 862 | $ hgph -R ../mu |
|
863 | 863 | o 10 draft A-secret - 435b5d83910c |
|
864 | 864 | | |
|
865 | 865 | o 9 public a-H - 967b449fbc94 |
|
866 | 866 | | |
|
867 | 867 | | o 8 public a-F - b740e3e5c05d |
|
868 | 868 | | | |
|
869 | 869 | | o 7 public a-E - e9f537e46dea |
|
870 | 870 | | | |
|
871 | 871 | +---o 6 public n-B - 145e75495359 |
|
872 | 872 | | | |
|
873 | 873 | o | 5 public n-A - d6bcb4f74035 |
|
874 | 874 | | | |
|
875 | 875 | | o 4 public a-D - b555f63b6063 |
|
876 | 876 | | | |
|
877 | 877 | | o 3 public a-C - 54acac6f23ab |
|
878 | 878 | | | |
|
879 | 879 | o | 2 public b-A - f54f1bb90ff3 |
|
880 | 880 | |/ |
|
881 | 881 | o 1 public a-B - 548a3d25dbf0 |
|
882 | 882 | | |
|
883 | 883 | o 0 public a-A - 054250a37db4 |
|
884 | 884 | |
|
885 | 885 | $ hg pull ../mu |
|
886 | 886 | pulling from ../mu |
|
887 | 887 | searching for changes |
|
888 | 888 | no changes found |
|
889 | 889 | $ hgph |
|
890 | 890 | @ 11 draft A-secret - 435b5d83910c |
|
891 | 891 | | |
|
892 | 892 | o 10 public a-H - 967b449fbc94 |
|
893 | 893 | | |
|
894 | 894 | | o 9 draft a-G - 3e27b6f1eee1 |
|
895 | 895 | | | |
|
896 | 896 | | o 8 public a-F - b740e3e5c05d |
|
897 | 897 | | | |
|
898 | 898 | | o 7 public a-E - e9f537e46dea |
|
899 | 899 | | | |
|
900 | 900 | +---o 6 public n-B - 145e75495359 |
|
901 | 901 | | | |
|
902 | 902 | o | 5 public n-A - d6bcb4f74035 |
|
903 | 903 | | | |
|
904 | 904 | o | 4 public b-A - f54f1bb90ff3 |
|
905 | 905 | | | |
|
906 | 906 | | o 3 public a-D - b555f63b6063 |
|
907 | 907 | | | |
|
908 | 908 | | o 2 public a-C - 54acac6f23ab |
|
909 | 909 | |/ |
|
910 | 910 | o 1 public a-B - 548a3d25dbf0 |
|
911 | 911 | | |
|
912 | 912 | o 0 public a-A - 054250a37db4 |
|
913 | 913 | |
|
914 | 914 | |
|
915 | 915 | pushing a locally public and draft changesets remotely secret should make them |
|
916 | 916 | appear on the remote side. |
|
917 | 917 | |
|
918 | 918 | $ hg -R ../mu phase --secret --force 967b449fbc94 |
|
919 | 919 | $ hg push -r 435b5d83910c ../mu |
|
920 | 920 | pushing to ../mu |
|
921 | 921 | searching for changes |
|
922 | 922 | abort: push creates new remote head 435b5d83910c! |
|
923 | 923 | (merge or see "hg help push" for details about pushing new heads) |
|
924 | 924 | [255] |
|
925 | 925 | $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head |
|
926 | 926 | pushing to ../mu |
|
927 | 927 | searching for changes |
|
928 | 928 | adding changesets |
|
929 | 929 | adding manifests |
|
930 | 930 | adding file changes |
|
931 | 931 | added 0 changesets with 0 changes to 2 files |
|
932 | 932 | $ hgph -R ../mu |
|
933 | 933 | o 10 draft A-secret - 435b5d83910c |
|
934 | 934 | | |
|
935 | 935 | o 9 public a-H - 967b449fbc94 |
|
936 | 936 | | |
|
937 | 937 | | o 8 public a-F - b740e3e5c05d |
|
938 | 938 | | | |
|
939 | 939 | | o 7 public a-E - e9f537e46dea |
|
940 | 940 | | | |
|
941 | 941 | +---o 6 public n-B - 145e75495359 |
|
942 | 942 | | | |
|
943 | 943 | o | 5 public n-A - d6bcb4f74035 |
|
944 | 944 | | | |
|
945 | 945 | | o 4 public a-D - b555f63b6063 |
|
946 | 946 | | | |
|
947 | 947 | | o 3 public a-C - 54acac6f23ab |
|
948 | 948 | | | |
|
949 | 949 | o | 2 public b-A - f54f1bb90ff3 |
|
950 | 950 | |/ |
|
951 | 951 | o 1 public a-B - 548a3d25dbf0 |
|
952 | 952 | | |
|
953 | 953 | o 0 public a-A - 054250a37db4 |
|
954 | 954 | |
|
955 | 955 | |
|
956 | 956 | pull new changeset with common draft locally |
|
957 | 957 | |
|
958 | 958 | $ hg up -q 967b449fbc94 # create a new root for draft |
|
959 | 959 | $ mkcommit 'alpha-more' |
|
960 | 960 | created new head |
|
961 | 961 | $ hg push -fr . ../mu |
|
962 | 962 | pushing to ../mu |
|
963 | 963 | searching for changes |
|
964 | 964 | adding changesets |
|
965 | 965 | adding manifests |
|
966 | 966 | adding file changes |
|
967 | 967 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
968 | 968 | $ cd ../mu |
|
969 | 969 | $ hg phase --secret --force 1c5cfd894796 |
|
970 | 970 | $ hg up -q 435b5d83910c |
|
971 | 971 | $ mkcommit 'mu-more' |
|
972 | 972 | $ cd ../alpha |
|
973 | 973 | $ hg pull ../mu |
|
974 | 974 | pulling from ../mu |
|
975 | 975 | searching for changes |
|
976 | 976 | adding changesets |
|
977 | 977 | adding manifests |
|
978 | 978 | adding file changes |
|
979 | 979 | added 1 changesets with 1 changes to 1 files |
|
980 | 980 | (run 'hg update' to get a working copy) |
|
981 | 981 | $ hgph |
|
982 | 982 | o 13 draft mu-more - 5237fb433fc8 |
|
983 | 983 | | |
|
984 | 984 | | @ 12 draft alpha-more - 1c5cfd894796 |
|
985 | 985 | | | |
|
986 | 986 | o | 11 draft A-secret - 435b5d83910c |
|
987 | 987 | |/ |
|
988 | 988 | o 10 public a-H - 967b449fbc94 |
|
989 | 989 | | |
|
990 | 990 | | o 9 draft a-G - 3e27b6f1eee1 |
|
991 | 991 | | | |
|
992 | 992 | | o 8 public a-F - b740e3e5c05d |
|
993 | 993 | | | |
|
994 | 994 | | o 7 public a-E - e9f537e46dea |
|
995 | 995 | | | |
|
996 | 996 | +---o 6 public n-B - 145e75495359 |
|
997 | 997 | | | |
|
998 | 998 | o | 5 public n-A - d6bcb4f74035 |
|
999 | 999 | | | |
|
1000 | 1000 | o | 4 public b-A - f54f1bb90ff3 |
|
1001 | 1001 | | | |
|
1002 | 1002 | | o 3 public a-D - b555f63b6063 |
|
1003 | 1003 | | | |
|
1004 | 1004 | | o 2 public a-C - 54acac6f23ab |
|
1005 | 1005 | |/ |
|
1006 | 1006 | o 1 public a-B - 548a3d25dbf0 |
|
1007 | 1007 | | |
|
1008 | 1008 | o 0 public a-A - 054250a37db4 |
|
1009 | 1009 | |
|
1010 | 1010 | |
|
1011 | 1011 | Test that test are properly ignored on remote event when existing locally |
|
1012 | 1012 | |
|
1013 | 1013 | $ cd .. |
|
1014 | 1014 | $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma |
|
1015 | 1015 | |
|
1016 | 1016 | # pathological case are |
|
1017 | 1017 | # |
|
1018 | 1018 | # * secret remotely |
|
1019 | 1019 | # * known locally |
|
1020 | 1020 | # * repo have uncommon changeset |
|
1021 | 1021 | |
|
1022 | 1022 | $ hg -R beta phase --secret --force f54f1bb90ff3 |
|
1023 | 1023 | $ hg -R gamma phase --draft --force f54f1bb90ff3 |
|
1024 | 1024 | |
|
1025 | 1025 | $ cd gamma |
|
1026 | 1026 | $ hg pull ../beta |
|
1027 | 1027 | pulling from ../beta |
|
1028 | 1028 | searching for changes |
|
1029 | 1029 | adding changesets |
|
1030 | 1030 | adding manifests |
|
1031 | 1031 | adding file changes |
|
1032 | 1032 | added 2 changesets with 2 changes to 2 files |
|
1033 | 1033 | (run 'hg update' to get a working copy) |
|
1034 | 1034 | $ hg phase f54f1bb90ff3 |
|
1035 | 1035 | 2: draft |
|
1036 | 1036 | |
|
1037 | 1037 | same over the wire |
|
1038 | 1038 | |
|
1039 | 1039 | $ cd ../beta |
|
1040 | 1040 | $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log |
|
1041 | 1041 | $ cat ../beta.pid >> $DAEMON_PIDS |
|
1042 | 1042 | $ cd ../gamma |
|
1043 | 1043 | |
|
1044 | 1044 | $ hg pull http://localhost:$HGPORT/ --config experimental.bundle2-exp=True |
|
1045 | 1045 | pulling from http://localhost:$HGPORT/ |
|
1046 | 1046 | searching for changes |
|
1047 | 1047 | no changes found |
|
1048 | 1048 | $ hg phase f54f1bb90ff3 |
|
1049 | 1049 | 2: draft |
|
1050 | 1050 | |
|
1051 | 1051 | enforce bundle1 |
|
1052 | 1052 | |
|
1053 |
$ hg pull http://localhost:$HGPORT/ --config |
|
|
1053 | $ hg pull http://localhost:$HGPORT/ --config devel.legacy.exchange=bundle1 | |
|
1054 | 1054 | pulling from http://localhost:$HGPORT/ |
|
1055 | 1055 | searching for changes |
|
1056 | 1056 | no changes found |
|
1057 | 1057 | $ hg phase f54f1bb90ff3 |
|
1058 | 1058 | 2: draft |
|
1059 | 1059 | |
|
1060 | 1060 | check that secret local on both side are not synced to public |
|
1061 | 1061 | |
|
1062 | 1062 | $ hg push -r b555f63b6063 http://localhost:$HGPORT/ |
|
1063 | 1063 | pushing to http://localhost:$HGPORT/ |
|
1064 | 1064 | searching for changes |
|
1065 | 1065 | no changes found |
|
1066 | 1066 | [1] |
|
1067 | 1067 | $ hg phase f54f1bb90ff3 |
|
1068 | 1068 | 2: draft |
|
1069 | 1069 | |
|
1070 | 1070 | put the changeset in the draft state again |
|
1071 | 1071 | (first test after this one expect to be able to copy) |
|
1072 | 1072 | |
|
1073 | 1073 | $ cd .. |
|
1074 | 1074 | |
|
1075 | 1075 | |
|
1076 | 1076 | Test Clone behavior |
|
1077 | 1077 | |
|
1078 | 1078 | A. Clone without secret changeset |
|
1079 | 1079 | |
|
1080 | 1080 | 1. cloning non-publishing repository |
|
1081 | 1081 | (Phase should be preserved) |
|
1082 | 1082 | |
|
1083 | 1083 | # make sure there is no secret so we can use a copy clone |
|
1084 | 1084 | |
|
1085 | 1085 | $ hg -R mu phase --draft 'secret()' |
|
1086 | 1086 | |
|
1087 | 1087 | $ hg clone -U mu Tau |
|
1088 | 1088 | $ hgph -R Tau |
|
1089 | 1089 | o 12 draft mu-more - 5237fb433fc8 |
|
1090 | 1090 | | |
|
1091 | 1091 | | o 11 draft alpha-more - 1c5cfd894796 |
|
1092 | 1092 | | | |
|
1093 | 1093 | o | 10 draft A-secret - 435b5d83910c |
|
1094 | 1094 | |/ |
|
1095 | 1095 | o 9 public a-H - 967b449fbc94 |
|
1096 | 1096 | | |
|
1097 | 1097 | | o 8 public a-F - b740e3e5c05d |
|
1098 | 1098 | | | |
|
1099 | 1099 | | o 7 public a-E - e9f537e46dea |
|
1100 | 1100 | | | |
|
1101 | 1101 | +---o 6 public n-B - 145e75495359 |
|
1102 | 1102 | | | |
|
1103 | 1103 | o | 5 public n-A - d6bcb4f74035 |
|
1104 | 1104 | | | |
|
1105 | 1105 | | o 4 public a-D - b555f63b6063 |
|
1106 | 1106 | | | |
|
1107 | 1107 | | o 3 public a-C - 54acac6f23ab |
|
1108 | 1108 | | | |
|
1109 | 1109 | o | 2 public b-A - f54f1bb90ff3 |
|
1110 | 1110 | |/ |
|
1111 | 1111 | o 1 public a-B - 548a3d25dbf0 |
|
1112 | 1112 | | |
|
1113 | 1113 | o 0 public a-A - 054250a37db4 |
|
1114 | 1114 | |
|
1115 | 1115 | |
|
1116 | 1116 | 2. cloning publishing repository |
|
1117 | 1117 | |
|
1118 | 1118 | (everything should be public) |
|
1119 | 1119 | |
|
1120 | 1120 | $ hg clone -U alpha Upsilon |
|
1121 | 1121 | $ hgph -R Upsilon |
|
1122 | 1122 | o 13 public mu-more - 5237fb433fc8 |
|
1123 | 1123 | | |
|
1124 | 1124 | | o 12 public alpha-more - 1c5cfd894796 |
|
1125 | 1125 | | | |
|
1126 | 1126 | o | 11 public A-secret - 435b5d83910c |
|
1127 | 1127 | |/ |
|
1128 | 1128 | o 10 public a-H - 967b449fbc94 |
|
1129 | 1129 | | |
|
1130 | 1130 | | o 9 public a-G - 3e27b6f1eee1 |
|
1131 | 1131 | | | |
|
1132 | 1132 | | o 8 public a-F - b740e3e5c05d |
|
1133 | 1133 | | | |
|
1134 | 1134 | | o 7 public a-E - e9f537e46dea |
|
1135 | 1135 | | | |
|
1136 | 1136 | +---o 6 public n-B - 145e75495359 |
|
1137 | 1137 | | | |
|
1138 | 1138 | o | 5 public n-A - d6bcb4f74035 |
|
1139 | 1139 | | | |
|
1140 | 1140 | o | 4 public b-A - f54f1bb90ff3 |
|
1141 | 1141 | | | |
|
1142 | 1142 | | o 3 public a-D - b555f63b6063 |
|
1143 | 1143 | | | |
|
1144 | 1144 | | o 2 public a-C - 54acac6f23ab |
|
1145 | 1145 | |/ |
|
1146 | 1146 | o 1 public a-B - 548a3d25dbf0 |
|
1147 | 1147 | | |
|
1148 | 1148 | o 0 public a-A - 054250a37db4 |
|
1149 | 1149 | |
|
1150 | 1150 | #if unix-permissions no-root |
|
1151 | 1151 | |
|
1152 | 1152 | Pushing From an unlockable repo |
|
1153 | 1153 | -------------------------------- |
|
1154 | 1154 | (issue3684) |
|
1155 | 1155 | |
|
1156 | 1156 | Unability to lock the source repo should not prevent the push. It will prevent |
|
1157 | 1157 | the retrieval of remote phase during push. For example, pushing to a publishing |
|
1158 | 1158 | server won't turn changeset public. |
|
1159 | 1159 | |
|
1160 | 1160 | 1. Test that push is not prevented |
|
1161 | 1161 | |
|
1162 | 1162 | $ hg init Phi |
|
1163 | 1163 | $ cd Upsilon |
|
1164 | 1164 | $ chmod -R -w .hg |
|
1165 | 1165 | $ hg push ../Phi |
|
1166 | 1166 | pushing to ../Phi |
|
1167 | 1167 | searching for changes |
|
1168 | 1168 | adding changesets |
|
1169 | 1169 | adding manifests |
|
1170 | 1170 | adding file changes |
|
1171 | 1171 | added 14 changesets with 14 changes to 14 files (+3 heads) |
|
1172 | 1172 | $ chmod -R +w .hg |
|
1173 | 1173 | |
|
1174 | 1174 | 2. Test that failed phases movement are reported |
|
1175 | 1175 | |
|
1176 | 1176 | $ hg phase --force --draft 3 |
|
1177 | 1177 | $ chmod -R -w .hg |
|
1178 | 1178 | $ hg push ../Phi |
|
1179 | 1179 | pushing to ../Phi |
|
1180 | 1180 | searching for changes |
|
1181 | 1181 | no changes found |
|
1182 | 1182 | cannot lock source repo, skipping local public phase update |
|
1183 | 1183 | [1] |
|
1184 | 1184 | $ chmod -R +w .hg |
|
1185 | 1185 | $ hgph Upsilon |
|
1186 | 1186 | |
|
1187 | 1187 | $ cd .. |
|
1188 | 1188 | |
|
1189 | 1189 | $ killdaemons.py |
|
1190 | 1190 | |
|
1191 | 1191 | #endif |
@@ -1,80 +1,80 b'' | |||
|
1 | 1 | #require killdaemons |
|
2 | 2 | |
|
3 | 3 | $ hg init test |
|
4 | 4 | $ cd test |
|
5 | 5 | $ echo a > a |
|
6 | 6 | $ hg ci -Ama |
|
7 | 7 | adding a |
|
8 | 8 | $ cd .. |
|
9 | 9 | $ hg clone test test2 |
|
10 | 10 | updating to branch default |
|
11 | 11 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 | 12 | $ cd test2 |
|
13 | 13 | $ echo a >> a |
|
14 | 14 | $ hg ci -mb |
|
15 | 15 | |
|
16 | 16 | Cloning with a password in the URL should not save the password in .hg/hgrc: |
|
17 | 17 | |
|
18 | 18 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
19 | 19 | $ cat hg.pid >> $DAEMON_PIDS |
|
20 | 20 | $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3 |
|
21 | 21 | requesting all changes |
|
22 | 22 | adding changesets |
|
23 | 23 | adding manifests |
|
24 | 24 | adding file changes |
|
25 | 25 | added 2 changesets with 2 changes to 1 files |
|
26 | 26 | updating to branch default |
|
27 | 27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 28 | $ cat test3/.hg/hgrc |
|
29 | 29 | # example repository config (see "hg help config" for more info) |
|
30 | 30 | [paths] |
|
31 | 31 | default = http://foo@localhost:$HGPORT/ |
|
32 | 32 | |
|
33 | 33 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
34 | 34 | # (see "hg help config.paths" for more info) |
|
35 | 35 | # |
|
36 | 36 | # default-push = ssh://jdoe@example.net/hg/jdoes-fork |
|
37 | 37 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
38 | 38 | # my-clone = /home/jdoe/jdoes-clone |
|
39 | 39 | |
|
40 | 40 | [ui] |
|
41 | 41 | # name and email (local to this repository, optional), e.g. |
|
42 | 42 | # username = Jane Doe <jdoe@example.com> |
|
43 | 43 | $ killdaemons.py |
|
44 | 44 | |
|
45 | 45 | expect error, cloning not allowed |
|
46 | 46 | |
|
47 | 47 | $ echo '[web]' > .hg/hgrc |
|
48 | 48 | $ echo 'allowpull = false' >> .hg/hgrc |
|
49 | 49 | $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
50 | 50 | $ cat hg.pid >> $DAEMON_PIDS |
|
51 | 51 | $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=True |
|
52 | 52 | requesting all changes |
|
53 | 53 | abort: authorization failed |
|
54 | 54 | [255] |
|
55 |
$ hg clone http://localhost:$HGPORT/ test4 --config |
|
|
55 | $ hg clone http://localhost:$HGPORT/ test4 --config devel.legacy.exchange=bundle1 | |
|
56 | 56 | abort: authorization failed |
|
57 | 57 | [255] |
|
58 | 58 | $ killdaemons.py |
|
59 | 59 | |
|
60 | 60 | serve errors |
|
61 | 61 | |
|
62 | 62 | $ cat errors.log |
|
63 | 63 | $ req() { |
|
64 | 64 | > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
65 | 65 | > cat hg.pid >> $DAEMON_PIDS |
|
66 | 66 | > hg --cwd ../test pull http://localhost:$HGPORT/ |
|
67 | 67 | > killdaemons.py hg.pid |
|
68 | 68 | > echo % serve errors |
|
69 | 69 | > cat errors.log |
|
70 | 70 | > } |
|
71 | 71 | |
|
72 | 72 | expect error, pulling not allowed |
|
73 | 73 | |
|
74 | 74 | $ req |
|
75 | 75 | pulling from http://localhost:$HGPORT/ |
|
76 | 76 | searching for changes |
|
77 | 77 | abort: authorization failed |
|
78 | 78 | % serve errors |
|
79 | 79 | |
|
80 | 80 | $ cd .. |
@@ -1,50 +1,50 b'' | |||
|
1 | 1 | $ hg init 1 |
|
2 | 2 | |
|
3 | 3 | $ echo '[ui]' >> 1/.hg/hgrc |
|
4 | 4 | $ echo 'timeout = 10' >> 1/.hg/hgrc |
|
5 | 5 | |
|
6 | 6 | $ echo foo > 1/foo |
|
7 | 7 | $ hg --cwd 1 ci -A -m foo |
|
8 | 8 | adding foo |
|
9 | 9 | |
|
10 | 10 | $ hg clone 1 2 |
|
11 | 11 | updating to branch default |
|
12 | 12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 13 | |
|
14 | 14 | $ hg clone 2 3 |
|
15 | 15 | updating to branch default |
|
16 | 16 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 17 | |
|
18 | 18 | $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh |
|
19 | 19 | > hg debuglocks |
|
20 | 20 | > true |
|
21 | 21 | > EOF |
|
22 | 22 | $ echo '[hooks]' >> 2/.hg/hgrc |
|
23 | 23 | $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc |
|
24 | 24 | $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc |
|
25 | 25 | |
|
26 | 26 | $ echo bar >> 3/foo |
|
27 | 27 | $ hg --cwd 3 ci -m bar |
|
28 | 28 | |
|
29 |
$ hg --cwd 3 push ../2 --config |
|
|
29 | $ hg --cwd 3 push ../2 --config devel.legacy.exchange=bundle1 | |
|
30 | 30 | pushing to ../2 |
|
31 | 31 | searching for changes |
|
32 | 32 | adding changesets |
|
33 | 33 | adding manifests |
|
34 | 34 | adding file changes |
|
35 | 35 | added 1 changesets with 1 changes to 1 files |
|
36 | 36 | lock: user *, process * (*s) (glob) |
|
37 | 37 | wlock: free |
|
38 | 38 | |
|
39 | 39 | $ hg --cwd 1 --config extensions.strip= strip tip -q |
|
40 | 40 | $ hg --cwd 2 --config extensions.strip= strip tip -q |
|
41 | 41 | $ hg --cwd 3 push ../2 --config experimental.bundle2-exp=True |
|
42 | 42 | pushing to ../2 |
|
43 | 43 | searching for changes |
|
44 | 44 | adding changesets |
|
45 | 45 | adding manifests |
|
46 | 46 | adding file changes |
|
47 | 47 | added 1 changesets with 1 changes to 1 files |
|
48 | 48 | lock: user *, process * (*s) (glob) |
|
49 | 49 | wlock: user *, process * (*s) (glob) |
|
50 | 50 |
@@ -1,1778 +1,1778 b'' | |||
|
1 | 1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
2 | 2 | |
|
3 | 3 | $ echo "[ui]" >> $HGRCPATH |
|
4 | 4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
5 | 5 | |
|
6 | 6 | $ hg init t |
|
7 | 7 | $ cd t |
|
8 | 8 | |
|
9 | 9 | first revision, no sub |
|
10 | 10 | |
|
11 | 11 | $ echo a > a |
|
12 | 12 | $ hg ci -Am0 |
|
13 | 13 | adding a |
|
14 | 14 | |
|
15 | 15 | add first sub |
|
16 | 16 | |
|
17 | 17 | $ echo s = s > .hgsub |
|
18 | 18 | $ hg add .hgsub |
|
19 | 19 | $ hg init s |
|
20 | 20 | $ echo a > s/a |
|
21 | 21 | |
|
22 | 22 | Issue2232: committing a subrepo without .hgsub |
|
23 | 23 | |
|
24 | 24 | $ hg ci -mbad s |
|
25 | 25 | abort: can't commit subrepos without .hgsub |
|
26 | 26 | [255] |
|
27 | 27 | |
|
28 | 28 | $ hg -R s add s/a |
|
29 | 29 | $ hg files -S |
|
30 | 30 | .hgsub |
|
31 | 31 | a |
|
32 | 32 | s/a (glob) |
|
33 | 33 | |
|
34 | 34 | $ hg -R s ci -Ams0 |
|
35 | 35 | $ hg sum |
|
36 | 36 | parent: 0:f7b1eb17ad24 tip |
|
37 | 37 | 0 |
|
38 | 38 | branch: default |
|
39 | 39 | commit: 1 added, 1 subrepos |
|
40 | 40 | update: (current) |
|
41 | 41 | phases: 1 draft |
|
42 | 42 | $ hg ci -m1 |
|
43 | 43 | |
|
44 | 44 | test handling .hgsubstate "added" explicitly. |
|
45 | 45 | |
|
46 | 46 | $ hg parents --template '{node}\n{files}\n' |
|
47 | 47 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
48 | 48 | .hgsub .hgsubstate |
|
49 | 49 | $ hg rollback -q |
|
50 | 50 | $ hg add .hgsubstate |
|
51 | 51 | $ hg ci -m1 |
|
52 | 52 | $ hg parents --template '{node}\n{files}\n' |
|
53 | 53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
54 | 54 | .hgsub .hgsubstate |
|
55 | 55 | |
|
56 | 56 | Subrepopath which overlaps with filepath, does not change warnings in remove() |
|
57 | 57 | |
|
58 | 58 | $ mkdir snot |
|
59 | 59 | $ touch snot/file |
|
60 | 60 | $ hg remove -S snot/file |
|
61 | 61 | not removing snot/file: file is untracked |
|
62 | 62 | [1] |
|
63 | 63 | $ hg cat snot/filenot |
|
64 | 64 | snot/filenot: no such file in rev 7cf8cfea66e4 |
|
65 | 65 | [1] |
|
66 | 66 | $ rm -r snot |
|
67 | 67 | |
|
68 | 68 | Revert subrepo and test subrepo fileset keyword: |
|
69 | 69 | |
|
70 | 70 | $ echo b > s/a |
|
71 | 71 | $ hg revert --dry-run "set:subrepo('glob:s*')" |
|
72 | 72 | reverting subrepo s |
|
73 | 73 | reverting s/a (glob) |
|
74 | 74 | $ cat s/a |
|
75 | 75 | b |
|
76 | 76 | $ hg revert "set:subrepo('glob:s*')" |
|
77 | 77 | reverting subrepo s |
|
78 | 78 | reverting s/a (glob) |
|
79 | 79 | $ cat s/a |
|
80 | 80 | a |
|
81 | 81 | $ rm s/a.orig |
|
82 | 82 | |
|
83 | 83 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
84 | 84 | we're really running 'hg update' in the subrepo: |
|
85 | 85 | |
|
86 | 86 | $ echo b > s/a |
|
87 | 87 | $ hg revert --no-backup s |
|
88 | 88 | reverting subrepo s |
|
89 | 89 | |
|
90 | 90 | Issue2022: update -C |
|
91 | 91 | |
|
92 | 92 | $ echo b > s/a |
|
93 | 93 | $ hg sum |
|
94 | 94 | parent: 1:7cf8cfea66e4 tip |
|
95 | 95 | 1 |
|
96 | 96 | branch: default |
|
97 | 97 | commit: 1 subrepos |
|
98 | 98 | update: (current) |
|
99 | 99 | phases: 2 draft |
|
100 | 100 | $ hg co -C 1 |
|
101 | 101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
102 | 102 | $ hg sum |
|
103 | 103 | parent: 1:7cf8cfea66e4 tip |
|
104 | 104 | 1 |
|
105 | 105 | branch: default |
|
106 | 106 | commit: (clean) |
|
107 | 107 | update: (current) |
|
108 | 108 | phases: 2 draft |
|
109 | 109 | |
|
110 | 110 | commands that require a clean repo should respect subrepos |
|
111 | 111 | |
|
112 | 112 | $ echo b >> s/a |
|
113 | 113 | $ hg backout tip |
|
114 | 114 | abort: uncommitted changes in subrepository 's' |
|
115 | 115 | [255] |
|
116 | 116 | $ hg revert -C -R s s/a |
|
117 | 117 | |
|
118 | 118 | add sub sub |
|
119 | 119 | |
|
120 | 120 | $ echo ss = ss > s/.hgsub |
|
121 | 121 | $ hg init s/ss |
|
122 | 122 | $ echo a > s/ss/a |
|
123 | 123 | $ hg -R s add s/.hgsub |
|
124 | 124 | $ hg -R s/ss add s/ss/a |
|
125 | 125 | $ hg sum |
|
126 | 126 | parent: 1:7cf8cfea66e4 tip |
|
127 | 127 | 1 |
|
128 | 128 | branch: default |
|
129 | 129 | commit: 1 subrepos |
|
130 | 130 | update: (current) |
|
131 | 131 | phases: 2 draft |
|
132 | 132 | $ hg ci -m2 |
|
133 | 133 | committing subrepository s |
|
134 | 134 | committing subrepository s/ss (glob) |
|
135 | 135 | $ hg sum |
|
136 | 136 | parent: 2:df30734270ae tip |
|
137 | 137 | 2 |
|
138 | 138 | branch: default |
|
139 | 139 | commit: (clean) |
|
140 | 140 | update: (current) |
|
141 | 141 | phases: 3 draft |
|
142 | 142 | |
|
143 | 143 | test handling .hgsubstate "modified" explicitly. |
|
144 | 144 | |
|
145 | 145 | $ hg parents --template '{node}\n{files}\n' |
|
146 | 146 | df30734270ae757feb35e643b7018e818e78a9aa |
|
147 | 147 | .hgsubstate |
|
148 | 148 | $ hg rollback -q |
|
149 | 149 | $ hg status -A .hgsubstate |
|
150 | 150 | M .hgsubstate |
|
151 | 151 | $ hg ci -m2 |
|
152 | 152 | $ hg parents --template '{node}\n{files}\n' |
|
153 | 153 | df30734270ae757feb35e643b7018e818e78a9aa |
|
154 | 154 | .hgsubstate |
|
155 | 155 | |
|
156 | 156 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
157 | 157 | |
|
158 | 158 | $ echo b > s/a |
|
159 | 159 | $ hg -R s ci -ms1 |
|
160 | 160 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
161 | 161 | |
|
162 | 162 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
163 | 163 | |
|
164 | 164 | $ echo c > s/a |
|
165 | 165 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
166 | 166 | abort: uncommitted changes in subrepository 's' |
|
167 | 167 | (use --subrepos for recursive commit) |
|
168 | 168 | [255] |
|
169 | 169 | $ hg id |
|
170 | 170 | f6affe3fbfaa+ tip |
|
171 | 171 | $ hg -R s ci -mc |
|
172 | 172 | $ hg id |
|
173 | 173 | f6affe3fbfaa+ tip |
|
174 | 174 | $ echo d > s/a |
|
175 | 175 | $ hg ci -m4 |
|
176 | 176 | committing subrepository s |
|
177 | 177 | $ hg tip -R s |
|
178 | 178 | changeset: 4:02dcf1d70411 |
|
179 | 179 | tag: tip |
|
180 | 180 | user: test |
|
181 | 181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
182 | 182 | summary: 4 |
|
183 | 183 | |
|
184 | 184 | |
|
185 | 185 | check caching |
|
186 | 186 | |
|
187 | 187 | $ hg co 0 |
|
188 | 188 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
189 | 189 | $ hg debugsub |
|
190 | 190 | |
|
191 | 191 | restore |
|
192 | 192 | |
|
193 | 193 | $ hg co |
|
194 | 194 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
195 | 195 | $ hg debugsub |
|
196 | 196 | path s |
|
197 | 197 | source s |
|
198 | 198 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
199 | 199 | |
|
200 | 200 | new branch for merge tests |
|
201 | 201 | |
|
202 | 202 | $ hg co 1 |
|
203 | 203 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
204 | 204 | $ echo t = t >> .hgsub |
|
205 | 205 | $ hg init t |
|
206 | 206 | $ echo t > t/t |
|
207 | 207 | $ hg -R t add t |
|
208 | 208 | adding t/t (glob) |
|
209 | 209 | |
|
210 | 210 | 5 |
|
211 | 211 | |
|
212 | 212 | $ hg ci -m5 # add sub |
|
213 | 213 | committing subrepository t |
|
214 | 214 | created new head |
|
215 | 215 | $ echo t2 > t/t |
|
216 | 216 | |
|
217 | 217 | 6 |
|
218 | 218 | |
|
219 | 219 | $ hg st -R s |
|
220 | 220 | $ hg ci -m6 # change sub |
|
221 | 221 | committing subrepository t |
|
222 | 222 | $ hg debugsub |
|
223 | 223 | path s |
|
224 | 224 | source s |
|
225 | 225 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
226 | 226 | path t |
|
227 | 227 | source t |
|
228 | 228 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
229 | 229 | $ echo t3 > t/t |
|
230 | 230 | |
|
231 | 231 | 7 |
|
232 | 232 | |
|
233 | 233 | $ hg ci -m7 # change sub again for conflict test |
|
234 | 234 | committing subrepository t |
|
235 | 235 | $ hg rm .hgsub |
|
236 | 236 | |
|
237 | 237 | 8 |
|
238 | 238 | |
|
239 | 239 | $ hg ci -m8 # remove sub |
|
240 | 240 | |
|
241 | 241 | test handling .hgsubstate "removed" explicitly. |
|
242 | 242 | |
|
243 | 243 | $ hg parents --template '{node}\n{files}\n' |
|
244 | 244 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
245 | 245 | .hgsub .hgsubstate |
|
246 | 246 | $ hg rollback -q |
|
247 | 247 | $ hg remove .hgsubstate |
|
248 | 248 | $ hg ci -m8 |
|
249 | 249 | $ hg parents --template '{node}\n{files}\n' |
|
250 | 250 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
251 | 251 | .hgsub .hgsubstate |
|
252 | 252 | |
|
253 | 253 | merge tests |
|
254 | 254 | |
|
255 | 255 | $ hg co -C 3 |
|
256 | 256 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
257 | 257 | $ hg merge 5 # test adding |
|
258 | 258 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
259 | 259 | (branch merge, don't forget to commit) |
|
260 | 260 | $ hg debugsub |
|
261 | 261 | path s |
|
262 | 262 | source s |
|
263 | 263 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
264 | 264 | path t |
|
265 | 265 | source t |
|
266 | 266 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
267 | 267 | $ hg ci -m9 |
|
268 | 268 | created new head |
|
269 | 269 | $ hg merge 6 --debug # test change |
|
270 | 270 | searching for copies back to rev 2 |
|
271 | 271 | resolving manifests |
|
272 | 272 | branchmerge: True, force: False, partial: False |
|
273 | 273 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
274 | 274 | starting 4 threads for background file closing (?) |
|
275 | 275 | .hgsubstate: versions differ -> m (premerge) |
|
276 | 276 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
277 | 277 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
278 | 278 | getting subrepo t |
|
279 | 279 | resolving manifests |
|
280 | 280 | branchmerge: False, force: False, partial: False |
|
281 | 281 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
282 | 282 | t: remote is newer -> g |
|
283 | 283 | getting t |
|
284 | 284 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
285 | 285 | (branch merge, don't forget to commit) |
|
286 | 286 | $ hg debugsub |
|
287 | 287 | path s |
|
288 | 288 | source s |
|
289 | 289 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
290 | 290 | path t |
|
291 | 291 | source t |
|
292 | 292 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
293 | 293 | $ echo conflict > t/t |
|
294 | 294 | $ hg ci -m10 |
|
295 | 295 | committing subrepository t |
|
296 | 296 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
297 | 297 | searching for copies back to rev 2 |
|
298 | 298 | resolving manifests |
|
299 | 299 | branchmerge: True, force: False, partial: False |
|
300 | 300 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
301 | 301 | starting 4 threads for background file closing (?) |
|
302 | 302 | .hgsubstate: versions differ -> m (premerge) |
|
303 | 303 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
304 | 304 | subrepo t: both sides changed |
|
305 | 305 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) |
|
306 | 306 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
307 | 307 | merging subrepo t |
|
308 | 308 | searching for copies back to rev 2 |
|
309 | 309 | resolving manifests |
|
310 | 310 | branchmerge: True, force: False, partial: False |
|
311 | 311 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
312 | 312 | preserving t for resolve of t |
|
313 | 313 | starting 4 threads for background file closing (?) |
|
314 | 314 | t: versions differ -> m (premerge) |
|
315 | 315 | picked tool ':merge' for t (binary False symlink False changedelete False) |
|
316 | 316 | merging t |
|
317 | 317 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
318 | 318 | t: versions differ -> m (merge) |
|
319 | 319 | picked tool ':merge' for t (binary False symlink False changedelete False) |
|
320 | 320 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
321 | 321 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') |
|
322 | 322 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
323 | 323 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
324 | 324 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
325 | 325 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
326 | 326 | (branch merge, don't forget to commit) |
|
327 | 327 | |
|
328 | 328 | should conflict |
|
329 | 329 | |
|
330 | 330 | $ cat t/t |
|
331 | 331 | <<<<<<< local: 20a0db6fbf6c - test: 10 |
|
332 | 332 | conflict |
|
333 | 333 | ======= |
|
334 | 334 | t3 |
|
335 | 335 | >>>>>>> other: 7af322bc1198 - test: 7 |
|
336 | 336 | |
|
337 | 337 | 11: remove subrepo t |
|
338 | 338 | |
|
339 | 339 | $ hg co -C 5 |
|
340 | 340 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 341 | $ hg revert -r 4 .hgsub # remove t |
|
342 | 342 | $ hg ci -m11 |
|
343 | 343 | created new head |
|
344 | 344 | $ hg debugsub |
|
345 | 345 | path s |
|
346 | 346 | source s |
|
347 | 347 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
348 | 348 | |
|
349 | 349 | local removed, remote changed, keep changed |
|
350 | 350 | |
|
351 | 351 | $ hg merge 6 |
|
352 | 352 | remote changed subrepository t which local removed |
|
353 | 353 | use (c)hanged version or (d)elete? c |
|
354 | 354 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
355 | 355 | (branch merge, don't forget to commit) |
|
356 | 356 | BROKEN: should include subrepo t |
|
357 | 357 | $ hg debugsub |
|
358 | 358 | path s |
|
359 | 359 | source s |
|
360 | 360 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
361 | 361 | $ cat .hgsubstate |
|
362 | 362 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
363 | 363 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t |
|
364 | 364 | $ hg ci -m 'local removed, remote changed, keep changed' |
|
365 | 365 | BROKEN: should include subrepo t |
|
366 | 366 | $ hg debugsub |
|
367 | 367 | path s |
|
368 | 368 | source s |
|
369 | 369 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
370 | 370 | BROKEN: should include subrepo t |
|
371 | 371 | $ cat .hgsubstate |
|
372 | 372 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
373 | 373 | $ cat t/t |
|
374 | 374 | t2 |
|
375 | 375 | |
|
376 | 376 | local removed, remote changed, keep removed |
|
377 | 377 | |
|
378 | 378 | $ hg co -C 11 |
|
379 | 379 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
380 | 380 | $ hg merge --config ui.interactive=true 6 <<EOF |
|
381 | 381 | > d |
|
382 | 382 | > EOF |
|
383 | 383 | remote changed subrepository t which local removed |
|
384 | 384 | use (c)hanged version or (d)elete? d |
|
385 | 385 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
386 | 386 | (branch merge, don't forget to commit) |
|
387 | 387 | $ hg debugsub |
|
388 | 388 | path s |
|
389 | 389 | source s |
|
390 | 390 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
391 | 391 | $ cat .hgsubstate |
|
392 | 392 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
393 | 393 | $ hg ci -m 'local removed, remote changed, keep removed' |
|
394 | 394 | created new head |
|
395 | 395 | $ hg debugsub |
|
396 | 396 | path s |
|
397 | 397 | source s |
|
398 | 398 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
399 | 399 | $ cat .hgsubstate |
|
400 | 400 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
401 | 401 | |
|
402 | 402 | local changed, remote removed, keep changed |
|
403 | 403 | |
|
404 | 404 | $ hg co -C 6 |
|
405 | 405 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
406 | 406 | $ hg merge 11 |
|
407 | 407 | local changed subrepository t which remote removed |
|
408 | 408 | use (c)hanged version or (d)elete? c |
|
409 | 409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
410 | 410 | (branch merge, don't forget to commit) |
|
411 | 411 | BROKEN: should include subrepo t |
|
412 | 412 | $ hg debugsub |
|
413 | 413 | path s |
|
414 | 414 | source s |
|
415 | 415 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
416 | 416 | BROKEN: should include subrepo t |
|
417 | 417 | $ cat .hgsubstate |
|
418 | 418 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
419 | 419 | $ hg ci -m 'local changed, remote removed, keep changed' |
|
420 | 420 | created new head |
|
421 | 421 | BROKEN: should include subrepo t |
|
422 | 422 | $ hg debugsub |
|
423 | 423 | path s |
|
424 | 424 | source s |
|
425 | 425 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
426 | 426 | BROKEN: should include subrepo t |
|
427 | 427 | $ cat .hgsubstate |
|
428 | 428 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
429 | 429 | $ cat t/t |
|
430 | 430 | t2 |
|
431 | 431 | |
|
432 | 432 | local changed, remote removed, keep removed |
|
433 | 433 | |
|
434 | 434 | $ hg co -C 6 |
|
435 | 435 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
436 | 436 | $ hg merge --config ui.interactive=true 11 <<EOF |
|
437 | 437 | > d |
|
438 | 438 | > EOF |
|
439 | 439 | local changed subrepository t which remote removed |
|
440 | 440 | use (c)hanged version or (d)elete? d |
|
441 | 441 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 | 442 | (branch merge, don't forget to commit) |
|
443 | 443 | $ hg debugsub |
|
444 | 444 | path s |
|
445 | 445 | source s |
|
446 | 446 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
447 | 447 | $ cat .hgsubstate |
|
448 | 448 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
449 | 449 | $ hg ci -m 'local changed, remote removed, keep removed' |
|
450 | 450 | created new head |
|
451 | 451 | $ hg debugsub |
|
452 | 452 | path s |
|
453 | 453 | source s |
|
454 | 454 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
455 | 455 | $ cat .hgsubstate |
|
456 | 456 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
457 | 457 | |
|
458 | 458 | clean up to avoid having to fix up the tests below |
|
459 | 459 | |
|
460 | 460 | $ hg co -C 10 |
|
461 | 461 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 462 | $ cat >> $HGRCPATH <<EOF |
|
463 | 463 | > [extensions] |
|
464 | 464 | > strip= |
|
465 | 465 | > EOF |
|
466 | 466 | $ hg strip -r 11:15 |
|
467 | 467 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) |
|
468 | 468 | |
|
469 | 469 | clone |
|
470 | 470 | |
|
471 | 471 | $ cd .. |
|
472 | 472 | $ hg clone t tc |
|
473 | 473 | updating to branch default |
|
474 | 474 | cloning subrepo s from $TESTTMP/t/s |
|
475 | 475 | cloning subrepo s/ss from $TESTTMP/t/s/ss (glob) |
|
476 | 476 | cloning subrepo t from $TESTTMP/t/t |
|
477 | 477 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
478 | 478 | $ cd tc |
|
479 | 479 | $ hg debugsub |
|
480 | 480 | path s |
|
481 | 481 | source s |
|
482 | 482 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
483 | 483 | path t |
|
484 | 484 | source t |
|
485 | 485 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
486 | 486 | |
|
487 | 487 | push |
|
488 | 488 | |
|
489 | 489 | $ echo bah > t/t |
|
490 | 490 | $ hg ci -m11 |
|
491 | 491 | committing subrepository t |
|
492 | 492 | $ hg push |
|
493 | 493 | pushing to $TESTTMP/t (glob) |
|
494 | 494 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
495 | 495 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
496 | 496 | pushing subrepo t to $TESTTMP/t/t |
|
497 | 497 | searching for changes |
|
498 | 498 | adding changesets |
|
499 | 499 | adding manifests |
|
500 | 500 | adding file changes |
|
501 | 501 | added 1 changesets with 1 changes to 1 files |
|
502 | 502 | searching for changes |
|
503 | 503 | adding changesets |
|
504 | 504 | adding manifests |
|
505 | 505 | adding file changes |
|
506 | 506 | added 1 changesets with 1 changes to 1 files |
|
507 | 507 | |
|
508 | 508 | push -f |
|
509 | 509 | |
|
510 | 510 | $ echo bah > s/a |
|
511 | 511 | $ hg ci -m12 |
|
512 | 512 | committing subrepository s |
|
513 | 513 | $ hg push |
|
514 | 514 | pushing to $TESTTMP/t (glob) |
|
515 | 515 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
516 | 516 | pushing subrepo s to $TESTTMP/t/s |
|
517 | 517 | searching for changes |
|
518 | 518 | abort: push creates new remote head 12a213df6fa9! (in subrepo s) |
|
519 | 519 | (merge or see "hg help push" for details about pushing new heads) |
|
520 | 520 | [255] |
|
521 | 521 | $ hg push -f |
|
522 | 522 | pushing to $TESTTMP/t (glob) |
|
523 | 523 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
524 | 524 | searching for changes |
|
525 | 525 | no changes found |
|
526 | 526 | pushing subrepo s to $TESTTMP/t/s |
|
527 | 527 | searching for changes |
|
528 | 528 | adding changesets |
|
529 | 529 | adding manifests |
|
530 | 530 | adding file changes |
|
531 | 531 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
532 | 532 | pushing subrepo t to $TESTTMP/t/t |
|
533 | 533 | searching for changes |
|
534 | 534 | no changes found |
|
535 | 535 | searching for changes |
|
536 | 536 | adding changesets |
|
537 | 537 | adding manifests |
|
538 | 538 | adding file changes |
|
539 | 539 | added 1 changesets with 1 changes to 1 files |
|
540 | 540 | |
|
541 | 541 | check that unmodified subrepos are not pushed |
|
542 | 542 | |
|
543 | 543 | $ hg clone . ../tcc |
|
544 | 544 | updating to branch default |
|
545 | 545 | cloning subrepo s from $TESTTMP/tc/s |
|
546 | 546 | cloning subrepo s/ss from $TESTTMP/tc/s/ss (glob) |
|
547 | 547 | cloning subrepo t from $TESTTMP/tc/t |
|
548 | 548 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
549 | 549 | |
|
550 | 550 | the subrepos on the new clone have nothing to push to its source |
|
551 | 551 | |
|
552 | 552 | $ hg push -R ../tcc . |
|
553 | 553 | pushing to . |
|
554 | 554 | no changes made to subrepo s/ss since last push to s/ss (glob) |
|
555 | 555 | no changes made to subrepo s since last push to s |
|
556 | 556 | no changes made to subrepo t since last push to t |
|
557 | 557 | searching for changes |
|
558 | 558 | no changes found |
|
559 | 559 | [1] |
|
560 | 560 | |
|
561 | 561 | the subrepos on the source do not have a clean store versus the clone target |
|
562 | 562 | because they were never explicitly pushed to the source |
|
563 | 563 | |
|
564 | 564 | $ hg push ../tcc |
|
565 | 565 | pushing to ../tcc |
|
566 | 566 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
567 | 567 | searching for changes |
|
568 | 568 | no changes found |
|
569 | 569 | pushing subrepo s to ../tcc/s |
|
570 | 570 | searching for changes |
|
571 | 571 | no changes found |
|
572 | 572 | pushing subrepo t to ../tcc/t |
|
573 | 573 | searching for changes |
|
574 | 574 | no changes found |
|
575 | 575 | searching for changes |
|
576 | 576 | no changes found |
|
577 | 577 | [1] |
|
578 | 578 | |
|
579 | 579 | after push their stores become clean |
|
580 | 580 | |
|
581 | 581 | $ hg push ../tcc |
|
582 | 582 | pushing to ../tcc |
|
583 | 583 | no changes made to subrepo s/ss since last push to ../tcc/s/ss (glob) |
|
584 | 584 | no changes made to subrepo s since last push to ../tcc/s |
|
585 | 585 | no changes made to subrepo t since last push to ../tcc/t |
|
586 | 586 | searching for changes |
|
587 | 587 | no changes found |
|
588 | 588 | [1] |
|
589 | 589 | |
|
590 | 590 | updating a subrepo to a different revision or changing |
|
591 | 591 | its working directory does not make its store dirty |
|
592 | 592 | |
|
593 | 593 | $ hg -R s update '.^' |
|
594 | 594 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
595 | 595 | $ hg push |
|
596 | 596 | pushing to $TESTTMP/t (glob) |
|
597 | 597 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
598 | 598 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
599 | 599 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
600 | 600 | searching for changes |
|
601 | 601 | no changes found |
|
602 | 602 | [1] |
|
603 | 603 | $ echo foo >> s/a |
|
604 | 604 | $ hg push |
|
605 | 605 | pushing to $TESTTMP/t (glob) |
|
606 | 606 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
607 | 607 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
608 | 608 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
609 | 609 | searching for changes |
|
610 | 610 | no changes found |
|
611 | 611 | [1] |
|
612 | 612 | $ hg -R s update -C tip |
|
613 | 613 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
614 | 614 | |
|
615 | 615 | committing into a subrepo makes its store (but not its parent's store) dirty |
|
616 | 616 | |
|
617 | 617 | $ echo foo >> s/ss/a |
|
618 | 618 | $ hg -R s/ss commit -m 'test dirty store detection' |
|
619 | 619 | |
|
620 | 620 | $ hg out -S -r `hg log -r tip -T "{node|short}"` |
|
621 | 621 | comparing with $TESTTMP/t (glob) |
|
622 | 622 | searching for changes |
|
623 | 623 | no changes found |
|
624 | 624 | comparing with $TESTTMP/t/s |
|
625 | 625 | searching for changes |
|
626 | 626 | no changes found |
|
627 | 627 | comparing with $TESTTMP/t/s/ss |
|
628 | 628 | searching for changes |
|
629 | 629 | changeset: 1:79ea5566a333 |
|
630 | 630 | tag: tip |
|
631 | 631 | user: test |
|
632 | 632 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
633 | 633 | summary: test dirty store detection |
|
634 | 634 | |
|
635 | 635 | comparing with $TESTTMP/t/t |
|
636 | 636 | searching for changes |
|
637 | 637 | no changes found |
|
638 | 638 | |
|
639 | 639 | $ hg push |
|
640 | 640 | pushing to $TESTTMP/t (glob) |
|
641 | 641 | pushing subrepo s/ss to $TESTTMP/t/s/ss (glob) |
|
642 | 642 | searching for changes |
|
643 | 643 | adding changesets |
|
644 | 644 | adding manifests |
|
645 | 645 | adding file changes |
|
646 | 646 | added 1 changesets with 1 changes to 1 files |
|
647 | 647 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
648 | 648 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
649 | 649 | searching for changes |
|
650 | 650 | no changes found |
|
651 | 651 | [1] |
|
652 | 652 | |
|
653 | 653 | a subrepo store may be clean versus one repo but not versus another |
|
654 | 654 | |
|
655 | 655 | $ hg push |
|
656 | 656 | pushing to $TESTTMP/t (glob) |
|
657 | 657 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss (glob) |
|
658 | 658 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
659 | 659 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
660 | 660 | searching for changes |
|
661 | 661 | no changes found |
|
662 | 662 | [1] |
|
663 | 663 | $ hg push ../tcc |
|
664 | 664 | pushing to ../tcc |
|
665 | 665 | pushing subrepo s/ss to ../tcc/s/ss (glob) |
|
666 | 666 | searching for changes |
|
667 | 667 | adding changesets |
|
668 | 668 | adding manifests |
|
669 | 669 | adding file changes |
|
670 | 670 | added 1 changesets with 1 changes to 1 files |
|
671 | 671 | no changes made to subrepo s since last push to ../tcc/s |
|
672 | 672 | no changes made to subrepo t since last push to ../tcc/t |
|
673 | 673 | searching for changes |
|
674 | 674 | no changes found |
|
675 | 675 | [1] |
|
676 | 676 | |
|
677 | 677 | update |
|
678 | 678 | |
|
679 | 679 | $ cd ../t |
|
680 | 680 | $ hg up -C # discard our earlier merge |
|
681 | 681 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
682 | 682 | 2 other heads for branch "default" |
|
683 | 683 | $ echo blah > t/t |
|
684 | 684 | $ hg ci -m13 |
|
685 | 685 | committing subrepository t |
|
686 | 686 | |
|
687 | 687 | backout calls revert internally with minimal opts, which should not raise |
|
688 | 688 | KeyError |
|
689 | 689 | |
|
690 | 690 | $ hg backout ".^" --no-commit |
|
691 | 691 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
692 | 692 | changeset c373c8102e68 backed out, don't forget to commit. |
|
693 | 693 | |
|
694 | 694 | $ hg up -C # discard changes |
|
695 | 695 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
696 | 696 | 2 other heads for branch "default" |
|
697 | 697 | |
|
698 | 698 | pull |
|
699 | 699 | |
|
700 | 700 | $ cd ../tc |
|
701 | 701 | $ hg pull |
|
702 | 702 | pulling from $TESTTMP/t (glob) |
|
703 | 703 | searching for changes |
|
704 | 704 | adding changesets |
|
705 | 705 | adding manifests |
|
706 | 706 | adding file changes |
|
707 | 707 | added 1 changesets with 1 changes to 1 files |
|
708 | 708 | (run 'hg update' to get a working copy) |
|
709 | 709 | |
|
710 | 710 | should pull t |
|
711 | 711 | |
|
712 | 712 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` |
|
713 | 713 | comparing with $TESTTMP/t (glob) |
|
714 | 714 | no changes found |
|
715 | 715 | comparing with $TESTTMP/t/s |
|
716 | 716 | searching for changes |
|
717 | 717 | no changes found |
|
718 | 718 | comparing with $TESTTMP/t/s/ss |
|
719 | 719 | searching for changes |
|
720 | 720 | no changes found |
|
721 | 721 | comparing with $TESTTMP/t/t |
|
722 | 722 | searching for changes |
|
723 | 723 | changeset: 5:52c0adc0515a |
|
724 | 724 | tag: tip |
|
725 | 725 | user: test |
|
726 | 726 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
727 | 727 | summary: 13 |
|
728 | 728 | |
|
729 | 729 | |
|
730 | 730 | $ hg up |
|
731 | 731 | pulling subrepo t from $TESTTMP/t/t |
|
732 | 732 | searching for changes |
|
733 | 733 | adding changesets |
|
734 | 734 | adding manifests |
|
735 | 735 | adding file changes |
|
736 | 736 | added 1 changesets with 1 changes to 1 files |
|
737 | 737 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
738 | 738 | 2 other heads for branch "default" |
|
739 | 739 | $ cat t/t |
|
740 | 740 | blah |
|
741 | 741 | |
|
742 | 742 | bogus subrepo path aborts |
|
743 | 743 | |
|
744 | 744 | $ echo 'bogus=[boguspath' >> .hgsub |
|
745 | 745 | $ hg ci -m 'bogus subrepo path' |
|
746 | 746 | abort: missing ] in subrepo source |
|
747 | 747 | [255] |
|
748 | 748 | |
|
749 | 749 | Issue1986: merge aborts when trying to merge a subrepo that |
|
750 | 750 | shouldn't need merging |
|
751 | 751 | |
|
752 | 752 | # subrepo layout |
|
753 | 753 | # |
|
754 | 754 | # o 5 br |
|
755 | 755 | # /| |
|
756 | 756 | # o | 4 default |
|
757 | 757 | # | | |
|
758 | 758 | # | o 3 br |
|
759 | 759 | # |/| |
|
760 | 760 | # o | 2 default |
|
761 | 761 | # | | |
|
762 | 762 | # | o 1 br |
|
763 | 763 | # |/ |
|
764 | 764 | # o 0 default |
|
765 | 765 | |
|
766 | 766 | $ cd .. |
|
767 | 767 | $ rm -rf sub |
|
768 | 768 | $ hg init main |
|
769 | 769 | $ cd main |
|
770 | 770 | $ hg init s |
|
771 | 771 | $ cd s |
|
772 | 772 | $ echo a > a |
|
773 | 773 | $ hg ci -Am1 |
|
774 | 774 | adding a |
|
775 | 775 | $ hg branch br |
|
776 | 776 | marked working directory as branch br |
|
777 | 777 | (branches are permanent and global, did you want a bookmark?) |
|
778 | 778 | $ echo a >> a |
|
779 | 779 | $ hg ci -m1 |
|
780 | 780 | $ hg up default |
|
781 | 781 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
782 | 782 | $ echo b > b |
|
783 | 783 | $ hg ci -Am1 |
|
784 | 784 | adding b |
|
785 | 785 | $ hg up br |
|
786 | 786 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
787 | 787 | $ hg merge tip |
|
788 | 788 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
789 | 789 | (branch merge, don't forget to commit) |
|
790 | 790 | $ hg ci -m1 |
|
791 | 791 | $ hg up 2 |
|
792 | 792 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
793 | 793 | $ echo c > c |
|
794 | 794 | $ hg ci -Am1 |
|
795 | 795 | adding c |
|
796 | 796 | $ hg up 3 |
|
797 | 797 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
798 | 798 | $ hg merge 4 |
|
799 | 799 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
800 | 800 | (branch merge, don't forget to commit) |
|
801 | 801 | $ hg ci -m1 |
|
802 | 802 | |
|
803 | 803 | # main repo layout: |
|
804 | 804 | # |
|
805 | 805 | # * <-- try to merge default into br again |
|
806 | 806 | # .`| |
|
807 | 807 | # . o 5 br --> substate = 5 |
|
808 | 808 | # . | |
|
809 | 809 | # o | 4 default --> substate = 4 |
|
810 | 810 | # | | |
|
811 | 811 | # | o 3 br --> substate = 2 |
|
812 | 812 | # |/| |
|
813 | 813 | # o | 2 default --> substate = 2 |
|
814 | 814 | # | | |
|
815 | 815 | # | o 1 br --> substate = 3 |
|
816 | 816 | # |/ |
|
817 | 817 | # o 0 default --> substate = 2 |
|
818 | 818 | |
|
819 | 819 | $ cd .. |
|
820 | 820 | $ echo 's = s' > .hgsub |
|
821 | 821 | $ hg -R s up 2 |
|
822 | 822 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
823 | 823 | $ hg ci -Am1 |
|
824 | 824 | adding .hgsub |
|
825 | 825 | $ hg branch br |
|
826 | 826 | marked working directory as branch br |
|
827 | 827 | (branches are permanent and global, did you want a bookmark?) |
|
828 | 828 | $ echo b > b |
|
829 | 829 | $ hg -R s up 3 |
|
830 | 830 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
831 | 831 | $ hg ci -Am1 |
|
832 | 832 | adding b |
|
833 | 833 | $ hg up default |
|
834 | 834 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
835 | 835 | $ echo c > c |
|
836 | 836 | $ hg ci -Am1 |
|
837 | 837 | adding c |
|
838 | 838 | $ hg up 1 |
|
839 | 839 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
840 | 840 | $ hg merge 2 |
|
841 | 841 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
842 | 842 | (branch merge, don't forget to commit) |
|
843 | 843 | $ hg ci -m1 |
|
844 | 844 | $ hg up 2 |
|
845 | 845 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
846 | 846 | $ hg -R s up 4 |
|
847 | 847 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
848 | 848 | $ echo d > d |
|
849 | 849 | $ hg ci -Am1 |
|
850 | 850 | adding d |
|
851 | 851 | $ hg up 3 |
|
852 | 852 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
853 | 853 | $ hg -R s up 5 |
|
854 | 854 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
855 | 855 | $ echo e > e |
|
856 | 856 | $ hg ci -Am1 |
|
857 | 857 | adding e |
|
858 | 858 | |
|
859 | 859 | $ hg up 5 |
|
860 | 860 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
861 | 861 | $ hg merge 4 # try to merge default into br again |
|
862 | 862 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) |
|
863 | 863 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
864 | 864 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
865 | 865 | (branch merge, don't forget to commit) |
|
866 | 866 | $ cd .. |
|
867 | 867 | |
|
868 | 868 | test subrepo delete from .hgsubstate |
|
869 | 869 | |
|
870 | 870 | $ hg init testdelete |
|
871 | 871 | $ mkdir testdelete/nested testdelete/nested2 |
|
872 | 872 | $ hg init testdelete/nested |
|
873 | 873 | $ hg init testdelete/nested2 |
|
874 | 874 | $ echo test > testdelete/nested/foo |
|
875 | 875 | $ echo test > testdelete/nested2/foo |
|
876 | 876 | $ hg -R testdelete/nested add |
|
877 | 877 | adding testdelete/nested/foo (glob) |
|
878 | 878 | $ hg -R testdelete/nested2 add |
|
879 | 879 | adding testdelete/nested2/foo (glob) |
|
880 | 880 | $ hg -R testdelete/nested ci -m test |
|
881 | 881 | $ hg -R testdelete/nested2 ci -m test |
|
882 | 882 | $ echo nested = nested > testdelete/.hgsub |
|
883 | 883 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
884 | 884 | $ hg -R testdelete add |
|
885 | 885 | adding testdelete/.hgsub (glob) |
|
886 | 886 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
887 | 887 | $ echo nested = nested > testdelete/.hgsub |
|
888 | 888 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
889 | 889 | $ cat testdelete/.hgsubstate |
|
890 | 890 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
891 | 891 | $ hg -R testdelete remove testdelete/.hgsub |
|
892 | 892 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
893 | 893 | $ cat testdelete/.hgsubstate |
|
894 | 894 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
895 | 895 | |
|
896 | 896 | test repository cloning |
|
897 | 897 | |
|
898 | 898 | $ mkdir mercurial mercurial2 |
|
899 | 899 | $ hg init nested_absolute |
|
900 | 900 | $ echo test > nested_absolute/foo |
|
901 | 901 | $ hg -R nested_absolute add |
|
902 | 902 | adding nested_absolute/foo (glob) |
|
903 | 903 | $ hg -R nested_absolute ci -mtest |
|
904 | 904 | $ cd mercurial |
|
905 | 905 | $ hg init nested_relative |
|
906 | 906 | $ echo test2 > nested_relative/foo2 |
|
907 | 907 | $ hg -R nested_relative add |
|
908 | 908 | adding nested_relative/foo2 (glob) |
|
909 | 909 | $ hg -R nested_relative ci -mtest2 |
|
910 | 910 | $ hg init main |
|
911 | 911 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
912 | 912 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
913 | 913 | $ hg -R main add |
|
914 | 914 | adding main/.hgsub (glob) |
|
915 | 915 | $ hg -R main ci -m "add subrepos" |
|
916 | 916 | $ cd .. |
|
917 | 917 | $ hg clone mercurial/main mercurial2/main |
|
918 | 918 | updating to branch default |
|
919 | 919 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
920 | 920 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
921 | 921 | > mercurial2/main/nested_relative/.hg/hgrc |
|
922 | 922 | [paths] |
|
923 | 923 | default = $TESTTMP/mercurial/nested_absolute |
|
924 | 924 | [paths] |
|
925 | 925 | default = $TESTTMP/mercurial/nested_relative |
|
926 | 926 | $ rm -rf mercurial mercurial2 |
|
927 | 927 | |
|
928 | 928 | Issue1977: multirepo push should fail if subrepo push fails |
|
929 | 929 | |
|
930 | 930 | $ hg init repo |
|
931 | 931 | $ hg init repo/s |
|
932 | 932 | $ echo a > repo/s/a |
|
933 | 933 | $ hg -R repo/s ci -Am0 |
|
934 | 934 | adding a |
|
935 | 935 | $ echo s = s > repo/.hgsub |
|
936 | 936 | $ hg -R repo ci -Am1 |
|
937 | 937 | adding .hgsub |
|
938 | 938 | $ hg clone repo repo2 |
|
939 | 939 | updating to branch default |
|
940 | 940 | cloning subrepo s from $TESTTMP/repo/s |
|
941 | 941 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
942 | 942 | $ hg -q -R repo2 pull -u |
|
943 | 943 | $ echo 1 > repo2/s/a |
|
944 | 944 | $ hg -R repo2/s ci -m2 |
|
945 | 945 | $ hg -q -R repo2/s push |
|
946 | 946 | $ hg -R repo2/s up -C 0 |
|
947 | 947 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
948 | 948 | $ echo 2 > repo2/s/b |
|
949 | 949 | $ hg -R repo2/s ci -m3 -A |
|
950 | 950 | adding b |
|
951 | 951 | created new head |
|
952 | 952 | $ hg -R repo2 ci -m3 |
|
953 | 953 | $ hg -q -R repo2 push |
|
954 | 954 | abort: push creates new remote head cc505f09a8b2! (in subrepo s) |
|
955 | 955 | (merge or see "hg help push" for details about pushing new heads) |
|
956 | 956 | [255] |
|
957 | 957 | $ hg -R repo update |
|
958 | 958 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
959 | 959 | |
|
960 | 960 | test if untracked file is not overwritten |
|
961 | 961 | |
|
962 | 962 | (this also tests that updated .hgsubstate is treated as "modified", |
|
963 | 963 | when 'merge.update()' is aborted before 'merge.recordupdates()', even |
|
964 | 964 | if none of mode, size and timestamp of it isn't changed on the |
|
965 | 965 | filesystem (see also issue4583)) |
|
966 | 966 | |
|
967 | 967 | $ echo issue3276_ok > repo/s/b |
|
968 | 968 | $ hg -R repo2 push -f -q |
|
969 | 969 | $ touch -t 200001010000 repo/.hgsubstate |
|
970 | 970 | |
|
971 | 971 | $ cat >> repo/.hg/hgrc <<EOF |
|
972 | 972 | > [fakedirstatewritetime] |
|
973 | 973 | > # emulate invoking dirstate.write() via repo.status() |
|
974 | 974 | > # at 2000-01-01 00:00 |
|
975 | 975 | > fakenow = 200001010000 |
|
976 | 976 | > |
|
977 | 977 | > [extensions] |
|
978 | 978 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
|
979 | 979 | > EOF |
|
980 | 980 | $ hg -R repo update |
|
981 | 981 | b: untracked file differs |
|
982 | 982 | abort: untracked files in working directory differ from files in requested revision (in subrepo s) |
|
983 | 983 | [255] |
|
984 | 984 | $ cat >> repo/.hg/hgrc <<EOF |
|
985 | 985 | > [extensions] |
|
986 | 986 | > fakedirstatewritetime = ! |
|
987 | 987 | > EOF |
|
988 | 988 | |
|
989 | 989 | $ cat repo/s/b |
|
990 | 990 | issue3276_ok |
|
991 | 991 | $ rm repo/s/b |
|
992 | 992 | $ touch -t 200001010000 repo/.hgsubstate |
|
993 | 993 | $ hg -R repo revert --all |
|
994 | 994 | reverting repo/.hgsubstate (glob) |
|
995 | 995 | reverting subrepo s |
|
996 | 996 | $ hg -R repo update |
|
997 | 997 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
998 | 998 | $ cat repo/s/b |
|
999 | 999 | 2 |
|
1000 | 1000 | $ rm -rf repo2 repo |
|
1001 | 1001 | |
|
1002 | 1002 | |
|
1003 | 1003 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
1004 | 1004 | |
|
1005 | 1005 | Prepare a repo with subrepo |
|
1006 | 1006 | |
|
1007 | 1007 | $ hg init issue1852a |
|
1008 | 1008 | $ cd issue1852a |
|
1009 | 1009 | $ hg init sub/repo |
|
1010 | 1010 | $ echo test > sub/repo/foo |
|
1011 | 1011 | $ hg -R sub/repo add sub/repo/foo |
|
1012 | 1012 | $ echo sub/repo = sub/repo > .hgsub |
|
1013 | 1013 | $ hg add .hgsub |
|
1014 | 1014 | $ hg ci -mtest |
|
1015 | 1015 | committing subrepository sub/repo (glob) |
|
1016 | 1016 | $ echo test >> sub/repo/foo |
|
1017 | 1017 | $ hg ci -mtest |
|
1018 | 1018 | committing subrepository sub/repo (glob) |
|
1019 | 1019 | $ hg cat sub/repo/foo |
|
1020 | 1020 | test |
|
1021 | 1021 | test |
|
1022 | 1022 | $ mkdir -p tmp/sub/repo |
|
1023 | 1023 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo |
|
1024 | 1024 | $ cat tmp/sub/repo/foo_p |
|
1025 | 1025 | test |
|
1026 | 1026 | $ mv sub/repo sub_ |
|
1027 | 1027 | $ hg cat sub/repo/baz |
|
1028 | 1028 | skipping missing subrepository: sub/repo |
|
1029 | 1029 | [1] |
|
1030 | 1030 | $ rm -rf sub/repo |
|
1031 | 1031 | $ mv sub_ sub/repo |
|
1032 | 1032 | $ cd .. |
|
1033 | 1033 | |
|
1034 | 1034 | Create repo without default path, pull top repo, and see what happens on update |
|
1035 | 1035 | |
|
1036 | 1036 | $ hg init issue1852b |
|
1037 | 1037 | $ hg -R issue1852b pull issue1852a |
|
1038 | 1038 | pulling from issue1852a |
|
1039 | 1039 | requesting all changes |
|
1040 | 1040 | adding changesets |
|
1041 | 1041 | adding manifests |
|
1042 | 1042 | adding file changes |
|
1043 | 1043 | added 2 changesets with 3 changes to 2 files |
|
1044 | 1044 | (run 'hg update' to get a working copy) |
|
1045 | 1045 | $ hg -R issue1852b update |
|
1046 | 1046 | abort: default path for subrepository not found (in subrepo sub/repo) (glob) |
|
1047 | 1047 | [255] |
|
1048 | 1048 | |
|
1049 | 1049 | Ensure a full traceback, not just the SubrepoAbort part |
|
1050 | 1050 | |
|
1051 | 1051 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' |
|
1052 | 1052 | raise error.Abort(_("default path for subrepository not found")) |
|
1053 | 1053 | |
|
1054 | 1054 | Pull -u now doesn't help |
|
1055 | 1055 | |
|
1056 | 1056 | $ hg -R issue1852b pull -u issue1852a |
|
1057 | 1057 | pulling from issue1852a |
|
1058 | 1058 | searching for changes |
|
1059 | 1059 | no changes found |
|
1060 | 1060 | |
|
1061 | 1061 | Try the same, but with pull -u |
|
1062 | 1062 | |
|
1063 | 1063 | $ hg init issue1852c |
|
1064 | 1064 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
1065 | 1065 | pulling from issue1852a |
|
1066 | 1066 | adding changesets |
|
1067 | 1067 | adding manifests |
|
1068 | 1068 | adding file changes |
|
1069 | 1069 | added 1 changesets with 2 changes to 2 files |
|
1070 | 1070 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
1071 | 1071 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1072 | 1072 | |
|
1073 | 1073 | Try to push from the other side |
|
1074 | 1074 | |
|
1075 | 1075 | $ hg -R issue1852a push `pwd`/issue1852c |
|
1076 | 1076 | pushing to $TESTTMP/issue1852c (glob) |
|
1077 | 1077 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob) |
|
1078 | 1078 | searching for changes |
|
1079 | 1079 | no changes found |
|
1080 | 1080 | searching for changes |
|
1081 | 1081 | adding changesets |
|
1082 | 1082 | adding manifests |
|
1083 | 1083 | adding file changes |
|
1084 | 1084 | added 1 changesets with 1 changes to 1 files |
|
1085 | 1085 | |
|
1086 | 1086 | Incoming and outgoing should not use the default path: |
|
1087 | 1087 | |
|
1088 | 1088 | $ hg clone -q issue1852a issue1852d |
|
1089 | 1089 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
1090 | 1090 | comparing with issue1852c |
|
1091 | 1091 | searching for changes |
|
1092 | 1092 | no changes found |
|
1093 | 1093 | comparing with issue1852c/sub/repo |
|
1094 | 1094 | searching for changes |
|
1095 | 1095 | no changes found |
|
1096 | 1096 | [1] |
|
1097 | 1097 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
1098 | 1098 | comparing with issue1852c |
|
1099 | 1099 | searching for changes |
|
1100 | 1100 | no changes found |
|
1101 | 1101 | comparing with issue1852c/sub/repo |
|
1102 | 1102 | searching for changes |
|
1103 | 1103 | no changes found |
|
1104 | 1104 | [1] |
|
1105 | 1105 | |
|
1106 | 1106 | Check that merge of a new subrepo doesn't write the uncommitted state to |
|
1107 | 1107 | .hgsubstate (issue4622) |
|
1108 | 1108 | |
|
1109 | 1109 | $ hg init issue1852a/addedsub |
|
1110 | 1110 | $ echo zzz > issue1852a/addedsub/zz.txt |
|
1111 | 1111 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" |
|
1112 | 1112 | |
|
1113 | 1113 | $ hg clone issue1852a/addedsub issue1852d/addedsub |
|
1114 | 1114 | updating to branch default |
|
1115 | 1115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1116 | 1116 | |
|
1117 | 1117 | $ echo def > issue1852a/sub/repo/foo |
|
1118 | 1118 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' |
|
1119 | 1119 | adding tmp/sub/repo/foo_p |
|
1120 | 1120 | committing subrepository sub/repo (glob) |
|
1121 | 1121 | |
|
1122 | 1122 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub |
|
1123 | 1123 | $ echo xyz > issue1852d/sub/repo/foo |
|
1124 | 1124 | $ hg -R issue1852d pull -u |
|
1125 | 1125 | pulling from $TESTTMP/issue1852a (glob) |
|
1126 | 1126 | searching for changes |
|
1127 | 1127 | adding changesets |
|
1128 | 1128 | adding manifests |
|
1129 | 1129 | adding file changes |
|
1130 | 1130 | added 1 changesets with 2 changes to 2 files |
|
1131 | 1131 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) |
|
1132 | 1132 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1133 | 1133 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob) |
|
1134 | 1134 | searching for changes |
|
1135 | 1135 | adding changesets |
|
1136 | 1136 | adding manifests |
|
1137 | 1137 | adding file changes |
|
1138 | 1138 | added 1 changesets with 1 changes to 1 files |
|
1139 | 1139 | subrepository sources for sub/repo differ (glob) |
|
1140 | 1140 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l |
|
1141 | 1141 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1142 | 1142 | $ cat issue1852d/.hgsubstate |
|
1143 | 1143 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo |
|
1144 | 1144 | |
|
1145 | 1145 | Check status of files when none of them belong to the first |
|
1146 | 1146 | subrepository: |
|
1147 | 1147 | |
|
1148 | 1148 | $ hg init subrepo-status |
|
1149 | 1149 | $ cd subrepo-status |
|
1150 | 1150 | $ hg init subrepo-1 |
|
1151 | 1151 | $ hg init subrepo-2 |
|
1152 | 1152 | $ cd subrepo-2 |
|
1153 | 1153 | $ touch file |
|
1154 | 1154 | $ hg add file |
|
1155 | 1155 | $ cd .. |
|
1156 | 1156 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
1157 | 1157 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
1158 | 1158 | $ hg add .hgsub |
|
1159 | 1159 | $ hg ci -m 'Added subrepos' |
|
1160 | 1160 | committing subrepository subrepo-2 |
|
1161 | 1161 | $ hg st subrepo-2/file |
|
1162 | 1162 | |
|
1163 | 1163 | Check that share works with subrepo |
|
1164 | 1164 | $ hg --config extensions.share= share . ../shared |
|
1165 | 1165 | updating working directory |
|
1166 | 1166 | cloning subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
1167 | 1167 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1168 | 1168 | $ test -f ../shared/subrepo-1/.hg/sharedpath |
|
1169 | 1169 | [1] |
|
1170 | 1170 | $ hg -R ../shared in |
|
1171 | 1171 | abort: repository default not found! |
|
1172 | 1172 | [255] |
|
1173 | 1173 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
1174 | 1174 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
1175 | 1175 | $ hg -R ../shared/subrepo-1 sum --remote |
|
1176 | 1176 | parent: -1:000000000000 tip (empty repository) |
|
1177 | 1177 | branch: default |
|
1178 | 1178 | commit: (clean) |
|
1179 | 1179 | update: (current) |
|
1180 | 1180 | remote: (synced) |
|
1181 | 1181 | |
|
1182 | 1182 | Check hg update --clean |
|
1183 | 1183 | $ cd $TESTTMP/t |
|
1184 | 1184 | $ rm -r t/t.orig |
|
1185 | 1185 | $ hg status -S --all |
|
1186 | 1186 | C .hgsub |
|
1187 | 1187 | C .hgsubstate |
|
1188 | 1188 | C a |
|
1189 | 1189 | C s/.hgsub |
|
1190 | 1190 | C s/.hgsubstate |
|
1191 | 1191 | C s/a |
|
1192 | 1192 | C s/ss/a |
|
1193 | 1193 | C t/t |
|
1194 | 1194 | $ echo c1 > s/a |
|
1195 | 1195 | $ cd s |
|
1196 | 1196 | $ echo c1 > b |
|
1197 | 1197 | $ echo c1 > c |
|
1198 | 1198 | $ hg add b |
|
1199 | 1199 | $ cd .. |
|
1200 | 1200 | $ hg status -S |
|
1201 | 1201 | M s/a |
|
1202 | 1202 | A s/b |
|
1203 | 1203 | ? s/c |
|
1204 | 1204 | $ hg update -C |
|
1205 | 1205 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1206 | 1206 | 2 other heads for branch "default" |
|
1207 | 1207 | $ hg status -S |
|
1208 | 1208 | ? s/b |
|
1209 | 1209 | ? s/c |
|
1210 | 1210 | |
|
1211 | 1211 | Sticky subrepositories, no changes |
|
1212 | 1212 | $ cd $TESTTMP/t |
|
1213 | 1213 | $ hg id |
|
1214 | 1214 | 925c17564ef8 tip |
|
1215 | 1215 | $ hg -R s id |
|
1216 | 1216 | 12a213df6fa9 tip |
|
1217 | 1217 | $ hg -R t id |
|
1218 | 1218 | 52c0adc0515a tip |
|
1219 | 1219 | $ hg update 11 |
|
1220 | 1220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1221 | 1221 | $ hg id |
|
1222 | 1222 | 365661e5936a |
|
1223 | 1223 | $ hg -R s id |
|
1224 | 1224 | fc627a69481f |
|
1225 | 1225 | $ hg -R t id |
|
1226 | 1226 | e95bcfa18a35 |
|
1227 | 1227 | |
|
1228 | 1228 | Sticky subrepositories, file changes |
|
1229 | 1229 | $ touch s/f1 |
|
1230 | 1230 | $ touch t/f1 |
|
1231 | 1231 | $ hg add -S s/f1 |
|
1232 | 1232 | $ hg add -S t/f1 |
|
1233 | 1233 | $ hg id |
|
1234 | 1234 | 365661e5936a+ |
|
1235 | 1235 | $ hg -R s id |
|
1236 | 1236 | fc627a69481f+ |
|
1237 | 1237 | $ hg -R t id |
|
1238 | 1238 | e95bcfa18a35+ |
|
1239 | 1239 | $ hg update tip |
|
1240 | 1240 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) |
|
1241 | 1241 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1242 | 1242 | subrepository sources for s differ |
|
1243 | 1243 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l |
|
1244 | 1244 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) |
|
1245 | 1245 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1246 | 1246 | subrepository sources for t differ |
|
1247 | 1247 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l |
|
1248 | 1248 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1249 | 1249 | $ hg id |
|
1250 | 1250 | 925c17564ef8+ tip |
|
1251 | 1251 | $ hg -R s id |
|
1252 | 1252 | fc627a69481f+ |
|
1253 | 1253 | $ hg -R t id |
|
1254 | 1254 | e95bcfa18a35+ |
|
1255 | 1255 | $ hg update --clean tip |
|
1256 | 1256 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1257 | 1257 | |
|
1258 | 1258 | Sticky subrepository, revision updates |
|
1259 | 1259 | $ hg id |
|
1260 | 1260 | 925c17564ef8 tip |
|
1261 | 1261 | $ hg -R s id |
|
1262 | 1262 | 12a213df6fa9 tip |
|
1263 | 1263 | $ hg -R t id |
|
1264 | 1264 | 52c0adc0515a tip |
|
1265 | 1265 | $ cd s |
|
1266 | 1266 | $ hg update -r -2 |
|
1267 | 1267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1268 | 1268 | $ cd ../t |
|
1269 | 1269 | $ hg update -r 2 |
|
1270 | 1270 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1271 | 1271 | $ cd .. |
|
1272 | 1272 | $ hg update 10 |
|
1273 | 1273 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1274 | 1274 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1275 | 1275 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) |
|
1276 | 1276 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1277 | 1277 | subrepository sources for t differ (in checked out version) |
|
1278 | 1278 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l |
|
1279 | 1279 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1280 | 1280 | $ hg id |
|
1281 | 1281 | e45c8b14af55+ |
|
1282 | 1282 | $ hg -R s id |
|
1283 | 1283 | 02dcf1d70411 |
|
1284 | 1284 | $ hg -R t id |
|
1285 | 1285 | 7af322bc1198 |
|
1286 | 1286 | |
|
1287 | 1287 | Sticky subrepository, file changes and revision updates |
|
1288 | 1288 | $ touch s/f1 |
|
1289 | 1289 | $ touch t/f1 |
|
1290 | 1290 | $ hg add -S s/f1 |
|
1291 | 1291 | $ hg add -S t/f1 |
|
1292 | 1292 | $ hg id |
|
1293 | 1293 | e45c8b14af55+ |
|
1294 | 1294 | $ hg -R s id |
|
1295 | 1295 | 02dcf1d70411+ |
|
1296 | 1296 | $ hg -R t id |
|
1297 | 1297 | 7af322bc1198+ |
|
1298 | 1298 | $ hg update tip |
|
1299 | 1299 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) |
|
1300 | 1300 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1301 | 1301 | subrepository sources for s differ |
|
1302 | 1302 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l |
|
1303 | 1303 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) |
|
1304 | 1304 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1305 | 1305 | subrepository sources for t differ |
|
1306 | 1306 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l |
|
1307 | 1307 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1308 | 1308 | $ hg id |
|
1309 | 1309 | 925c17564ef8+ tip |
|
1310 | 1310 | $ hg -R s id |
|
1311 | 1311 | 02dcf1d70411+ |
|
1312 | 1312 | $ hg -R t id |
|
1313 | 1313 | 7af322bc1198+ |
|
1314 | 1314 | |
|
1315 | 1315 | Sticky repository, update --clean |
|
1316 | 1316 | $ hg update --clean tip |
|
1317 | 1317 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1318 | 1318 | $ hg id |
|
1319 | 1319 | 925c17564ef8 tip |
|
1320 | 1320 | $ hg -R s id |
|
1321 | 1321 | 12a213df6fa9 tip |
|
1322 | 1322 | $ hg -R t id |
|
1323 | 1323 | 52c0adc0515a tip |
|
1324 | 1324 | |
|
1325 | 1325 | Test subrepo already at intended revision: |
|
1326 | 1326 | $ cd s |
|
1327 | 1327 | $ hg update fc627a69481f |
|
1328 | 1328 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1329 | 1329 | $ cd .. |
|
1330 | 1330 | $ hg update 11 |
|
1331 | 1331 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1332 | 1332 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
1333 | 1333 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1334 | 1334 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1335 | 1335 | $ hg id -n |
|
1336 | 1336 | 11+ |
|
1337 | 1337 | $ hg -R s id |
|
1338 | 1338 | fc627a69481f |
|
1339 | 1339 | $ hg -R t id |
|
1340 | 1340 | e95bcfa18a35 |
|
1341 | 1341 | |
|
1342 | 1342 | Test that removing .hgsubstate doesn't break anything: |
|
1343 | 1343 | |
|
1344 | 1344 | $ hg rm -f .hgsubstate |
|
1345 | 1345 | $ hg ci -mrm |
|
1346 | 1346 | nothing changed |
|
1347 | 1347 | [1] |
|
1348 | 1348 | $ hg log -vr tip |
|
1349 | 1349 | changeset: 13:925c17564ef8 |
|
1350 | 1350 | tag: tip |
|
1351 | 1351 | user: test |
|
1352 | 1352 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1353 | 1353 | files: .hgsubstate |
|
1354 | 1354 | description: |
|
1355 | 1355 | 13 |
|
1356 | 1356 | |
|
1357 | 1357 | |
|
1358 | 1358 | |
|
1359 | 1359 | Test that removing .hgsub removes .hgsubstate: |
|
1360 | 1360 | |
|
1361 | 1361 | $ hg rm .hgsub |
|
1362 | 1362 | $ hg ci -mrm2 |
|
1363 | 1363 | created new head |
|
1364 | 1364 | $ hg log -vr tip |
|
1365 | 1365 | changeset: 14:2400bccd50af |
|
1366 | 1366 | tag: tip |
|
1367 | 1367 | parent: 11:365661e5936a |
|
1368 | 1368 | user: test |
|
1369 | 1369 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1370 | 1370 | files: .hgsub .hgsubstate |
|
1371 | 1371 | description: |
|
1372 | 1372 | rm2 |
|
1373 | 1373 | |
|
1374 | 1374 | |
|
1375 | 1375 | Test issue3153: diff -S with deleted subrepos |
|
1376 | 1376 | |
|
1377 | 1377 | $ hg diff --nodates -S -c . |
|
1378 | 1378 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
1379 | 1379 | --- a/.hgsub |
|
1380 | 1380 | +++ /dev/null |
|
1381 | 1381 | @@ -1,2 +0,0 @@ |
|
1382 | 1382 | -s = s |
|
1383 | 1383 | -t = t |
|
1384 | 1384 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
1385 | 1385 | --- a/.hgsubstate |
|
1386 | 1386 | +++ /dev/null |
|
1387 | 1387 | @@ -1,2 +0,0 @@ |
|
1388 | 1388 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1389 | 1389 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
1390 | 1390 | |
|
1391 | 1391 | Test behavior of add for explicit path in subrepo: |
|
1392 | 1392 | $ cd .. |
|
1393 | 1393 | $ hg init explicit |
|
1394 | 1394 | $ cd explicit |
|
1395 | 1395 | $ echo s = s > .hgsub |
|
1396 | 1396 | $ hg add .hgsub |
|
1397 | 1397 | $ hg init s |
|
1398 | 1398 | $ hg ci -m0 |
|
1399 | 1399 | Adding with an explicit path in a subrepo adds the file |
|
1400 | 1400 | $ echo c1 > f1 |
|
1401 | 1401 | $ echo c2 > s/f2 |
|
1402 | 1402 | $ hg st -S |
|
1403 | 1403 | ? f1 |
|
1404 | 1404 | ? s/f2 |
|
1405 | 1405 | $ hg add s/f2 |
|
1406 | 1406 | $ hg st -S |
|
1407 | 1407 | A s/f2 |
|
1408 | 1408 | ? f1 |
|
1409 | 1409 | $ hg ci -R s -m0 |
|
1410 | 1410 | $ hg ci -Am1 |
|
1411 | 1411 | adding f1 |
|
1412 | 1412 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
1413 | 1413 | $ echo c3 > f3 |
|
1414 | 1414 | $ echo c4 > s/f4 |
|
1415 | 1415 | $ hg st -S |
|
1416 | 1416 | ? f3 |
|
1417 | 1417 | ? s/f4 |
|
1418 | 1418 | $ hg add -S s/f4 |
|
1419 | 1419 | $ hg st -S |
|
1420 | 1420 | A s/f4 |
|
1421 | 1421 | ? f3 |
|
1422 | 1422 | $ hg ci -R s -m1 |
|
1423 | 1423 | $ hg ci -Ama2 |
|
1424 | 1424 | adding f3 |
|
1425 | 1425 | Adding without a path or pattern silently ignores subrepos |
|
1426 | 1426 | $ echo c5 > f5 |
|
1427 | 1427 | $ echo c6 > s/f6 |
|
1428 | 1428 | $ echo c7 > s/f7 |
|
1429 | 1429 | $ hg st -S |
|
1430 | 1430 | ? f5 |
|
1431 | 1431 | ? s/f6 |
|
1432 | 1432 | ? s/f7 |
|
1433 | 1433 | $ hg add |
|
1434 | 1434 | adding f5 |
|
1435 | 1435 | $ hg st -S |
|
1436 | 1436 | A f5 |
|
1437 | 1437 | ? s/f6 |
|
1438 | 1438 | ? s/f7 |
|
1439 | 1439 | $ hg ci -R s -Am2 |
|
1440 | 1440 | adding f6 |
|
1441 | 1441 | adding f7 |
|
1442 | 1442 | $ hg ci -m3 |
|
1443 | 1443 | Adding without a path or pattern with -S also adds files in subrepos |
|
1444 | 1444 | $ echo c8 > f8 |
|
1445 | 1445 | $ echo c9 > s/f9 |
|
1446 | 1446 | $ echo c10 > s/f10 |
|
1447 | 1447 | $ hg st -S |
|
1448 | 1448 | ? f8 |
|
1449 | 1449 | ? s/f10 |
|
1450 | 1450 | ? s/f9 |
|
1451 | 1451 | $ hg add -S |
|
1452 | 1452 | adding f8 |
|
1453 | 1453 | adding s/f10 (glob) |
|
1454 | 1454 | adding s/f9 (glob) |
|
1455 | 1455 | $ hg st -S |
|
1456 | 1456 | A f8 |
|
1457 | 1457 | A s/f10 |
|
1458 | 1458 | A s/f9 |
|
1459 | 1459 | $ hg ci -R s -m3 |
|
1460 | 1460 | $ hg ci -m4 |
|
1461 | 1461 | Adding with a pattern silently ignores subrepos |
|
1462 | 1462 | $ echo c11 > fm11 |
|
1463 | 1463 | $ echo c12 > fn12 |
|
1464 | 1464 | $ echo c13 > s/fm13 |
|
1465 | 1465 | $ echo c14 > s/fn14 |
|
1466 | 1466 | $ hg st -S |
|
1467 | 1467 | ? fm11 |
|
1468 | 1468 | ? fn12 |
|
1469 | 1469 | ? s/fm13 |
|
1470 | 1470 | ? s/fn14 |
|
1471 | 1471 | $ hg add 'glob:**fm*' |
|
1472 | 1472 | adding fm11 |
|
1473 | 1473 | $ hg st -S |
|
1474 | 1474 | A fm11 |
|
1475 | 1475 | ? fn12 |
|
1476 | 1476 | ? s/fm13 |
|
1477 | 1477 | ? s/fn14 |
|
1478 | 1478 | $ hg ci -R s -Am4 |
|
1479 | 1479 | adding fm13 |
|
1480 | 1480 | adding fn14 |
|
1481 | 1481 | $ hg ci -Am5 |
|
1482 | 1482 | adding fn12 |
|
1483 | 1483 | Adding with a pattern with -S also adds matches in subrepos |
|
1484 | 1484 | $ echo c15 > fm15 |
|
1485 | 1485 | $ echo c16 > fn16 |
|
1486 | 1486 | $ echo c17 > s/fm17 |
|
1487 | 1487 | $ echo c18 > s/fn18 |
|
1488 | 1488 | $ hg st -S |
|
1489 | 1489 | ? fm15 |
|
1490 | 1490 | ? fn16 |
|
1491 | 1491 | ? s/fm17 |
|
1492 | 1492 | ? s/fn18 |
|
1493 | 1493 | $ hg add -S 'glob:**fm*' |
|
1494 | 1494 | adding fm15 |
|
1495 | 1495 | adding s/fm17 (glob) |
|
1496 | 1496 | $ hg st -S |
|
1497 | 1497 | A fm15 |
|
1498 | 1498 | A s/fm17 |
|
1499 | 1499 | ? fn16 |
|
1500 | 1500 | ? s/fn18 |
|
1501 | 1501 | $ hg ci -R s -Am5 |
|
1502 | 1502 | adding fn18 |
|
1503 | 1503 | $ hg ci -Am6 |
|
1504 | 1504 | adding fn16 |
|
1505 | 1505 | |
|
1506 | 1506 | Test behavior of forget for explicit path in subrepo: |
|
1507 | 1507 | Forgetting an explicit path in a subrepo untracks the file |
|
1508 | 1508 | $ echo c19 > s/f19 |
|
1509 | 1509 | $ hg add s/f19 |
|
1510 | 1510 | $ hg st -S |
|
1511 | 1511 | A s/f19 |
|
1512 | 1512 | $ hg forget s/f19 |
|
1513 | 1513 | $ hg st -S |
|
1514 | 1514 | ? s/f19 |
|
1515 | 1515 | $ rm s/f19 |
|
1516 | 1516 | $ cd .. |
|
1517 | 1517 | |
|
1518 | 1518 | Courtesy phases synchronisation to publishing server does not block the push |
|
1519 | 1519 | (issue3781) |
|
1520 | 1520 | |
|
1521 | 1521 | $ cp -r main issue3781 |
|
1522 | 1522 | $ cp -r main issue3781-dest |
|
1523 | 1523 | $ cd issue3781-dest/s |
|
1524 | 1524 | $ hg phase tip # show we have draft changeset |
|
1525 | 1525 | 5: draft |
|
1526 | 1526 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1527 | 1527 | $ cd ../../issue3781 |
|
1528 | 1528 | $ cat >> .hg/hgrc << EOF |
|
1529 | 1529 | > [paths] |
|
1530 | 1530 | > default=../issue3781-dest/ |
|
1531 | 1531 | > EOF |
|
1532 | $ hg push --config experimental.bundle2-exp=False | |
|
1532 | $ hg push --config devel.legacy.exchange=bundle1 | |
|
1533 | 1533 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1534 | 1534 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1535 | 1535 | searching for changes |
|
1536 | 1536 | no changes found |
|
1537 | 1537 | searching for changes |
|
1538 | 1538 | no changes found |
|
1539 | 1539 | [1] |
|
1540 | 1540 | # clean the push cache |
|
1541 | 1541 | $ rm s/.hg/cache/storehash/* |
|
1542 | 1542 | $ hg push --config experimental.bundle2-exp=True |
|
1543 | 1543 | pushing to $TESTTMP/issue3781-dest (glob) |
|
1544 | 1544 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1545 | 1545 | searching for changes |
|
1546 | 1546 | no changes found |
|
1547 | 1547 | searching for changes |
|
1548 | 1548 | no changes found |
|
1549 | 1549 | [1] |
|
1550 | 1550 | $ cd .. |
|
1551 | 1551 | |
|
1552 | 1552 | Test phase choice for newly created commit with "phases.subrepochecks" |
|
1553 | 1553 | configuration |
|
1554 | 1554 | |
|
1555 | 1555 | $ cd t |
|
1556 | 1556 | $ hg update -q -r 12 |
|
1557 | 1557 | |
|
1558 | 1558 | $ cat >> s/ss/.hg/hgrc <<EOF |
|
1559 | 1559 | > [phases] |
|
1560 | 1560 | > new-commit = secret |
|
1561 | 1561 | > EOF |
|
1562 | 1562 | $ cat >> s/.hg/hgrc <<EOF |
|
1563 | 1563 | > [phases] |
|
1564 | 1564 | > new-commit = draft |
|
1565 | 1565 | > EOF |
|
1566 | 1566 | $ echo phasecheck1 >> s/ss/a |
|
1567 | 1567 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 |
|
1568 | 1568 | committing subrepository ss |
|
1569 | 1569 | transaction abort! |
|
1570 | 1570 | rollback completed |
|
1571 | 1571 | abort: can't commit in draft phase conflicting secret from subrepository ss |
|
1572 | 1572 | [255] |
|
1573 | 1573 | $ echo phasecheck2 >> s/ss/a |
|
1574 | 1574 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 |
|
1575 | 1575 | committing subrepository ss |
|
1576 | 1576 | $ hg -R s/ss phase tip |
|
1577 | 1577 | 3: secret |
|
1578 | 1578 | $ hg -R s phase tip |
|
1579 | 1579 | 6: draft |
|
1580 | 1580 | $ echo phasecheck3 >> s/ss/a |
|
1581 | 1581 | $ hg -R s commit -S -m phasecheck3 |
|
1582 | 1582 | committing subrepository ss |
|
1583 | 1583 | warning: changes are committed in secret phase from subrepository ss |
|
1584 | 1584 | $ hg -R s/ss phase tip |
|
1585 | 1585 | 4: secret |
|
1586 | 1586 | $ hg -R s phase tip |
|
1587 | 1587 | 7: secret |
|
1588 | 1588 | |
|
1589 | 1589 | $ cat >> t/.hg/hgrc <<EOF |
|
1590 | 1590 | > [phases] |
|
1591 | 1591 | > new-commit = draft |
|
1592 | 1592 | > EOF |
|
1593 | 1593 | $ cat >> .hg/hgrc <<EOF |
|
1594 | 1594 | > [phases] |
|
1595 | 1595 | > new-commit = public |
|
1596 | 1596 | > EOF |
|
1597 | 1597 | $ echo phasecheck4 >> s/ss/a |
|
1598 | 1598 | $ echo phasecheck4 >> t/t |
|
1599 | 1599 | $ hg commit -S -m phasecheck4 |
|
1600 | 1600 | committing subrepository s |
|
1601 | 1601 | committing subrepository s/ss (glob) |
|
1602 | 1602 | warning: changes are committed in secret phase from subrepository ss |
|
1603 | 1603 | committing subrepository t |
|
1604 | 1604 | warning: changes are committed in secret phase from subrepository s |
|
1605 | 1605 | created new head |
|
1606 | 1606 | $ hg -R s/ss phase tip |
|
1607 | 1607 | 5: secret |
|
1608 | 1608 | $ hg -R s phase tip |
|
1609 | 1609 | 8: secret |
|
1610 | 1610 | $ hg -R t phase tip |
|
1611 | 1611 | 6: draft |
|
1612 | 1612 | $ hg phase tip |
|
1613 | 1613 | 15: secret |
|
1614 | 1614 | |
|
1615 | 1615 | $ cd .. |
|
1616 | 1616 | |
|
1617 | 1617 | |
|
1618 | 1618 | Test that commit --secret works on both repo and subrepo (issue4182) |
|
1619 | 1619 | |
|
1620 | 1620 | $ cd main |
|
1621 | 1621 | $ echo secret >> b |
|
1622 | 1622 | $ echo secret >> s/b |
|
1623 | 1623 | $ hg commit --secret --subrepo -m "secret" |
|
1624 | 1624 | committing subrepository s |
|
1625 | 1625 | $ hg phase -r . |
|
1626 | 1626 | 6: secret |
|
1627 | 1627 | $ cd s |
|
1628 | 1628 | $ hg phase -r . |
|
1629 | 1629 | 6: secret |
|
1630 | 1630 | $ cd ../../ |
|
1631 | 1631 | |
|
1632 | 1632 | Test "subrepos" template keyword |
|
1633 | 1633 | |
|
1634 | 1634 | $ cd t |
|
1635 | 1635 | $ hg update -q 15 |
|
1636 | 1636 | $ cat > .hgsub <<EOF |
|
1637 | 1637 | > s = s |
|
1638 | 1638 | > EOF |
|
1639 | 1639 | $ hg commit -m "16" |
|
1640 | 1640 | warning: changes are committed in secret phase from subrepository s |
|
1641 | 1641 | |
|
1642 | 1642 | (addition of ".hgsub" itself) |
|
1643 | 1643 | |
|
1644 | 1644 | $ hg diff --nodates -c 1 .hgsubstate |
|
1645 | 1645 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate |
|
1646 | 1646 | --- /dev/null |
|
1647 | 1647 | +++ b/.hgsubstate |
|
1648 | 1648 | @@ -0,0 +1,1 @@ |
|
1649 | 1649 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1650 | 1650 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1651 | 1651 | f7b1eb17ad24 000000000000 |
|
1652 | 1652 | s |
|
1653 | 1653 | |
|
1654 | 1654 | (modification of existing entry) |
|
1655 | 1655 | |
|
1656 | 1656 | $ hg diff --nodates -c 2 .hgsubstate |
|
1657 | 1657 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate |
|
1658 | 1658 | --- a/.hgsubstate |
|
1659 | 1659 | +++ b/.hgsubstate |
|
1660 | 1660 | @@ -1,1 +1,1 @@ |
|
1661 | 1661 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1662 | 1662 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s |
|
1663 | 1663 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1664 | 1664 | 7cf8cfea66e4 000000000000 |
|
1665 | 1665 | s |
|
1666 | 1666 | |
|
1667 | 1667 | (addition of entry) |
|
1668 | 1668 | |
|
1669 | 1669 | $ hg diff --nodates -c 5 .hgsubstate |
|
1670 | 1670 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate |
|
1671 | 1671 | --- a/.hgsubstate |
|
1672 | 1672 | +++ b/.hgsubstate |
|
1673 | 1673 | @@ -1,1 +1,2 @@ |
|
1674 | 1674 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1675 | 1675 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1676 | 1676 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1677 | 1677 | 7cf8cfea66e4 000000000000 |
|
1678 | 1678 | t |
|
1679 | 1679 | |
|
1680 | 1680 | (removal of existing entry) |
|
1681 | 1681 | |
|
1682 | 1682 | $ hg diff --nodates -c 16 .hgsubstate |
|
1683 | 1683 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate |
|
1684 | 1684 | --- a/.hgsubstate |
|
1685 | 1685 | +++ b/.hgsubstate |
|
1686 | 1686 | @@ -1,2 +1,1 @@ |
|
1687 | 1687 | 0731af8ca9423976d3743119d0865097c07bdc1b s |
|
1688 | 1688 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t |
|
1689 | 1689 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1690 | 1690 | 8bec38d2bd0b 000000000000 |
|
1691 | 1691 | t |
|
1692 | 1692 | |
|
1693 | 1693 | (merging) |
|
1694 | 1694 | |
|
1695 | 1695 | $ hg diff --nodates -c 9 .hgsubstate |
|
1696 | 1696 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate |
|
1697 | 1697 | --- a/.hgsubstate |
|
1698 | 1698 | +++ b/.hgsubstate |
|
1699 | 1699 | @@ -1,1 +1,2 @@ |
|
1700 | 1700 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1701 | 1701 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1702 | 1702 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1703 | 1703 | f6affe3fbfaa 1f14a2e2d3ec |
|
1704 | 1704 | t |
|
1705 | 1705 | |
|
1706 | 1706 | (removal of ".hgsub" itself) |
|
1707 | 1707 | |
|
1708 | 1708 | $ hg diff --nodates -c 8 .hgsubstate |
|
1709 | 1709 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate |
|
1710 | 1710 | --- a/.hgsubstate |
|
1711 | 1711 | +++ /dev/null |
|
1712 | 1712 | @@ -1,2 +0,0 @@ |
|
1713 | 1713 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1714 | 1714 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t |
|
1715 | 1715 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1716 | 1716 | f94576341bcf 000000000000 |
|
1717 | 1717 | |
|
1718 | 1718 | Test that '[paths]' is configured correctly at subrepo creation |
|
1719 | 1719 | |
|
1720 | 1720 | $ cd $TESTTMP/tc |
|
1721 | 1721 | $ cat > .hgsub <<EOF |
|
1722 | 1722 | > # to clear bogus subrepo path 'bogus=[boguspath' |
|
1723 | 1723 | > s = s |
|
1724 | 1724 | > t = t |
|
1725 | 1725 | > EOF |
|
1726 | 1726 | $ hg update -q --clean null |
|
1727 | 1727 | $ rm -rf s t |
|
1728 | 1728 | $ cat >> .hg/hgrc <<EOF |
|
1729 | 1729 | > [paths] |
|
1730 | 1730 | > default-push = /foo/bar |
|
1731 | 1731 | > EOF |
|
1732 | 1732 | $ hg update -q |
|
1733 | 1733 | $ cat s/.hg/hgrc |
|
1734 | 1734 | [paths] |
|
1735 | 1735 | default = $TESTTMP/t/s |
|
1736 | 1736 | default-push = /foo/bar/s |
|
1737 | 1737 | $ cat s/ss/.hg/hgrc |
|
1738 | 1738 | [paths] |
|
1739 | 1739 | default = $TESTTMP/t/s/ss |
|
1740 | 1740 | default-push = /foo/bar/s/ss |
|
1741 | 1741 | $ cat t/.hg/hgrc |
|
1742 | 1742 | [paths] |
|
1743 | 1743 | default = $TESTTMP/t/t |
|
1744 | 1744 | default-push = /foo/bar/t |
|
1745 | 1745 | |
|
1746 | 1746 | $ cd $TESTTMP/t |
|
1747 | 1747 | $ hg up -qC 0 |
|
1748 | 1748 | $ echo 'bar' > bar.txt |
|
1749 | 1749 | $ hg ci -Am 'branch before subrepo add' |
|
1750 | 1750 | adding bar.txt |
|
1751 | 1751 | created new head |
|
1752 | 1752 | $ hg merge -r "first(subrepo('s'))" |
|
1753 | 1753 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1754 | 1754 | (branch merge, don't forget to commit) |
|
1755 | 1755 | $ hg status -S -X '.hgsub*' |
|
1756 | 1756 | A s/a |
|
1757 | 1757 | ? s/b |
|
1758 | 1758 | ? s/c |
|
1759 | 1759 | ? s/f1 |
|
1760 | 1760 | $ hg status -S --rev 'p2()' |
|
1761 | 1761 | A bar.txt |
|
1762 | 1762 | ? s/b |
|
1763 | 1763 | ? s/c |
|
1764 | 1764 | ? s/f1 |
|
1765 | 1765 | $ hg diff -S -X '.hgsub*' --nodates |
|
1766 | 1766 | diff -r 000000000000 s/a |
|
1767 | 1767 | --- /dev/null |
|
1768 | 1768 | +++ b/s/a |
|
1769 | 1769 | @@ -0,0 +1,1 @@ |
|
1770 | 1770 | +a |
|
1771 | 1771 | $ hg diff -S --rev 'p2()' --nodates |
|
1772 | 1772 | diff -r 7cf8cfea66e4 bar.txt |
|
1773 | 1773 | --- /dev/null |
|
1774 | 1774 | +++ b/bar.txt |
|
1775 | 1775 | @@ -0,0 +1,1 @@ |
|
1776 | 1776 | +bar |
|
1777 | 1777 | |
|
1778 | 1778 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now