##// END OF EJS Templates
py3: add b'' prefixes in tests/test-obsolete-divergent.t...
Pulkit Goyal -
r38464:afa96dd5 default
parent child Browse files
Show More
@@ -1,527 +1,528
1 1 test-abort-checkin.t
2 2 test-add.t
3 3 test-addremove-similar.t
4 4 test-addremove.t
5 5 test-amend-subrepo.t
6 6 test-amend.t
7 7 test-ancestor.py
8 8 test-annotate.py
9 9 test-annotate.t
10 10 test-archive-symlinks.t
11 11 test-atomictempfile.py
12 12 test-audit-path.t
13 13 test-audit-subrepo.t
14 14 test-automv.t
15 15 test-backout.t
16 16 test-backwards-remove.t
17 17 test-basic.t
18 18 test-bheads.t
19 19 test-bisect.t
20 20 test-bisect2.t
21 21 test-bisect3.t
22 22 test-blackbox.t
23 23 test-bookmarks-current.t
24 24 test-bookmarks-merge.t
25 25 test-bookmarks-rebase.t
26 26 test-bookmarks-strip.t
27 27 test-bookmarks.t
28 28 test-branch-change.t
29 29 test-branch-option.t
30 30 test-branch-tag-confict.t
31 31 test-branches.t
32 32 test-bundle-phases.t
33 33 test-bundle-type.t
34 34 test-bundle-vs-outgoing.t
35 35 test-bundle2-multiple-changegroups.t
36 36 test-cappedreader.py
37 37 test-casecollision.t
38 38 test-cat.t
39 39 test-cbor.py
40 40 test-censor.t
41 41 test-changelog-exec.t
42 42 test-check-commit.t
43 43 test-check-execute.t
44 44 test-check-interfaces.py
45 45 test-check-module-imports.t
46 46 test-check-pyflakes.t
47 47 test-check-pylint.t
48 48 test-check-shbang.t
49 49 test-children.t
50 50 test-clone-cgi.t
51 51 test-clone-pull-corruption.t
52 52 test-clone-r.t
53 53 test-clone-update-order.t
54 54 test-commit-amend.t
55 55 test-commit-interactive.t
56 56 test-commit-multiple.t
57 57 test-commit-unresolved.t
58 58 test-commit.t
59 59 test-committer.t
60 60 test-completion.t
61 61 test-config-env.py
62 62 test-config.t
63 63 test-conflict.t
64 64 test-confused-revert.t
65 65 test-context.py
66 66 test-contrib-check-code.t
67 67 test-contrib-check-commit.t
68 68 test-convert-authormap.t
69 69 test-convert-clonebranches.t
70 70 test-convert-cvs-branch.t
71 71 test-convert-cvs-detectmerge.t
72 72 test-convert-cvs-synthetic.t
73 73 test-convert-cvs.t
74 74 test-convert-cvsnt-mergepoints.t
75 75 test-convert-datesort.t
76 76 test-convert-filemap.t
77 77 test-convert-hg-sink.t
78 78 test-convert-hg-source.t
79 79 test-convert-hg-startrev.t
80 80 test-convert-splicemap.t
81 81 test-convert-tagsbranch-topology.t
82 82 test-copy-move-merge.t
83 83 test-copy.t
84 84 test-copytrace-heuristics.t
85 85 test-debugbuilddag.t
86 86 test-debugbundle.t
87 87 test-debugextensions.t
88 88 test-debugindexdot.t
89 89 test-debugrename.t
90 90 test-default-push.t
91 91 test-diff-binary-file.t
92 92 test-diff-change.t
93 93 test-diff-copy-depth.t
94 94 test-diff-hashes.t
95 95 test-diff-ignore-whitespace.t
96 96 test-diff-indent-heuristic.t
97 97 test-diff-issue2761.t
98 98 test-diff-newlines.t
99 99 test-diff-reverse.t
100 100 test-diff-subdir.t
101 101 test-diff-unified.t
102 102 test-diff-upgrade.t
103 103 test-diffdir.t
104 104 test-diffstat.t
105 105 test-directaccess.t
106 106 test-dirstate-backup.t
107 107 test-dirstate-nonnormalset.t
108 108 test-dirstate.t
109 109 test-dispatch.py
110 110 test-doctest.py
111 111 test-double-merge.t
112 112 test-drawdag.t
113 113 test-duplicateoptions.py
114 114 test-editor-filename.t
115 115 test-empty-dir.t
116 116 test-empty-file.t
117 117 test-empty-group.t
118 118 test-empty.t
119 119 test-encode.t
120 120 test-encoding-func.py
121 121 test-encoding.t
122 122 test-eol-add.t
123 123 test-eol-clone.t
124 124 test-eol-hook.t
125 125 test-eol-patch.t
126 126 test-eol-tag.t
127 127 test-eol-update.t
128 128 test-eol.t
129 129 test-eolfilename.t
130 130 test-excessive-merge.t
131 131 test-exchange-obsmarkers-case-A1.t
132 132 test-exchange-obsmarkers-case-A2.t
133 133 test-exchange-obsmarkers-case-A3.t
134 134 test-exchange-obsmarkers-case-A4.t
135 135 test-exchange-obsmarkers-case-A5.t
136 136 test-exchange-obsmarkers-case-A6.t
137 137 test-exchange-obsmarkers-case-A7.t
138 138 test-exchange-obsmarkers-case-B1.t
139 139 test-exchange-obsmarkers-case-B2.t
140 140 test-exchange-obsmarkers-case-B3.t
141 141 test-exchange-obsmarkers-case-B4.t
142 142 test-exchange-obsmarkers-case-B5.t
143 143 test-exchange-obsmarkers-case-B6.t
144 144 test-exchange-obsmarkers-case-B7.t
145 145 test-exchange-obsmarkers-case-C1.t
146 146 test-exchange-obsmarkers-case-C2.t
147 147 test-exchange-obsmarkers-case-C3.t
148 148 test-exchange-obsmarkers-case-C4.t
149 149 test-exchange-obsmarkers-case-D1.t
150 150 test-exchange-obsmarkers-case-D2.t
151 151 test-exchange-obsmarkers-case-D3.t
152 152 test-exchange-obsmarkers-case-D4.t
153 153 test-execute-bit.t
154 154 test-export.t
155 155 test-extdata.t
156 156 test-extdiff.t
157 157 test-extensions-afterloaded.t
158 158 test-extensions-wrapfunction.py
159 159 test-extra-filelog-entry.t
160 160 test-fetch.t
161 161 test-filebranch.t
162 162 test-filecache.py
163 163 test-filelog.py
164 164 test-fileset-generated.t
165 165 test-fileset.t
166 166 test-fix-topology.t
167 167 test-flags.t
168 168 test-generaldelta.t
169 169 test-getbundle.t
170 170 test-git-export.t
171 171 test-glog-topological.t
172 172 test-gpg.t
173 173 test-graft.t
174 174 test-hg-parseurl.py
175 175 test-hghave.t
176 176 test-hgignore.t
177 177 test-hgk.t
178 178 test-hgrc.t
179 179 test-hgweb-bundle.t
180 180 test-hgweb-descend-empties.t
181 181 test-hgweb-empty.t
182 182 test-hgweb-removed.t
183 183 test-hgwebdir-paths.py
184 184 test-hgwebdirsym.t
185 185 test-histedit-arguments.t
186 186 test-histedit-base.t
187 187 test-histedit-bookmark-motion.t
188 188 test-histedit-commute.t
189 189 test-histedit-drop.t
190 190 test-histedit-edit.t
191 191 test-histedit-fold-non-commute.t
192 192 test-histedit-fold.t
193 193 test-histedit-no-change.t
194 194 test-histedit-non-commute-abort.t
195 195 test-histedit-non-commute.t
196 196 test-histedit-obsolete.t
197 197 test-histedit-outgoing.t
198 198 test-histedit-templates.t
199 199 test-http-branchmap.t
200 200 test-http-bundle1.t
201 201 test-http-clone-r.t
202 202 test-http.t
203 203 test-hybridencode.py
204 204 test-identify.t
205 205 test-impexp-branch.t
206 206 test-import-bypass.t
207 207 test-import-eol.t
208 208 test-import-merge.t
209 209 test-import-unknown.t
210 210 test-import.t
211 211 test-imports-checker.t
212 212 test-incoming-outgoing.t
213 213 test-inherit-mode.t
214 214 test-init.t
215 215 test-issue1089.t
216 216 test-issue1102.t
217 217 test-issue1175.t
218 218 test-issue1306.t
219 219 test-issue1438.t
220 220 test-issue1502.t
221 221 test-issue1802.t
222 222 test-issue1877.t
223 223 test-issue1993.t
224 224 test-issue2137.t
225 225 test-issue3084.t
226 226 test-issue4074.t
227 227 test-issue522.t
228 228 test-issue586.t
229 229 test-issue612.t
230 230 test-issue619.t
231 231 test-issue660.t
232 232 test-issue672.t
233 233 test-issue842.t
234 234 test-journal-exists.t
235 235 test-journal-share.t
236 236 test-journal.t
237 237 test-known.t
238 238 test-largefiles-cache.t
239 239 test-largefiles-misc.t
240 240 test-largefiles-small-disk.t
241 241 test-largefiles-update.t
242 242 test-largefiles.t
243 243 test-lfs-largefiles.t
244 244 test-lfs-pointer.py
245 245 test-linerange.py
246 246 test-locate.t
247 247 test-lock-badness.t
248 248 test-log-linerange.t
249 249 test-log.t
250 250 test-logexchange.t
251 251 test-lrucachedict.py
252 252 test-mactext.t
253 253 test-mailmap.t
254 254 test-manifest-merging.t
255 255 test-manifest.py
256 256 test-manifest.t
257 257 test-match.py
258 258 test-mdiff.py
259 259 test-merge-changedelete.t
260 260 test-merge-closedheads.t
261 261 test-merge-commit.t
262 262 test-merge-criss-cross.t
263 263 test-merge-default.t
264 264 test-merge-force.t
265 265 test-merge-halt.t
266 266 test-merge-internal-tools-pattern.t
267 267 test-merge-local.t
268 268 test-merge-remove.t
269 269 test-merge-revert.t
270 270 test-merge-revert2.t
271 271 test-merge-subrepos.t
272 272 test-merge-symlinks.t
273 273 test-merge-tools.t
274 274 test-merge-types.t
275 275 test-merge1.t
276 276 test-merge10.t
277 277 test-merge2.t
278 278 test-merge4.t
279 279 test-merge5.t
280 280 test-merge6.t
281 281 test-merge7.t
282 282 test-merge8.t
283 283 test-merge9.t
284 284 test-minifileset.py
285 285 test-minirst.py
286 286 test-mq-git.t
287 287 test-mq-header-date.t
288 288 test-mq-header-from.t
289 289 test-mq-merge.t
290 290 test-mq-pull-from-bundle.t
291 291 test-mq-qclone-http.t
292 292 test-mq-qdelete.t
293 293 test-mq-qdiff.t
294 294 test-mq-qfold.t
295 295 test-mq-qgoto.t
296 296 test-mq-qimport-fail-cleanup.t
297 297 test-mq-qnew.t
298 298 test-mq-qpush-exact.t
299 299 test-mq-qqueue.t
300 300 test-mq-qrefresh-interactive.t
301 301 test-mq-qrefresh-replace-log-message.t
302 302 test-mq-qrefresh.t
303 303 test-mq-qrename.t
304 304 test-mq-qsave.t
305 305 test-mq-safety.t
306 306 test-mq-subrepo.t
307 307 test-mq-symlinks.t
308 308 test-mv-cp-st-diff.t
309 309 test-narrow-archive.t
310 310 test-narrow-clone-no-ellipsis.t
311 311 test-narrow-clone-non-narrow-server.t
312 312 test-narrow-clone-nonlinear.t
313 313 test-narrow-clone.t
314 314 test-narrow-commit.t
315 315 test-narrow-copies.t
316 316 test-narrow-debugcommands.t
317 317 test-narrow-debugrebuilddirstate.t
318 318 test-narrow-exchange-merges.t
319 319 test-narrow-exchange.t
320 320 test-narrow-expanddirstate.t
321 321 test-narrow-merge.t
322 322 test-narrow-patch.t
323 323 test-narrow-patterns.t
324 324 test-narrow-pull.t
325 325 test-narrow-rebase.t
326 326 test-narrow-shallow-merges.t
327 327 test-narrow-shallow.t
328 328 test-narrow-strip.t
329 329 test-narrow-update.t
330 330 test-narrow-widen.t
331 331 test-narrow.t
332 332 test-nested-repo.t
333 333 test-newbranch.t
334 334 test-obshistory.t
335 335 test-obsmarker-template.t
336 336 test-obsmarkers-effectflag.t
337 337 test-obsolete-bundle-strip.t
338 338 test-obsolete-changeset-exchange.t
339 339 test-obsolete-checkheads.t
340 340 test-obsolete-distributed.t
341 test-obsolete-divergent.t
341 342 test-obsolete-tag-cache.t
342 343 test-pager.t
343 344 test-parents.t
344 345 test-parseindex2.py
345 346 test-patch-offset.t
346 347 test-patch.t
347 348 test-pathconflicts-merge.t
348 349 test-pathconflicts-update.t
349 350 test-pathencode.py
350 351 test-pending.t
351 352 test-permissions.t
352 353 test-phases.t
353 354 test-pull-branch.t
354 355 test-pull-http.t
355 356 test-pull-permission.t
356 357 test-pull-pull-corruption.t
357 358 test-pull-r.t
358 359 test-pull-update.t
359 360 test-pull.t
360 361 test-purge.t
361 362 test-push-checkheads-partial-C1.t
362 363 test-push-checkheads-partial-C2.t
363 364 test-push-checkheads-partial-C3.t
364 365 test-push-checkheads-partial-C4.t
365 366 test-push-checkheads-pruned-B1.t
366 367 test-push-checkheads-pruned-B2.t
367 368 test-push-checkheads-pruned-B3.t
368 369 test-push-checkheads-pruned-B4.t
369 370 test-push-checkheads-pruned-B5.t
370 371 test-push-checkheads-pruned-B6.t
371 372 test-push-checkheads-pruned-B7.t
372 373 test-push-checkheads-pruned-B8.t
373 374 test-push-checkheads-superceed-A1.t
374 375 test-push-checkheads-superceed-A2.t
375 376 test-push-checkheads-superceed-A3.t
376 377 test-push-checkheads-superceed-A4.t
377 378 test-push-checkheads-superceed-A5.t
378 379 test-push-checkheads-superceed-A6.t
379 380 test-push-checkheads-superceed-A7.t
380 381 test-push-checkheads-superceed-A8.t
381 382 test-push-checkheads-unpushed-D1.t
382 383 test-push-checkheads-unpushed-D2.t
383 384 test-push-checkheads-unpushed-D3.t
384 385 test-push-checkheads-unpushed-D4.t
385 386 test-push-checkheads-unpushed-D5.t
386 387 test-push-checkheads-unpushed-D6.t
387 388 test-push-checkheads-unpushed-D7.t
388 389 test-push-http.t
389 390 test-push-warn.t
390 391 test-push.t
391 392 test-pushvars.t
392 393 test-qrecord.t
393 394 test-rebase-abort.t
394 395 test-rebase-base-flag.t
395 396 test-rebase-bookmarks.t
396 397 test-rebase-brute-force.t
397 398 test-rebase-cache.t
398 399 test-rebase-check-restore.t
399 400 test-rebase-collapse.t
400 401 test-rebase-conflicts.t
401 402 test-rebase-dest.t
402 403 test-rebase-detach.t
403 404 test-rebase-emptycommit.t
404 405 test-rebase-inmemory.t
405 406 test-rebase-interruptions.t
406 407 test-rebase-issue-noparam-single-rev.t
407 408 test-rebase-legacy.t
408 409 test-rebase-mq-skip.t
409 410 test-rebase-mq.t
410 411 test-rebase-named-branches.t
411 412 test-rebase-newancestor.t
412 413 test-rebase-obsolete.t
413 414 test-rebase-parameters.t
414 415 test-rebase-partial.t
415 416 test-rebase-pull.t
416 417 test-rebase-rename.t
417 418 test-rebase-scenario-global.t
418 419 test-rebase-templates.t
419 420 test-rebase-transaction.t
420 421 test-rebuildstate.t
421 422 test-record.t
422 423 test-relink.t
423 424 test-remove.t
424 425 test-rename-after-merge.t
425 426 test-rename-dir-merge.t
426 427 test-rename-merge1.t
427 428 test-rename.t
428 429 test-repair-strip.t
429 430 test-repo-compengines.t
430 431 test-resolve.t
431 432 test-revert-flags.t
432 433 test-revert-interactive.t
433 434 test-revert-unknown.t
434 435 test-revlog-ancestry.py
435 436 test-revlog-group-emptyiter.t
436 437 test-revlog-mmapindex.t
437 438 test-revlog-packentry.t
438 439 test-revlog-raw.py
439 440 test-revlog-v2.t
440 441 test-revset-dirstate-parents.t
441 442 test-revset-legacy-lookup.t
442 443 test-revset-outgoing.t
443 444 test-rollback.t
444 445 test-run-tests.py
445 446 test-run-tests.t
446 447 test-schemes.t
447 448 test-serve.t
448 449 test-setdiscovery.t
449 450 test-share.t
450 451 test-shelve.t
451 452 test-show-stack.t
452 453 test-show-work.t
453 454 test-show.t
454 455 test-simple-update.t
455 456 test-simplekeyvaluefile.py
456 457 test-simplemerge.py
457 458 test-single-head.t
458 459 test-sparse-clear.t
459 460 test-sparse-clone.t
460 461 test-sparse-import.t
461 462 test-sparse-merges.t
462 463 test-sparse-profiles.t
463 464 test-sparse-requirement.t
464 465 test-sparse-verbose-json.t
465 466 test-sparse.t
466 467 test-split.t
467 468 test-ssh-bundle1.t
468 469 test-ssh-clone-r.t
469 470 test-ssh-proto-unbundle.t
470 471 test-ssh-proto.t
471 472 test-ssh.t
472 473 test-sshserver.py
473 474 test-stack.t
474 475 test-status-inprocess.py
475 476 test-status-rev.t
476 477 test-status-terse.t
477 478 test-strict.t
478 479 test-strip-cross.t
479 480 test-strip.t
480 481 test-subrepo-deep-nested-change.t
481 482 test-subrepo-missing.t
482 483 test-subrepo-paths.t
483 484 test-subrepo-recursion.t
484 485 test-subrepo-relative-path.t
485 486 test-subrepo.t
486 487 test-symlink-os-yes-fs-no.py
487 488 test-symlink-placeholder.t
488 489 test-symlinks.t
489 490 test-tag.t
490 491 test-tags.t
491 492 test-template-basic.t
492 493 test-template-functions.t
493 494 test-template-keywords.t
494 495 test-template-map.t
495 496 test-transplant.t
496 497 test-treemanifest.t
497 498 test-ui-color.py
498 499 test-ui-config.py
499 500 test-ui-verbosity.py
500 501 test-unamend.t
501 502 test-unbundlehash.t
502 503 test-uncommit.t
503 504 test-unified-test.t
504 505 test-unionrepo.t
505 506 test-unrelated-pull.t
506 507 test-up-local-change.t
507 508 test-update-branches.t
508 509 test-update-dest.t
509 510 test-update-issue1456.t
510 511 test-update-names.t
511 512 test-update-reverse.t
512 513 test-upgrade-repo.t
513 514 test-url-download.t
514 515 test-url-rev.t
515 516 test-url.py
516 517 test-username-newline.t
517 518 test-verify.t
518 519 test-walk.t
519 520 test-walkrepo.py
520 521 test-websub.t
521 522 test-win32text.t
522 523 test-wireproto-clientreactor.py
523 524 test-wireproto-framing.py
524 525 test-wireproto-serverreactor.py
525 526 test-wireproto.py
526 527 test-wsgirequest.py
527 528 test-xdg.t
@@ -1,766 +1,766
1 1 Test file dedicated to testing the divergent troubles from obsolete changeset.
2 2
3 3 This is the most complex troubles from far so we isolate it in a dedicated
4 4 file.
5 5
6 6 Enable obsolete
7 7
8 8 $ cat >> $HGRCPATH << EOF
9 9 > [ui]
10 10 > logtemplate = {rev}:{node|short} {desc}{if(obsfate, " [{join(obsfate, "; ")}]")}\n
11 11 > [experimental]
12 12 > evolution.createmarkers=True
13 13 > [extensions]
14 14 > drawdag=$TESTDIR/drawdag.py
15 15 > [alias]
16 16 > debugobsolete = debugobsolete -d '0 0'
17 17 > [phases]
18 18 > publish=False
19 19 > [templates]
20 20 > wuentryshort = '{instability}:{if(divergentnodes, " ")}{divergentnodes} {reason} {node|shortest}\n'
21 21 > whyunstableshort = '{whyunstable % wuentryshort}'
22 22 > wuentryshorter = '{instability}:{divergentnodes % " {node|shortest} ({phase})"} {reason} {node|shortest}\n'
23 23 > whyunstableshorter = '{whyunstable % wuentryshorter}'
24 24 > EOF
25 25
26 26
27 27 $ mkcommit() {
28 28 > echo "$1" > "$1"
29 29 > hg add "$1"
30 30 > hg ci -m "$1"
31 31 > }
32 32 $ getid() {
33 33 > hg log --hidden -r "desc('$1')" -T '{node}\n'
34 34 > }
35 35
36 36 setup repo
37 37
38 38 $ hg init reference
39 39 $ cd reference
40 40 $ mkcommit base
41 41 $ mkcommit A_0
42 42 $ hg up 0
43 43 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
44 44 $ mkcommit A_1
45 45 created new head
46 46 $ hg up 0
47 47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
48 48 $ mkcommit A_2
49 49 created new head
50 50 $ hg up 0
51 51 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
52 52 $ cd ..
53 53
54 54
55 55 $ newcase() {
56 56 > hg clone -u 0 -q reference $1
57 57 > cd $1
58 58 > }
59 59
60 60 direct divergence
61 61 -----------------
62 62
63 63 A_1 have two direct and divergent successors A_1 and A_1
64 64
65 65 $ newcase direct
66 66 $ hg debugobsolete `getid A_0` `getid A_1`
67 67 obsoleted 1 changesets
68 68 $ hg debugobsolete `getid A_0` `getid A_2`
69 69 2 new content-divergent changesets
70 70 $ hg log -G --hidden
71 71 * 3:392fd25390da A_2
72 72 |
73 73 | * 2:82623d38b9ba A_1
74 74 |/
75 75 | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da]
76 76 |/
77 77 @ 0:d20a80d4def3 base
78 78
79 79 $ hg debugsuccessorssets --hidden 'all()'
80 80 d20a80d4def3
81 81 d20a80d4def3
82 82 007dc284c1f8
83 83 82623d38b9ba
84 84 392fd25390da
85 85 82623d38b9ba
86 86 82623d38b9ba
87 87 392fd25390da
88 88 392fd25390da
89 89 $ hg log -r 'contentdivergent()'
90 90 2:82623d38b9ba A_1
91 91 3:392fd25390da A_2
92 92 $ hg debugsuccessorssets 'all()' --closest
93 93 d20a80d4def3
94 94 d20a80d4def3
95 95 82623d38b9ba
96 96 82623d38b9ba
97 97 392fd25390da
98 98 392fd25390da
99 99 $ hg debugsuccessorssets 'all()' --closest --hidden
100 100 d20a80d4def3
101 101 d20a80d4def3
102 102 007dc284c1f8
103 103 82623d38b9ba
104 104 392fd25390da
105 105 82623d38b9ba
106 106 82623d38b9ba
107 107 392fd25390da
108 108 392fd25390da
109 109
110 110 check that mercurial refuse to push
111 111
112 112 $ hg init ../other
113 113 $ hg push ../other
114 114 pushing to ../other
115 115 searching for changes
116 116 abort: push includes content-divergent changeset: 392fd25390da!
117 117 [255]
118 118
119 119 $ cd ..
120 120
121 121
122 122 indirect divergence with known changeset
123 123 -------------------------------------------
124 124
125 125 $ newcase indirect_known
126 126 $ hg debugobsolete `getid A_0` `getid A_1`
127 127 obsoleted 1 changesets
128 128 $ hg debugobsolete `getid A_0` `getid A_2`
129 129 2 new content-divergent changesets
130 130 $ mkcommit A_3
131 131 created new head
132 132 $ hg debugobsolete `getid A_2` `getid A_3`
133 133 obsoleted 1 changesets
134 134 $ hg log -G --hidden
135 135 @ 4:01f36c5a8fda A_3
136 136 |
137 137 | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda]
138 138 |/
139 139 | * 2:82623d38b9ba A_1
140 140 |/
141 141 | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da]
142 142 |/
143 143 o 0:d20a80d4def3 base
144 144
145 145 $ hg debugsuccessorssets --hidden 'all()'
146 146 d20a80d4def3
147 147 d20a80d4def3
148 148 007dc284c1f8
149 149 82623d38b9ba
150 150 01f36c5a8fda
151 151 82623d38b9ba
152 152 82623d38b9ba
153 153 392fd25390da
154 154 01f36c5a8fda
155 155 01f36c5a8fda
156 156 01f36c5a8fda
157 157 $ hg log -r 'contentdivergent()'
158 158 2:82623d38b9ba A_1
159 159 4:01f36c5a8fda A_3
160 160 $ hg debugsuccessorssets 'all()' --closest
161 161 d20a80d4def3
162 162 d20a80d4def3
163 163 82623d38b9ba
164 164 82623d38b9ba
165 165 01f36c5a8fda
166 166 01f36c5a8fda
167 167 $ hg debugsuccessorssets 'all()' --closest --hidden
168 168 d20a80d4def3
169 169 d20a80d4def3
170 170 007dc284c1f8
171 171 82623d38b9ba
172 172 392fd25390da
173 173 82623d38b9ba
174 174 82623d38b9ba
175 175 392fd25390da
176 176 392fd25390da
177 177 01f36c5a8fda
178 178 01f36c5a8fda
179 179 $ cd ..
180 180
181 181
182 182 indirect divergence with known changeset
183 183 -------------------------------------------
184 184
185 185 $ newcase indirect_unknown
186 186 $ hg debugobsolete `getid A_0` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
187 187 obsoleted 1 changesets
188 188 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid A_1`
189 189 $ hg debugobsolete `getid A_0` `getid A_2`
190 190 2 new content-divergent changesets
191 191 $ hg log -G --hidden
192 192 * 3:392fd25390da A_2
193 193 |
194 194 | * 2:82623d38b9ba A_1
195 195 |/
196 196 | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da]
197 197 |/
198 198 @ 0:d20a80d4def3 base
199 199
200 200 $ hg debugsuccessorssets --hidden 'all()'
201 201 d20a80d4def3
202 202 d20a80d4def3
203 203 007dc284c1f8
204 204 82623d38b9ba
205 205 392fd25390da
206 206 82623d38b9ba
207 207 82623d38b9ba
208 208 392fd25390da
209 209 392fd25390da
210 210 $ hg log -r 'contentdivergent()'
211 211 2:82623d38b9ba A_1
212 212 3:392fd25390da A_2
213 213 $ hg debugsuccessorssets 'all()' --closest
214 214 d20a80d4def3
215 215 d20a80d4def3
216 216 82623d38b9ba
217 217 82623d38b9ba
218 218 392fd25390da
219 219 392fd25390da
220 220 $ hg debugsuccessorssets 'all()' --closest --hidden
221 221 d20a80d4def3
222 222 d20a80d4def3
223 223 007dc284c1f8
224 224 82623d38b9ba
225 225 392fd25390da
226 226 82623d38b9ba
227 227 82623d38b9ba
228 228 392fd25390da
229 229 392fd25390da
230 230 $ cd ..
231 231
232 232 do not take unknown node in account if they are final
233 233 -----------------------------------------------------
234 234
235 235 $ newcase final-unknown
236 236 $ hg debugobsolete `getid A_0` `getid A_1`
237 237 obsoleted 1 changesets
238 238 $ hg debugobsolete `getid A_1` `getid A_2`
239 239 obsoleted 1 changesets
240 240 $ hg debugobsolete `getid A_0` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
241 241 $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccccccccccccccccc
242 242 $ hg debugobsolete `getid A_1` dddddddddddddddddddddddddddddddddddddddd
243 243
244 244 $ hg debugsuccessorssets --hidden 'desc('A_0')'
245 245 007dc284c1f8
246 246 392fd25390da
247 247 $ hg debugsuccessorssets 'desc('A_0')' --closest
248 248 $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden
249 249 007dc284c1f8
250 250 82623d38b9ba
251 251
252 252 $ cd ..
253 253
254 254 divergence that converge again is not divergence anymore
255 255 -----------------------------------------------------
256 256
257 257 $ newcase converged_divergence
258 258 $ hg debugobsolete `getid A_0` `getid A_1`
259 259 obsoleted 1 changesets
260 260 $ hg debugobsolete `getid A_0` `getid A_2`
261 261 2 new content-divergent changesets
262 262 $ mkcommit A_3
263 263 created new head
264 264 $ hg debugobsolete `getid A_1` `getid A_3`
265 265 obsoleted 1 changesets
266 266 $ hg debugobsolete `getid A_2` `getid A_3`
267 267 obsoleted 1 changesets
268 268 $ hg log -G --hidden
269 269 @ 4:01f36c5a8fda A_3
270 270 |
271 271 | x 3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda]
272 272 |/
273 273 | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda]
274 274 |/
275 275 | x 1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba; rewritten as 3:392fd25390da]
276 276 |/
277 277 o 0:d20a80d4def3 base
278 278
279 279 $ hg debugsuccessorssets --hidden 'all()'
280 280 d20a80d4def3
281 281 d20a80d4def3
282 282 007dc284c1f8
283 283 01f36c5a8fda
284 284 82623d38b9ba
285 285 01f36c5a8fda
286 286 392fd25390da
287 287 01f36c5a8fda
288 288 01f36c5a8fda
289 289 01f36c5a8fda
290 290 $ hg log -r 'contentdivergent()'
291 291 $ hg debugsuccessorssets 'all()' --closest
292 292 d20a80d4def3
293 293 d20a80d4def3
294 294 01f36c5a8fda
295 295 01f36c5a8fda
296 296 $ hg debugsuccessorssets 'all()' --closest --hidden
297 297 d20a80d4def3
298 298 d20a80d4def3
299 299 007dc284c1f8
300 300 82623d38b9ba
301 301 392fd25390da
302 302 82623d38b9ba
303 303 82623d38b9ba
304 304 392fd25390da
305 305 392fd25390da
306 306 01f36c5a8fda
307 307 01f36c5a8fda
308 308 $ cd ..
309 309
310 310 split is not divergences
311 311 -----------------------------
312 312
313 313 $ newcase split
314 314 $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2`
315 315 obsoleted 1 changesets
316 316 $ hg log -G --hidden
317 317 o 3:392fd25390da A_2
318 318 |
319 319 | o 2:82623d38b9ba A_1
320 320 |/
321 321 | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da]
322 322 |/
323 323 @ 0:d20a80d4def3 base
324 324
325 325 $ hg debugsuccessorssets --hidden 'all()'
326 326 d20a80d4def3
327 327 d20a80d4def3
328 328 007dc284c1f8
329 329 82623d38b9ba 392fd25390da
330 330 82623d38b9ba
331 331 82623d38b9ba
332 332 392fd25390da
333 333 392fd25390da
334 334 $ hg log -r 'contentdivergent()'
335 335 $ hg debugsuccessorssets 'all()' --closest
336 336 d20a80d4def3
337 337 d20a80d4def3
338 338 82623d38b9ba
339 339 82623d38b9ba
340 340 392fd25390da
341 341 392fd25390da
342 342 $ hg debugsuccessorssets 'all()' --closest --hidden
343 343 d20a80d4def3
344 344 d20a80d4def3
345 345 007dc284c1f8
346 346 82623d38b9ba 392fd25390da
347 347 82623d38b9ba
348 348 82623d38b9ba
349 349 392fd25390da
350 350 392fd25390da
351 351
352 352 Even when subsequent rewriting happen
353 353
354 354 $ mkcommit A_3
355 355 created new head
356 356 $ hg debugobsolete `getid A_1` `getid A_3`
357 357 obsoleted 1 changesets
358 358 $ hg up 0
359 359 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
360 360 $ mkcommit A_4
361 361 created new head
362 362 $ hg debugobsolete `getid A_2` `getid A_4`
363 363 obsoleted 1 changesets
364 364 $ hg up 0
365 365 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
366 366 $ mkcommit A_5
367 367 created new head
368 368 $ hg debugobsolete `getid A_4` `getid A_5`
369 369 obsoleted 1 changesets
370 370 $ hg log -G --hidden
371 371 @ 6:e442cfc57690 A_5
372 372 |
373 373 | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690]
374 374 |/
375 375 | o 4:01f36c5a8fda A_3
376 376 |/
377 377 | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a]
378 378 |/
379 379 | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda]
380 380 |/
381 381 | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da]
382 382 |/
383 383 o 0:d20a80d4def3 base
384 384
385 385 $ hg debugsuccessorssets --hidden 'all()'
386 386 d20a80d4def3
387 387 d20a80d4def3
388 388 007dc284c1f8
389 389 01f36c5a8fda e442cfc57690
390 390 82623d38b9ba
391 391 01f36c5a8fda
392 392 392fd25390da
393 393 e442cfc57690
394 394 01f36c5a8fda
395 395 01f36c5a8fda
396 396 6a411f0d7a0a
397 397 e442cfc57690
398 398 e442cfc57690
399 399 e442cfc57690
400 400 $ hg debugsuccessorssets 'all()' --closest
401 401 d20a80d4def3
402 402 d20a80d4def3
403 403 01f36c5a8fda
404 404 01f36c5a8fda
405 405 e442cfc57690
406 406 e442cfc57690
407 407 $ hg debugsuccessorssets 'all()' --closest --hidden
408 408 d20a80d4def3
409 409 d20a80d4def3
410 410 007dc284c1f8
411 411 82623d38b9ba 392fd25390da
412 412 82623d38b9ba
413 413 82623d38b9ba
414 414 392fd25390da
415 415 392fd25390da
416 416 01f36c5a8fda
417 417 01f36c5a8fda
418 418 6a411f0d7a0a
419 419 e442cfc57690
420 420 e442cfc57690
421 421 e442cfc57690
422 422 $ hg log -r 'contentdivergent()'
423 423
424 424 Check more complex obsolescence graft (with divergence)
425 425
426 426 $ mkcommit B_0; hg up 0
427 427 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
428 428 $ hg debugobsolete `getid B_0` `getid A_2`
429 429 obsoleted 1 changesets
430 430 $ mkcommit A_7; hg up 0
431 431 created new head
432 432 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
433 433 $ mkcommit A_8; hg up 0
434 434 created new head
435 435 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
436 436 $ hg debugobsolete `getid A_5` `getid A_7` `getid A_8`
437 437 obsoleted 1 changesets
438 438 $ mkcommit A_9; hg up 0
439 439 created new head
440 440 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
441 441 $ hg debugobsolete `getid A_5` `getid A_9`
442 442 4 new content-divergent changesets
443 443 $ hg log -G --hidden
444 444 * 10:bed64f5d2f5a A_9
445 445 |
446 446 | * 9:14608b260df8 A_8
447 447 |/
448 448 | * 8:7ae126973a96 A_7
449 449 |/
450 450 | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da]
451 451 | |
452 452 | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8]
453 453 |/
454 454 | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690]
455 455 |/
456 456 | * 4:01f36c5a8fda A_3
457 457 |/
458 458 | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a]
459 459 |/
460 460 | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda]
461 461 |/
462 462 | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da]
463 463 |/
464 464 @ 0:d20a80d4def3 base
465 465
466 466 $ hg debugsuccessorssets --hidden 'all()'
467 467 d20a80d4def3
468 468 d20a80d4def3
469 469 007dc284c1f8
470 470 01f36c5a8fda bed64f5d2f5a
471 471 01f36c5a8fda 7ae126973a96 14608b260df8
472 472 82623d38b9ba
473 473 01f36c5a8fda
474 474 392fd25390da
475 475 bed64f5d2f5a
476 476 7ae126973a96 14608b260df8
477 477 01f36c5a8fda
478 478 01f36c5a8fda
479 479 6a411f0d7a0a
480 480 bed64f5d2f5a
481 481 7ae126973a96 14608b260df8
482 482 e442cfc57690
483 483 bed64f5d2f5a
484 484 7ae126973a96 14608b260df8
485 485 3750ebee865d
486 486 bed64f5d2f5a
487 487 7ae126973a96 14608b260df8
488 488 7ae126973a96
489 489 7ae126973a96
490 490 14608b260df8
491 491 14608b260df8
492 492 bed64f5d2f5a
493 493 bed64f5d2f5a
494 494 $ hg debugsuccessorssets 'all()' --closest
495 495 d20a80d4def3
496 496 d20a80d4def3
497 497 01f36c5a8fda
498 498 01f36c5a8fda
499 499 7ae126973a96
500 500 7ae126973a96
501 501 14608b260df8
502 502 14608b260df8
503 503 bed64f5d2f5a
504 504 bed64f5d2f5a
505 505 $ hg debugsuccessorssets 'all()' --closest --hidden
506 506 d20a80d4def3
507 507 d20a80d4def3
508 508 007dc284c1f8
509 509 82623d38b9ba 392fd25390da
510 510 82623d38b9ba
511 511 82623d38b9ba
512 512 392fd25390da
513 513 392fd25390da
514 514 01f36c5a8fda
515 515 01f36c5a8fda
516 516 6a411f0d7a0a
517 517 e442cfc57690
518 518 e442cfc57690
519 519 e442cfc57690
520 520 3750ebee865d
521 521 392fd25390da
522 522 7ae126973a96
523 523 7ae126973a96
524 524 14608b260df8
525 525 14608b260df8
526 526 bed64f5d2f5a
527 527 bed64f5d2f5a
528 528 $ hg log -r 'contentdivergent()'
529 529 4:01f36c5a8fda A_3
530 530 8:7ae126973a96 A_7
531 531 9:14608b260df8 A_8
532 532 10:bed64f5d2f5a A_9
533 533
534 534 $ hg log -r bed64f5d2f5a -T '{whyunstable}\n' | sort
535 535 content-divergent: 4:01f36c5a8fda (draft) 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor 007dc284c1f8
536 536 content-divergent: 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor e442cfc57690
537 537 $ hg log -r bed64f5d2f5a -T whyunstableshort | sort
538 538 content-divergent: 4:01f36c5a8fda (draft) 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor 007d
539 539 content-divergent: 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor e442
540 540 $ hg log -r bed64f5d2f5a -T whyunstableshorter | sort
541 541 content-divergent: 01f3 (draft) 7ae1 (draft) 1460 (draft) predecessor 007d
542 542 content-divergent: 7ae1 (draft) 1460 (draft) predecessor e442
543 543
544 544 fix the divergence
545 545
546 546 $ mkcommit A_A; hg up 0
547 547 created new head
548 548 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
549 549 $ hg debugobsolete `getid A_9` `getid A_A`
550 550 obsoleted 1 changesets
551 551 $ hg debugobsolete `getid A_7` `getid A_A`
552 552 obsoleted 1 changesets
553 553 $ hg debugobsolete `getid A_8` `getid A_A`
554 554 obsoleted 1 changesets
555 555 $ hg log -G --hidden
556 556 o 11:a139f71be9da A_A
557 557 |
558 558 | x 10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da]
559 559 |/
560 560 | x 9:14608b260df8 A_8 [rewritten as 11:a139f71be9da]
561 561 |/
562 562 | x 8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da]
563 563 |/
564 564 | x 7:3750ebee865d B_0 [rewritten as 3:392fd25390da]
565 565 | |
566 566 | x 6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a; split as 8:7ae126973a96, 9:14608b260df8]
567 567 |/
568 568 | x 5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690]
569 569 |/
570 570 | o 4:01f36c5a8fda A_3
571 571 |/
572 572 | x 3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a]
573 573 |/
574 574 | x 2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda]
575 575 |/
576 576 | x 1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da]
577 577 |/
578 578 @ 0:d20a80d4def3 base
579 579
580 580 $ hg debugsuccessorssets --hidden 'all()'
581 581 d20a80d4def3
582 582 d20a80d4def3
583 583 007dc284c1f8
584 584 01f36c5a8fda a139f71be9da
585 585 82623d38b9ba
586 586 01f36c5a8fda
587 587 392fd25390da
588 588 a139f71be9da
589 589 01f36c5a8fda
590 590 01f36c5a8fda
591 591 6a411f0d7a0a
592 592 a139f71be9da
593 593 e442cfc57690
594 594 a139f71be9da
595 595 3750ebee865d
596 596 a139f71be9da
597 597 7ae126973a96
598 598 a139f71be9da
599 599 14608b260df8
600 600 a139f71be9da
601 601 bed64f5d2f5a
602 602 a139f71be9da
603 603 a139f71be9da
604 604 a139f71be9da
605 605 $ hg debugsuccessorssets 'all()' --closest
606 606 d20a80d4def3
607 607 d20a80d4def3
608 608 01f36c5a8fda
609 609 01f36c5a8fda
610 610 a139f71be9da
611 611 a139f71be9da
612 612 $ hg debugsuccessorssets 'all()' --closest --hidden
613 613 d20a80d4def3
614 614 d20a80d4def3
615 615 007dc284c1f8
616 616 82623d38b9ba 392fd25390da
617 617 82623d38b9ba
618 618 82623d38b9ba
619 619 392fd25390da
620 620 392fd25390da
621 621 01f36c5a8fda
622 622 01f36c5a8fda
623 623 6a411f0d7a0a
624 624 e442cfc57690
625 625 e442cfc57690
626 626 e442cfc57690
627 627 3750ebee865d
628 628 392fd25390da
629 629 7ae126973a96
630 630 a139f71be9da
631 631 14608b260df8
632 632 a139f71be9da
633 633 bed64f5d2f5a
634 634 a139f71be9da
635 635 a139f71be9da
636 636 a139f71be9da
637 637 $ hg log -r 'contentdivergent()'
638 638
639 639 #if serve
640 640
641 641 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid --config web.view=all \
642 642 > -A access.log -E errors.log
643 643 $ cat hg.pid >> $DAEMON_PIDS
644 644
645 645 check an obsolete changeset that was rewritten and also split
646 646
647 647 $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=paper' | egrep 'rewritten|split'
648 648 <td>rewritten as <a href="/rev/bed64f5d2f5a?style=paper">bed64f5d2f5a</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br>
649 649 split as <a href="/rev/7ae126973a96?style=paper">7ae126973a96</a> <a href="/rev/14608b260df8?style=paper">14608b260df8</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
650 650 $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=coal' | egrep 'rewritten|split'
651 651 <td>rewritten as <a href="/rev/bed64f5d2f5a?style=coal">bed64f5d2f5a</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span><br>
652 652 split as <a href="/rev/7ae126973a96?style=coal">7ae126973a96</a> <a href="/rev/14608b260df8?style=coal">14608b260df8</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
653 653 $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=gitweb' | egrep 'rewritten|split'
654 654 <td>rewritten as <a class="list" href="/rev/bed64f5d2f5a?style=gitweb">bed64f5d2f5a</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
655 655 <td>split as <a class="list" href="/rev/7ae126973a96?style=gitweb">7ae126973a96</a> <a class="list" href="/rev/14608b260df8?style=gitweb">14608b260df8</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
656 656 $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=monoblue' | egrep 'rewritten|split'
657 657 <dd>rewritten as <a href="/rev/bed64f5d2f5a?style=monoblue">bed64f5d2f5a</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd>
658 658 <dd>split as <a href="/rev/7ae126973a96?style=monoblue">7ae126973a96</a> <a href="/rev/14608b260df8?style=monoblue">14608b260df8</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></dd>
659 659 $ get-with-headers.py localhost:$HGPORT 'rev/e442cfc57690?style=spartan' | egrep 'rewritten|split'
660 660 <td class="obsolete">rewritten as <a href="/rev/bed64f5d2f5a?style=spartan">bed64f5d2f5a</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
661 661 <td class="obsolete">split as <a href="/rev/7ae126973a96?style=spartan">7ae126973a96</a> <a href="/rev/14608b260df8?style=spartan">14608b260df8</a> by &#116;&#101;&#115;&#116; <span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span></td>
662 662
663 663 $ killdaemons.py
664 664
665 665 #endif
666 666
667 667 $ cd ..
668 668
669 669
670 670 Subset does not diverge
671 671 ------------------------------
672 672
673 673 Do not report divergent successors-set if it is a subset of another
674 674 successors-set. (report [A,B] not [A] + [A,B])
675 675
676 676 $ newcase subset
677 677 $ hg debugobsolete `getid A_0` `getid A_2`
678 678 obsoleted 1 changesets
679 679 $ hg debugobsolete `getid A_0` `getid A_1` `getid A_2`
680 680 $ hg debugsuccessorssets --hidden 'desc('A_0')'
681 681 007dc284c1f8
682 682 82623d38b9ba 392fd25390da
683 683 $ hg debugsuccessorssets 'desc('A_0')' --closest
684 684 $ hg debugsuccessorssets 'desc('A_0')' --closest --hidden
685 685 007dc284c1f8
686 686 82623d38b9ba 392fd25390da
687 687
688 688 $ cd ..
689 689
690 690 Use scmutil.cleanupnodes API to create divergence
691 691
692 692 $ hg init cleanupnodes
693 693 $ cd cleanupnodes
694 694 $ hg debugdrawdag <<'EOS'
695 695 > B1 B3 B4
696 696 > | \|
697 697 > A Z
698 698 > EOS
699 699
700 700 $ hg update -q B1
701 701 $ echo 3 >> B
702 702 $ hg commit --amend -m B2
703 703 $ cat > $TESTTMP/scmutilcleanup.py <<EOF
704 704 > from mercurial import registrar, scmutil
705 705 > cmdtable = {}
706 706 > command = registrar.command(cmdtable)
707 > @command('cleanup')
707 > @command(b'cleanup')
708 708 > def cleanup(ui, repo):
709 709 > def node(expr):
710 710 > unfi = repo.unfiltered()
711 711 > rev = unfi.revs(expr).first()
712 712 > return unfi.changelog.node(rev)
713 > with repo.wlock(), repo.lock(), repo.transaction('delayedstrip'):
714 > mapping = {node('desc(B1)'): [node('desc(B3)')],
715 > node('desc(B3)'): [node('desc(B4)')]}
716 > scmutil.cleanupnodes(repo, mapping, 'test')
713 > with repo.wlock(), repo.lock(), repo.transaction(b'delayedstrip'):
714 > mapping = {node(b'desc(B1)'): [node(b'desc(B3)')],
715 > node(b'desc(B3)'): [node(b'desc(B4)')]}
716 > scmutil.cleanupnodes(repo, mapping, b'test')
717 717 > EOF
718 718
719 719 $ rm .hg/localtags
720 720 $ hg cleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
721 721 2 new content-divergent changesets
722 722 $ hg log -G -T '{rev}:{node|short} {desc} {instabilities}' -r 'sort(all(), topo)'
723 723 @ 5:1a2a9b5b0030 B2 content-divergent
724 724 |
725 725 | * 4:70d5a63ca112 B4 content-divergent
726 726 | |
727 727 | o 1:48b9aae0607f Z
728 728 |
729 729 o 0:426bada5c675 A
730 730
731 731 $ hg debugobsolete
732 732 a178212c3433c4e77b573f6011e29affb8aefa33 1a2a9b5b0030632400aa78e00388c20f99d3ec44 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'operation': 'amend', 'user': 'test'}
733 733 a178212c3433c4e77b573f6011e29affb8aefa33 ad6478fb94ecec98b86daae98722865d494ac561 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'test', 'user': 'test'}
734 734 ad6478fb94ecec98b86daae98722865d494ac561 70d5a63ca112acb3764bc1d7320ca90ea688d671 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'test', 'user': 'test'}
735 735
736 736 $ hg debugwhyunstable 1a2a9b5b0030
737 737 content-divergent: 70d5a63ca112acb3764bc1d7320ca90ea688d671 (draft) predecessor a178212c3433c4e77b573f6011e29affb8aefa33
738 738
739 739 $ hg log -r 1a2a9b5b0030 -T '{whyunstable}\n'
740 740 content-divergent: 4:70d5a63ca112 (draft) predecessor a178212c3433
741 741 $ hg log -r 1a2a9b5b0030 -T whyunstableshort
742 742 content-divergent: 4:70d5a63ca112 (draft) predecessor a178
743 743 $ hg log -r 1a2a9b5b0030 -T whyunstableshorter
744 744 content-divergent: 70d5 (draft) predecessor a178
745 745
746 746 #if serve
747 747
748 748 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
749 749 $ cat hg.pid >> $DAEMON_PIDS
750 750
751 751 check explanation for a content-divergent changeset
752 752
753 753 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=paper' | grep divergent:
754 754 <td>content-divergent: <a href="/rev/70d5a63ca112?style=paper">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=paper">a178212c3433</a></td>
755 755 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=coal' | grep divergent:
756 756 <td>content-divergent: <a href="/rev/70d5a63ca112?style=coal">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=coal">a178212c3433</a></td>
757 757 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=gitweb' | grep divergent:
758 758 <td>content-divergent: <a class="list" href="/rev/70d5a63ca112?style=gitweb">70d5a63ca112</a> (draft) predecessor <a class="list" href="/rev/a178212c3433?style=gitweb">a178212c3433</a></td>
759 759 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=monoblue' | grep divergent:
760 760 <dd>content-divergent: <a href="/rev/70d5a63ca112?style=monoblue">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=monoblue">a178212c3433</a></dd>
761 761 $ get-with-headers.py localhost:$HGPORT 'rev/1a2a9b5b0030?style=spartan' | grep divergent:
762 762 <td class="unstable">content-divergent: <a href="/rev/70d5a63ca112?style=spartan">70d5a63ca112</a> (draft) predecessor <a href="/rev/a178212c3433?style=spartan">a178212c3433</a></td>
763 763
764 764 $ killdaemons.py
765 765
766 766 #endif
General Comments 0
You need to be logged in to leave comments. Login now