##// END OF EJS Templates
merge with stable
Kevin Bullock -
r18684:c161e4cf merge default
parent child Browse files
Show More
@@ -1,889 +1,889
1 1 $ cat >> $HGRCPATH << EOF
2 2 > [extensions]
3 3 > graphlog=
4 4 > [phases]
5 5 > # public changeset are not obsolete
6 6 > publish=false
7 7 > EOF
8 8 $ mkcommit() {
9 9 > echo "$1" > "$1"
10 10 > hg add "$1"
11 11 > hg ci -m "add $1"
12 12 > }
13 13 $ getid() {
14 14 > hg id --debug --hidden -ir "desc('$1')"
15 15 > }
16 16
17 17 $ cat > debugkeys.py <<EOF
18 18 > def reposetup(ui, repo):
19 19 > class debugkeysrepo(repo.__class__):
20 20 > def listkeys(self, namespace):
21 21 > ui.write('listkeys %s\n' % (namespace,))
22 22 > return super(debugkeysrepo, self).listkeys(namespace)
23 23 >
24 24 > if repo.local():
25 25 > repo.__class__ = debugkeysrepo
26 26 > EOF
27 27
28 28 $ hg init tmpa
29 29 $ cd tmpa
30 30 $ mkcommit kill_me
31 31
32 32 Checking that the feature is properly disabled
33 33
34 34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
35 35 abort: obsolete feature is not enabled on this repo
36 36 [255]
37 37
38 38 Enabling it
39 39
40 40 $ cat > ../obs.py << EOF
41 41 > import mercurial.obsolete
42 42 > mercurial.obsolete._enabled = True
43 43 > EOF
44 44 $ echo '[extensions]' >> $HGRCPATH
45 45 $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
46 46
47 47 Killing a single changeset without replacement
48 48
49 49 $ hg debugobsolete 0
50 50 abort: changeset references must be full hexadecimal node identifiers
51 51 [255]
52 52 $ hg debugobsolete '00'
53 53 abort: changeset references must be full hexadecimal node identifiers
54 54 [255]
55 55 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
56 56 $ hg debugobsolete
57 57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
58 58
59 59 (test that mercurial is not confused)
60 60
61 61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
62 62 $ hg tip
63 63 changeset: -1:000000000000
64 64 tag: tip
65 65 user:
66 66 date: Thu Jan 01 00:00:00 1970 +0000
67 67
68 68 $ hg up --hidden tip --quiet
69 69 $ cd ..
70 70
71 71 Killing a single changeset with replacement
72 72
73 73 $ hg init tmpb
74 74 $ cd tmpb
75 75 $ mkcommit a
76 76 $ mkcommit b
77 77 $ mkcommit original_c
78 78 $ hg up "desc('b')"
79 79 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
80 80 $ mkcommit new_c
81 81 created new head
82 82 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
83 83 $ hg debugobsolete --flag 12 `getid original_c` `getid new_c` -d '56 12'
84 84 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
85 85 2:245bde4270cd add original_c
86 86 $ hg debugobsolete
87 87 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
88 88
89 89 do it again (it read the obsstore before adding new changeset)
90 90
91 91 $ hg up '.^'
92 92 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
93 93 $ mkcommit new_2_c
94 94 created new head
95 95 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
96 96 $ hg debugobsolete
97 97 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
98 98 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
99 99
100 100 Register two markers with a missing node
101 101
102 102 $ hg up '.^'
103 103 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
104 104 $ mkcommit new_3_c
105 105 created new head
106 106 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
107 107 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
108 108 $ hg debugobsolete
109 109 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
110 110 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
111 111 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
112 112 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
113 113
114 114 Refuse pathological nullid successors
115 115 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
116 116 transaction abort!
117 117 rollback completed
118 118 abort: bad obsolescence marker detected: invalid successors nullid
119 119 [255]
120 120
121 121 Check that graphlog detect that a changeset is obsolete:
122 122
123 123 $ hg glog
124 124 @ changeset: 5:5601fb93a350
125 125 | tag: tip
126 126 | parent: 1:7c3bad9141dc
127 127 | user: test
128 128 | date: Thu Jan 01 00:00:00 1970 +0000
129 129 | summary: add new_3_c
130 130 |
131 131 o changeset: 1:7c3bad9141dc
132 132 | user: test
133 133 | date: Thu Jan 01 00:00:00 1970 +0000
134 134 | summary: add b
135 135 |
136 136 o changeset: 0:1f0dee641bb7
137 137 user: test
138 138 date: Thu Jan 01 00:00:00 1970 +0000
139 139 summary: add a
140 140
141 141
142 142 check that heads does not report them
143 143
144 144 $ hg heads
145 145 changeset: 5:5601fb93a350
146 146 tag: tip
147 147 parent: 1:7c3bad9141dc
148 148 user: test
149 149 date: Thu Jan 01 00:00:00 1970 +0000
150 150 summary: add new_3_c
151 151
152 152 $ hg heads --hidden
153 153 changeset: 5:5601fb93a350
154 154 tag: tip
155 155 parent: 1:7c3bad9141dc
156 156 user: test
157 157 date: Thu Jan 01 00:00:00 1970 +0000
158 158 summary: add new_3_c
159 159
160 160 changeset: 4:ca819180edb9
161 161 parent: 1:7c3bad9141dc
162 162 user: test
163 163 date: Thu Jan 01 00:00:00 1970 +0000
164 164 summary: add new_2_c
165 165
166 166 changeset: 3:cdbce2fbb163
167 167 parent: 1:7c3bad9141dc
168 168 user: test
169 169 date: Thu Jan 01 00:00:00 1970 +0000
170 170 summary: add new_c
171 171
172 172 changeset: 2:245bde4270cd
173 173 user: test
174 174 date: Thu Jan 01 00:00:00 1970 +0000
175 175 summary: add original_c
176 176
177 177
178 178
179 179 check that summary does not report them
180 180
181 181 $ hg init ../sink
182 182 $ echo '[paths]' >> .hg/hgrc
183 183 $ echo 'default=../sink' >> .hg/hgrc
184 184 $ hg summary --remote
185 185 parent: 5:5601fb93a350 tip
186 186 add new_3_c
187 187 branch: default
188 188 commit: (clean)
189 189 update: (current)
190 190 remote: 3 outgoing
191 191
192 192 $ hg summary --remote --hidden
193 193 parent: 5:5601fb93a350 tip
194 194 add new_3_c
195 195 branch: default
196 196 commit: (clean)
197 197 update: 3 new changesets, 4 branch heads (merge)
198 198 remote: 3 outgoing
199 199
200 200 check that various commands work well with filtering
201 201
202 202 $ hg tip
203 203 changeset: 5:5601fb93a350
204 204 tag: tip
205 205 parent: 1:7c3bad9141dc
206 206 user: test
207 207 date: Thu Jan 01 00:00:00 1970 +0000
208 208 summary: add new_3_c
209 209
210 210 $ hg log -r 6
211 211 abort: unknown revision '6'!
212 212 [255]
213 213 $ hg log -r 4
214 214 abort: unknown revision '4'!
215 215 [255]
216 216
217 217 Check that public changeset are not accounted as obsolete:
218 218
219 219 $ hg --hidden phase --public 2
220 220 $ hg --config 'extensions.graphlog=' glog
221 221 @ changeset: 5:5601fb93a350
222 222 | tag: tip
223 223 | parent: 1:7c3bad9141dc
224 224 | user: test
225 225 | date: Thu Jan 01 00:00:00 1970 +0000
226 226 | summary: add new_3_c
227 227 |
228 228 | o changeset: 2:245bde4270cd
229 229 |/ user: test
230 230 | date: Thu Jan 01 00:00:00 1970 +0000
231 231 | summary: add original_c
232 232 |
233 233 o changeset: 1:7c3bad9141dc
234 234 | user: test
235 235 | date: Thu Jan 01 00:00:00 1970 +0000
236 236 | summary: add b
237 237 |
238 238 o changeset: 0:1f0dee641bb7
239 239 user: test
240 240 date: Thu Jan 01 00:00:00 1970 +0000
241 241 summary: add a
242 242
243 243
244 244 And that bumped changeset are detected
245 245 --------------------------------------
246 246
247 247 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
248 248 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
249 249 the public changeset
250 250
251 251 $ hg log --hidden -r 'bumped()'
252 252 changeset: 5:5601fb93a350
253 253 tag: tip
254 254 parent: 1:7c3bad9141dc
255 255 user: test
256 256 date: Thu Jan 01 00:00:00 1970 +0000
257 257 summary: add new_3_c
258 258
259 259
260 260 And that we can't push bumped changeset
261 261
262 262 $ hg push ../tmpa -r 0 --force #(make repo related)
263 263 pushing to ../tmpa
264 264 searching for changes
265 265 warning: repository is unrelated
266 266 adding changesets
267 267 adding manifests
268 268 adding file changes
269 269 added 1 changesets with 1 changes to 1 files (+1 heads)
270 270 $ hg push ../tmpa
271 271 pushing to ../tmpa
272 272 searching for changes
273 273 abort: push includes bumped changeset: 5601fb93a350!
274 274 [255]
275 275
276 276 Fixing "bumped" situation
277 277 We need to create a clone of 5 and add a special marker with a flag
278 278
279 279 $ hg up '5^'
280 280 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
281 281 $ hg revert -ar 5
282 282 adding new_3_c
283 283 $ hg ci -m 'add n3w_3_c'
284 284 created new head
285 285 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
286 286 $ hg log -r 'bumped()'
287 287 $ hg log -G
288 288 @ changeset: 6:6f9641995072
289 289 | tag: tip
290 290 | parent: 1:7c3bad9141dc
291 291 | user: test
292 292 | date: Thu Jan 01 00:00:00 1970 +0000
293 293 | summary: add n3w_3_c
294 294 |
295 295 | o changeset: 2:245bde4270cd
296 296 |/ user: test
297 297 | date: Thu Jan 01 00:00:00 1970 +0000
298 298 | summary: add original_c
299 299 |
300 300 o changeset: 1:7c3bad9141dc
301 301 | user: test
302 302 | date: Thu Jan 01 00:00:00 1970 +0000
303 303 | summary: add b
304 304 |
305 305 o changeset: 0:1f0dee641bb7
306 306 user: test
307 307 date: Thu Jan 01 00:00:00 1970 +0000
308 308 summary: add a
309 309
310 310
311 311
312 312
313 313 $ cd ..
314 314
315 315 Exchange Test
316 316 ============================
317 317
318 318 Destination repo does not have any data
319 319 ---------------------------------------
320 320
321 321 Simple incoming test
322 322
323 323 $ hg init tmpc
324 324 $ cd tmpc
325 325 $ hg incoming ../tmpb
326 326 comparing with ../tmpb
327 327 changeset: 0:1f0dee641bb7
328 328 user: test
329 329 date: Thu Jan 01 00:00:00 1970 +0000
330 330 summary: add a
331 331
332 332 changeset: 1:7c3bad9141dc
333 333 user: test
334 334 date: Thu Jan 01 00:00:00 1970 +0000
335 335 summary: add b
336 336
337 337 changeset: 2:245bde4270cd
338 338 user: test
339 339 date: Thu Jan 01 00:00:00 1970 +0000
340 340 summary: add original_c
341 341
342 342 changeset: 6:6f9641995072
343 343 tag: tip
344 344 parent: 1:7c3bad9141dc
345 345 user: test
346 346 date: Thu Jan 01 00:00:00 1970 +0000
347 347 summary: add n3w_3_c
348 348
349 349
350 350 Try to pull markers
351 351 (extinct changeset are excluded but marker are pushed)
352 352
353 353 $ hg pull ../tmpb
354 354 pulling from ../tmpb
355 355 requesting all changes
356 356 adding changesets
357 357 adding manifests
358 358 adding file changes
359 359 added 4 changesets with 4 changes to 4 files (+1 heads)
360 360 (run 'hg heads' to see heads, 'hg merge' to merge)
361 361 $ hg debugobsolete
362 362 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
363 363 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
364 364 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
365 365 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
366 366 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
367 367
368 368 Rollback//Transaction support
369 369
370 370 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
371 371 $ hg debugobsolete
372 372 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
373 373 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
374 374 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
375 375 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
376 376 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
377 377 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 {'date': '1340 0', 'user': 'test'}
378 378 $ hg rollback -n
379 379 repository tip rolled back to revision 3 (undo debugobsolete)
380 380 $ hg rollback
381 381 repository tip rolled back to revision 3 (undo debugobsolete)
382 382 $ hg debugobsolete
383 383 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
384 384 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
385 385 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
386 386 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
387 387 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
388 388
389 389 $ cd ..
390 390
391 391 Try to push markers
392 392
393 393 $ hg init tmpd
394 394 $ hg -R tmpb push tmpd
395 395 pushing to tmpd
396 396 searching for changes
397 397 adding changesets
398 398 adding manifests
399 399 adding file changes
400 400 added 4 changesets with 4 changes to 4 files (+1 heads)
401 401 $ hg -R tmpd debugobsolete
402 402 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
403 403 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
404 404 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
405 405 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
406 406 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
407 407
408 408 Check obsolete keys are exchanged only if source has an obsolete store
409 409
410 410 $ hg init empty
411 411 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
412 412 pushing to tmpd
413 413 no changes found
414 414 listkeys phases
415 415 listkeys bookmarks
416 416 [1]
417 417
418 418 clone support
419 419 (markers are copied and extinct changesets are included to allow hardlinks)
420 420
421 421 $ hg clone tmpb clone-dest
422 422 updating to branch default
423 423 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
424 424 $ hg -R clone-dest log -G --hidden
425 425 @ changeset: 6:6f9641995072
426 426 | tag: tip
427 427 | parent: 1:7c3bad9141dc
428 428 | user: test
429 429 | date: Thu Jan 01 00:00:00 1970 +0000
430 430 | summary: add n3w_3_c
431 431 |
432 432 | x changeset: 5:5601fb93a350
433 433 |/ parent: 1:7c3bad9141dc
434 434 | user: test
435 435 | date: Thu Jan 01 00:00:00 1970 +0000
436 436 | summary: add new_3_c
437 437 |
438 438 | x changeset: 4:ca819180edb9
439 439 |/ parent: 1:7c3bad9141dc
440 440 | user: test
441 441 | date: Thu Jan 01 00:00:00 1970 +0000
442 442 | summary: add new_2_c
443 443 |
444 444 | x changeset: 3:cdbce2fbb163
445 445 |/ parent: 1:7c3bad9141dc
446 446 | user: test
447 447 | date: Thu Jan 01 00:00:00 1970 +0000
448 448 | summary: add new_c
449 449 |
450 450 | o changeset: 2:245bde4270cd
451 451 |/ user: test
452 452 | date: Thu Jan 01 00:00:00 1970 +0000
453 453 | summary: add original_c
454 454 |
455 455 o changeset: 1:7c3bad9141dc
456 456 | user: test
457 457 | date: Thu Jan 01 00:00:00 1970 +0000
458 458 | summary: add b
459 459 |
460 460 o changeset: 0:1f0dee641bb7
461 461 user: test
462 462 date: Thu Jan 01 00:00:00 1970 +0000
463 463 summary: add a
464 464
465 465 $ hg -R clone-dest debugobsolete
466 466 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
467 467 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
468 468 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
469 469 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
470 470 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
471 471
472 472
473 473 Destination repo have existing data
474 474 ---------------------------------------
475 475
476 476 On pull
477 477
478 478 $ hg init tmpe
479 479 $ cd tmpe
480 480 $ hg debugobsolete -d '1339 0' 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339
481 481 $ hg pull ../tmpb
482 482 pulling from ../tmpb
483 483 requesting all changes
484 484 adding changesets
485 485 adding manifests
486 486 adding file changes
487 487 added 4 changesets with 4 changes to 4 files (+1 heads)
488 488 (run 'hg heads' to see heads, 'hg merge' to merge)
489 489 $ hg debugobsolete
490 490 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
491 491 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
492 492 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
493 493 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
494 494 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
495 495 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
496 496
497 497
498 498 On push
499 499
500 500 $ hg push ../tmpc
501 501 pushing to ../tmpc
502 502 searching for changes
503 503 no changes found
504 504 [1]
505 505 $ hg -R ../tmpc debugobsolete
506 506 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
507 507 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
508 508 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
509 509 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
510 510 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
511 511 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
512 512
513 513 detect outgoing obsolete and unstable
514 514 ---------------------------------------
515 515
516 516
517 517 $ hg glog
518 518 o changeset: 3:6f9641995072
519 519 | tag: tip
520 520 | parent: 1:7c3bad9141dc
521 521 | user: test
522 522 | date: Thu Jan 01 00:00:00 1970 +0000
523 523 | summary: add n3w_3_c
524 524 |
525 525 | o changeset: 2:245bde4270cd
526 526 |/ user: test
527 527 | date: Thu Jan 01 00:00:00 1970 +0000
528 528 | summary: add original_c
529 529 |
530 530 o changeset: 1:7c3bad9141dc
531 531 | user: test
532 532 | date: Thu Jan 01 00:00:00 1970 +0000
533 533 | summary: add b
534 534 |
535 535 o changeset: 0:1f0dee641bb7
536 536 user: test
537 537 date: Thu Jan 01 00:00:00 1970 +0000
538 538 summary: add a
539 539
540 540 $ hg up 'desc("n3w_3_c")'
541 541 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
542 542 $ mkcommit original_d
543 543 $ mkcommit original_e
544 544 $ hg debugobsolete `getid original_d` -d '0 0'
545 545 $ hg log -r 'obsolete()'
546 546 changeset: 4:94b33453f93b
547 547 user: test
548 548 date: Thu Jan 01 00:00:00 1970 +0000
549 549 summary: add original_d
550 550
551 551 $ hg glog -r '::unstable()'
552 552 @ changeset: 5:cda648ca50f5
553 553 | tag: tip
554 554 | user: test
555 555 | date: Thu Jan 01 00:00:00 1970 +0000
556 556 | summary: add original_e
557 557 |
558 558 x changeset: 4:94b33453f93b
559 559 | user: test
560 560 | date: Thu Jan 01 00:00:00 1970 +0000
561 561 | summary: add original_d
562 562 |
563 563 o changeset: 3:6f9641995072
564 564 | parent: 1:7c3bad9141dc
565 565 | user: test
566 566 | date: Thu Jan 01 00:00:00 1970 +0000
567 567 | summary: add n3w_3_c
568 568 |
569 569 o changeset: 1:7c3bad9141dc
570 570 | user: test
571 571 | date: Thu Jan 01 00:00:00 1970 +0000
572 572 | summary: add b
573 573 |
574 574 o changeset: 0:1f0dee641bb7
575 575 user: test
576 576 date: Thu Jan 01 00:00:00 1970 +0000
577 577 summary: add a
578 578
579 579
580 580 refuse to push obsolete changeset
581 581
582 582 $ hg push ../tmpc/ -r 'desc("original_d")'
583 583 pushing to ../tmpc/
584 584 searching for changes
585 585 abort: push includes obsolete changeset: 94b33453f93b!
586 586 [255]
587 587
588 588 refuse to push unstable changeset
589 589
590 590 $ hg push ../tmpc/
591 591 pushing to ../tmpc/
592 592 searching for changes
593 593 abort: push includes unstable changeset: cda648ca50f5!
594 594 [255]
595 595
596 596 Test that extinct changeset are properly detected
597 597
598 598 $ hg log -r 'extinct()'
599 599
600 600 Don't try to push extinct changeset
601 601
602 602 $ hg init ../tmpf
603 603 $ hg out ../tmpf
604 604 comparing with ../tmpf
605 605 searching for changes
606 606 changeset: 0:1f0dee641bb7
607 607 user: test
608 608 date: Thu Jan 01 00:00:00 1970 +0000
609 609 summary: add a
610 610
611 611 changeset: 1:7c3bad9141dc
612 612 user: test
613 613 date: Thu Jan 01 00:00:00 1970 +0000
614 614 summary: add b
615 615
616 616 changeset: 2:245bde4270cd
617 617 user: test
618 618 date: Thu Jan 01 00:00:00 1970 +0000
619 619 summary: add original_c
620 620
621 621 changeset: 3:6f9641995072
622 622 parent: 1:7c3bad9141dc
623 623 user: test
624 624 date: Thu Jan 01 00:00:00 1970 +0000
625 625 summary: add n3w_3_c
626 626
627 627 changeset: 4:94b33453f93b
628 628 user: test
629 629 date: Thu Jan 01 00:00:00 1970 +0000
630 630 summary: add original_d
631 631
632 632 changeset: 5:cda648ca50f5
633 633 tag: tip
634 634 user: test
635 635 date: Thu Jan 01 00:00:00 1970 +0000
636 636 summary: add original_e
637 637
638 638 $ hg push ../tmpf -f # -f because be push unstable too
639 639 pushing to ../tmpf
640 640 searching for changes
641 641 adding changesets
642 642 adding manifests
643 643 adding file changes
644 644 added 6 changesets with 6 changes to 6 files (+1 heads)
645 645
646 646 no warning displayed
647 647
648 648 $ hg push ../tmpf
649 649 pushing to ../tmpf
650 650 searching for changes
651 651 no changes found
652 652 [1]
653 653
654 654 Do not warn about new head when the new head is a successors of a remote one
655 655
656 656 $ hg glog
657 657 @ changeset: 5:cda648ca50f5
658 658 | tag: tip
659 659 | user: test
660 660 | date: Thu Jan 01 00:00:00 1970 +0000
661 661 | summary: add original_e
662 662 |
663 663 x changeset: 4:94b33453f93b
664 664 | user: test
665 665 | date: Thu Jan 01 00:00:00 1970 +0000
666 666 | summary: add original_d
667 667 |
668 668 o changeset: 3:6f9641995072
669 669 | parent: 1:7c3bad9141dc
670 670 | user: test
671 671 | date: Thu Jan 01 00:00:00 1970 +0000
672 672 | summary: add n3w_3_c
673 673 |
674 674 | o changeset: 2:245bde4270cd
675 675 |/ user: test
676 676 | date: Thu Jan 01 00:00:00 1970 +0000
677 677 | summary: add original_c
678 678 |
679 679 o changeset: 1:7c3bad9141dc
680 680 | user: test
681 681 | date: Thu Jan 01 00:00:00 1970 +0000
682 682 | summary: add b
683 683 |
684 684 o changeset: 0:1f0dee641bb7
685 685 user: test
686 686 date: Thu Jan 01 00:00:00 1970 +0000
687 687 summary: add a
688 688
689 689 $ hg up -q 'desc(n3w_3_c)'
690 690 $ mkcommit obsolete_e
691 691 created new head
692 692 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
693 693 $ hg outgoing ../tmpf # parasite hg outgoing testin
694 694 comparing with ../tmpf
695 695 searching for changes
696 696 changeset: 6:3de5eca88c00
697 697 tag: tip
698 698 parent: 3:6f9641995072
699 699 user: test
700 700 date: Thu Jan 01 00:00:00 1970 +0000
701 701 summary: add obsolete_e
702 702
703 703 $ hg push ../tmpf
704 704 pushing to ../tmpf
705 705 searching for changes
706 706 adding changesets
707 707 adding manifests
708 708 adding file changes
709 709 added 1 changesets with 1 changes to 1 files (+1 heads)
710 710
711 711 #if serve
712 712
713 713 check hgweb does not explode
714 714 ====================================
715 715
716 716 $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
717 717 adding changesets
718 718 adding manifests
719 719 adding file changes
720 720 added 62 changesets with 63 changes to 9 files (+60 heads)
721 721 (run 'hg heads .' to see heads, 'hg merge' to merge)
722 722 $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
723 723 > do
724 724 > hg debugobsolete $node
725 725 > done
726 726 $ hg up tip
727 727 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
728 728
729 729 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
730 730 $ cat hg.pid >> $DAEMON_PIDS
731 731
732 732 check changelog view
733 733
734 734 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'shortlog/'
735 735 200 Script output follows
736 736
737 737 check graph view
738 738
739 739 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'graph'
740 740 200 Script output follows
741 741
742 742 check filelog view
743 743
744 744 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar'
745 745 200 Script output follows
746 746
747 747 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'
748 748 200 Script output follows
749 749 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
750 750 404 Not Found
751 751 [1]
752 752
753 753 check that web.view config option:
754 754
755 755 $ "$TESTDIR/killdaemons.py" hg.pid
756 756 $ cat >> .hg/hgrc << EOF
757 757 > [web]
758 758 > view=all
759 759 > EOF
760 760 $ wait
761 761 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
762 762 $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/67'
763 763 200 Script output follows
764 764 $ "$TESTDIR/killdaemons.py" hg.pid
765 765
766 766 Checking _enable=False warning if obsolete marker exists
767 767
768 768 $ echo '[extensions]' >> $HGRCPATH
769 769 $ echo "obs=!" >> $HGRCPATH
770 770 $ hg log -r tip
771 771 obsolete feature not enabled but 68 markers found!
772 772 changeset: 68:c15e9edfca13
773 773 tag: tip
774 774 parent: 7:50c51b361e60
775 775 user: test
776 776 date: Thu Jan 01 00:00:00 1970 +0000
777 777 summary: add celestine
778 778
779 779
780 780 reenable for later test
781 781
782 782 $ echo '[extensions]' >> $HGRCPATH
783 783 $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
784 784
785 785 #endif
786 786
787 787 Test incoming/outcoming with changesets obsoleted remotely, known locally
788 788 ===============================================================================
789 789
790 790 This test issue 3805
791 791
792 792 $ hg init repo-issue3805
793 793 $ cd repo-issue3805
794 794 $ echo "foo" > foo
795 795 $ hg ci -Am "A"
796 796 adding foo
797 797 $ hg clone . ../other-issue3805
798 798 updating to branch default
799 799 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
800 800 $ echo "bar" >> foo
801 801 $ hg ci --amend
802 802 $ cd ../other-issue3805
803 803 $ hg log -G
804 804 @ changeset: 0:193e9254ce7e
805 805 tag: tip
806 806 user: test
807 807 date: Thu Jan 01 00:00:00 1970 +0000
808 808 summary: A
809 809
810 810 $ hg log -G -R ../repo-issue3805
811 811 @ changeset: 2:3816541e5485
812 812 tag: tip
813 813 parent: -1:000000000000
814 814 user: test
815 815 date: Thu Jan 01 00:00:00 1970 +0000
816 816 summary: A
817 817
818 818 $ hg incoming
819 comparing with $TESTTMP/tmpe/repo-issue3805
819 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
820 820 searching for changes
821 821 changeset: 2:3816541e5485
822 822 tag: tip
823 823 parent: -1:000000000000
824 824 user: test
825 825 date: Thu Jan 01 00:00:00 1970 +0000
826 826 summary: A
827 827
828 828 $ hg incoming --bundle ../issue3805.hg
829 comparing with $TESTTMP/tmpe/repo-issue3805
829 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
830 830 searching for changes
831 831 changeset: 2:3816541e5485
832 832 tag: tip
833 833 parent: -1:000000000000
834 834 user: test
835 835 date: Thu Jan 01 00:00:00 1970 +0000
836 836 summary: A
837 837
838 838 $ hg outgoing
839 comparing with $TESTTMP/tmpe/repo-issue3805
839 comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
840 840 searching for changes
841 841 no changes found
842 842 [1]
843 843
844 844 #if serve
845 845
846 846 $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
847 847 $ cat hg.pid >> $DAEMON_PIDS
848 848
849 849 $ hg incoming http://localhost:$HGPORT
850 850 comparing with http://localhost:$HGPORT/
851 851 searching for changes
852 852 changeset: 1:3816541e5485
853 853 tag: tip
854 854 parent: -1:000000000000
855 855 user: test
856 856 date: Thu Jan 01 00:00:00 1970 +0000
857 857 summary: A
858 858
859 859 $ hg outgoing http://localhost:$HGPORT
860 860 comparing with http://localhost:$HGPORT/
861 861 searching for changes
862 862 no changes found
863 863 [1]
864 864
865 865 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
866 866
867 867 #endif
868 868
869 869 This test issue 3814
870 870
871 871 (nothing to push but locally hidden changeset)
872 872
873 873 $ cd ..
874 874 $ hg init repo-issue3814
875 875 $ cd repo-issue3805
876 876 $ hg push -r 3816541e5485 ../repo-issue3814
877 877 pushing to ../repo-issue3814
878 878 searching for changes
879 879 adding changesets
880 880 adding manifests
881 881 adding file changes
882 882 added 1 changesets with 1 changes to 1 files
883 883 $ hg out ../repo-issue3814
884 884 comparing with ../repo-issue3814
885 885 searching for changes
886 886 no changes found
887 887 [1]
888 888
889 889
General Comments 0
You need to be logged in to leave comments. Login now