tests/test-evolve-obshistory.t
branchmercurial-4.0
changeset 2532 ca157d06b2dc
parent 2432 765b2561fa90
parent 2531 d3d686f05458
child 2596 44dd9d76afb2
equal deleted inserted replaced
2467:d517659556cf 2532:ca157d06b2dc
    52      date:        Thu Jan 01 00:00:00 1970 +0000
    52      date:        Thu Jan 01 00:00:00 1970 +0000
    53      summary:     ROOT
    53      summary:     ROOT
    54   
    54   
    55 Actual test
    55 Actual test
    56 -----------
    56 -----------
    57   $ hg olog 4ae3a4151de9
    57   $ hg obslog 4ae3a4151de9
    58   @  4ae3a4151de9 (3) A1
    58   @  4ae3a4151de9 (3) A1
    59   |
    59   |
    60   x  471f378eab4c (1) A0
    60   x  471f378eab4c (1) A0
    61        rewritten by test (*20*) as 4ae3a4151de9 (glob)
    61        rewritten by test (*) as 4ae3a4151de9 (glob)
    62   
    62   
    63   $ hg olog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
    63   $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
    64   [
    64   [
    65       {
    65       {
    66           "debugobshistory.markers": [],
    66           "debugobshistory.markers": [],
    67           "debugobshistory.node": "4ae3a4151de9",
    67           "debugobshistory.node": "4ae3a4151de9",
    68           "debugobshistory.rev": 3,
    68           "debugobshistory.rev": 3,
    85           "debugobshistory.node": "471f378eab4c",
    85           "debugobshistory.node": "471f378eab4c",
    86           "debugobshistory.rev": 1,
    86           "debugobshistory.rev": 1,
    87           "debugobshistory.shortdescription": "A0"
    87           "debugobshistory.shortdescription": "A0"
    88       }
    88       }
    89   ]
    89   ]
    90   $ hg olog --hidden 471f378eab4c
    90   $ hg obslog --hidden 471f378eab4c
    91   x  471f378eab4c (1) A0
    91   x  471f378eab4c (1) A0
    92        rewritten by test (*20*) as 4ae3a4151de9 (glob)
    92        rewritten by test (*) as 4ae3a4151de9 (glob)
    93   
    93   
    94   $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
    94   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
    95   [
    95   [
    96       {
    96       {
    97           "debugobshistory.markers": [
    97           "debugobshistory.markers": [
    98               {
    98               {
    99                   "debugobshistory.marker_date": [
    99                   "debugobshistory.marker_date": [
   172   
   172   
   173 
   173 
   174 Actual test
   174 Actual test
   175 -----------
   175 -----------
   176 
   176 
   177   $ hg olog 'desc(B0)' --hidden
   177   $ hg obslog 'desc(B0)' --hidden
   178   x  0dec01379d3b (2) B0
   178   x  0dec01379d3b (2) B0
   179        pruned by test (*20*) (glob)
   179        pruned by test (*) (glob)
   180   
   180   
   181   $ hg olog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
   181   $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
   182   [
   182   [
   183       {
   183       {
   184           "debugobshistory.markers": [
   184           "debugobshistory.markers": [
   185               {
   185               {
   186                   "debugobshistory.marker_date": [
   186                   "debugobshistory.marker_date": [
   194           "debugobshistory.node": "0dec01379d3b",
   194           "debugobshistory.node": "0dec01379d3b",
   195           "debugobshistory.rev": 2,
   195           "debugobshistory.rev": 2,
   196           "debugobshistory.shortdescription": "B0"
   196           "debugobshistory.shortdescription": "B0"
   197       }
   197       }
   198   ]
   198   ]
   199   $ hg olog 'desc(A0)'
   199   $ hg obslog 'desc(A0)'
   200   @  471f378eab4c (1) A0
   200   @  471f378eab4c (1) A0
   201   
   201   
   202   $ hg olog 'desc(A0)' --no-graph -Tjson | python -m json.tool
   202   $ hg obslog 'desc(A0)' --no-graph -Tjson | python -m json.tool
   203   [
   203   [
   204       {
   204       {
   205           "debugobshistory.markers": [],
   205           "debugobshistory.markers": [],
   206           "debugobshistory.node": "471f378eab4c",
   206           "debugobshistory.node": "471f378eab4c",
   207           "debugobshistory.rev": 1,
   207           "debugobshistory.rev": 1,
   305   
   305   
   306 Actual test
   306 Actual test
   307 -----------
   307 -----------
   308 
   308 
   309 Check that debugobshistory on splitted commit show both targets
   309 Check that debugobshistory on splitted commit show both targets
   310   $ hg olog 471597cad322 --hidden
   310   $ hg obslog 471597cad322 --hidden
   311   x  471597cad322 (1) A0
   311   x  471597cad322 (1) A0
   312        rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
   312        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
   313   
   313   
   314   $ hg olog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
   314   $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
   315   [
   315   [
   316       {
   316       {
   317           "debugobshistory.markers": [
   317           "debugobshistory.markers": [
   318               {
   318               {
   319                   "debugobshistory.marker_date": [
   319                   "debugobshistory.marker_date": [
   333           "debugobshistory.shortdescription": "A0"
   333           "debugobshistory.shortdescription": "A0"
   334       }
   334       }
   335   ]
   335   ]
   336 Check that debugobshistory on the first successor after split show
   336 Check that debugobshistory on the first successor after split show
   337 the revision plus the splitted one
   337 the revision plus the splitted one
   338   $ hg olog 337fec4d2edc
   338   $ hg obslog 337fec4d2edc
   339   o  337fec4d2edc (2) A0
   339   o  337fec4d2edc (2) A0
   340   |
   340   |
   341   x  471597cad322 (1) A0
   341   x  471597cad322 (1) A0
   342        rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
   342        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   343   
       
   344 With the all option, it should show the three changesets
       
   345   $ hg obslog --all 337fec4d2edc
       
   346   o  337fec4d2edc (2) A0
       
   347   |
       
   348   | @  f257fde29c7a (3) A0
       
   349   |/
       
   350   x  471597cad322 (1) A0
       
   351        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
   343   
   352   
   344 Check that debugobshistory on the second successor after split show
   353 Check that debugobshistory on the second successor after split show
   345 the revision plus the splitted one
   354 the revision plus the splitted one
   346   $ hg olog f257fde29c7a
   355   $ hg obslog f257fde29c7a
   347   @  f257fde29c7a (3) A0
   356   @  f257fde29c7a (3) A0
   348   |
   357   |
   349   x  471597cad322 (1) A0
   358   x  471597cad322 (1) A0
   350        rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
   359        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   360   
       
   361 With the all option, it should show the three changesets
       
   362   $ hg obslog f257fde29c7a --all
       
   363   o  337fec4d2edc (2) A0
       
   364   |
       
   365   | @  f257fde29c7a (3) A0
       
   366   |/
       
   367   x  471597cad322 (1) A0
       
   368        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   369   
       
   370 Obslog with all option all should also works on the splitted commit
       
   371   $ hg obslog -a 471597cad322 --hidden
       
   372   o  337fec4d2edc (2) A0
       
   373   |
       
   374   | @  f257fde29c7a (3) A0
       
   375   |/
       
   376   x  471597cad322 (1) A0
       
   377        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
   351   
   378   
   352 Check that debugobshistory on both successors after split show
   379 Check that debugobshistory on both successors after split show
   353 a coherent graph
   380 a coherent graph
   354   $ hg olog 'f257fde29c7a+337fec4d2edc'
   381   $ hg obslog 'f257fde29c7a+337fec4d2edc'
   355   o  337fec4d2edc (2) A0
   382   o  337fec4d2edc (2) A0
   356   |
   383   |
   357   | @  f257fde29c7a (3) A0
   384   | @  f257fde29c7a (3) A0
   358   |/
   385   |/
   359   x  471597cad322 (1) A0
   386   x  471597cad322 (1) A0
   360        rewritten by test (*20*) as 337fec4d2edc, f257fde29c7a (glob)
   387        rewritten by test (*) as 337fec4d2edc, f257fde29c7a (glob)
   361   
   388   
   362   $ hg update 471597cad322
   389   $ hg update 471597cad322
   363   abort: hidden revision '471597cad322'!
   390   abort: hidden revision '471597cad322'!
   364   (use --hidden to access hidden revisions)
   391   (use --hidden to access hidden revisions)
   365   [255]
   392   [255]
   519      summary:     ROOT
   546      summary:     ROOT
   520   
   547   
   521 Actual test
   548 Actual test
   522 -----------
   549 -----------
   523 
   550 
   524   $ hg olog de7290d8b885 --hidden
   551   $ hg obslog de7290d8b885 --hidden
   525   x  de7290d8b885 (1) A0
   552   x  de7290d8b885 (1) A0
   526        rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   553        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   527   
   554   
   528   $ hg olog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
   555   $ hg obslog de7290d8b885 --hidden --all
       
   556   o  1ae8bc733a14 (4) A0
       
   557   |
       
   558   | o  337fec4d2edc (2) A0
       
   559   |/
       
   560   | @  c7f044602e9b (5) A0
       
   561   |/
       
   562   | o  f257fde29c7a (3) A0
       
   563   |/
       
   564   x  de7290d8b885 (1) A0
       
   565        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   566   
       
   567   $ hg obslog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
   529   [
   568   [
   530       {
   569       {
   531           "debugobshistory.markers": [
   570           "debugobshistory.markers": [
   532               {
   571               {
   533                   "debugobshistory.marker_date": [
   572                   "debugobshistory.marker_date": [
   547           "debugobshistory.node": "de7290d8b885",
   586           "debugobshistory.node": "de7290d8b885",
   548           "debugobshistory.rev": 1,
   587           "debugobshistory.rev": 1,
   549           "debugobshistory.shortdescription": "A0"
   588           "debugobshistory.shortdescription": "A0"
   550       }
   589       }
   551   ]
   590   ]
   552   $ hg olog c7f044602e9b
   591   $ hg obslog c7f044602e9b
   553   @  c7f044602e9b (5) A0
   592   @  c7f044602e9b (5) A0
   554   |
   593   |
   555   x  de7290d8b885 (1) A0
   594   x  de7290d8b885 (1) A0
   556        rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   595        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   557   
   596   
   558   $ hg olog c7f044602e9b --no-graph -Tjson | python -m json.tool
   597   $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool
   559   [
   598   [
   560       {
   599       {
   561           "debugobshistory.markers": [],
   600           "debugobshistory.markers": [],
   562           "debugobshistory.node": "c7f044602e9b",
   601           "debugobshistory.node": "c7f044602e9b",
   563           "debugobshistory.rev": 5,
   602           "debugobshistory.rev": 5,
   584           "debugobshistory.rev": 1,
   623           "debugobshistory.rev": 1,
   585           "debugobshistory.shortdescription": "A0"
   624           "debugobshistory.shortdescription": "A0"
   586       }
   625       }
   587   ]
   626   ]
   588 Check that debugobshistory on all heads show a coherent graph
   627 Check that debugobshistory on all heads show a coherent graph
   589   $ hg olog 2::5
   628   $ hg obslog 2::5
   590   o  1ae8bc733a14 (4) A0
   629   o  1ae8bc733a14 (4) A0
   591   |
   630   |
   592   | o  337fec4d2edc (2) A0
   631   | o  337fec4d2edc (2) A0
   593   |/
   632   |/
   594   | @  c7f044602e9b (5) A0
   633   | @  c7f044602e9b (5) A0
   595   |/
   634   |/
   596   | o  f257fde29c7a (3) A0
   635   | o  f257fde29c7a (3) A0
   597   |/
   636   |/
   598   x  de7290d8b885 (1) A0
   637   x  de7290d8b885 (1) A0
   599        rewritten by test (*20*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   638        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   639   
       
   640   $ hg obslog 5 --all
       
   641   o  1ae8bc733a14 (4) A0
       
   642   |
       
   643   | o  337fec4d2edc (2) A0
       
   644   |/
       
   645   | @  c7f044602e9b (5) A0
       
   646   |/
       
   647   | o  f257fde29c7a (3) A0
       
   648   |/
       
   649   x  de7290d8b885 (1) A0
       
   650        rewritten by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
   600   
   651   
   601   $ hg update de7290d8b885
   652   $ hg update de7290d8b885
   602   abort: hidden revision 'de7290d8b885'!
   653   abort: hidden revision 'de7290d8b885'!
   603   (use --hidden to access hidden revisions)
   654   (use --hidden to access hidden revisions)
   604   [255]
   655   [255]
   664  Actual test
   715  Actual test
   665  -----------
   716  -----------
   666 
   717 
   667 Check that debugobshistory on the first folded revision show only
   718 Check that debugobshistory on the first folded revision show only
   668 the revision with the target
   719 the revision with the target
   669   $ hg olog --hidden 471f378eab4c
   720   $ hg obslog --hidden 471f378eab4c
   670   x  471f378eab4c (1) A0
   721   x  471f378eab4c (1) A0
   671        rewritten by test (*20*) as eb5a0daa2192 (glob)
   722        rewritten by test (*) as eb5a0daa2192 (glob)
   672   
   723   
   673 Check that debugobshistory on the second folded revision show only
   724 Check that with all option, all changesets are shown
   674 the revision with the target
   725   $ hg obslog --hidden --all 471f378eab4c
   675   $ hg olog --hidden 0dec01379d3b
       
   676   x  0dec01379d3b (2) B0
       
   677        rewritten by test (*20*) as eb5a0daa2192 (glob)
       
   678   
       
   679 Check that debugobshistory on the successor revision show a coherent
       
   680 graph
       
   681   $ hg olog eb5a0daa2192
       
   682   @    eb5a0daa2192 (3) C0
   726   @    eb5a0daa2192 (3) C0
   683   |\
   727   |\
   684   x |  0dec01379d3b (2) B0
   728   x |  0dec01379d3b (2) B0
   685    /     rewritten by test (*20*) as eb5a0daa2192 (glob)
   729    /     rewritten by test (*) as eb5a0daa2192 (glob)
   686   |
   730   |
   687   x  471f378eab4c (1) A0
   731   x  471f378eab4c (1) A0
   688        rewritten by test (*20*) as eb5a0daa2192 (glob)
   732        rewritten by test (*) as eb5a0daa2192 (glob)
   689   
   733   
   690   $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   734 Check that debugobshistory on the second folded revision show only
       
   735 the revision with the target
       
   736   $ hg obslog --hidden 0dec01379d3b
       
   737   x  0dec01379d3b (2) B0
       
   738        rewritten by test (*) as eb5a0daa2192 (glob)
       
   739   
       
   740 Check that with all option, all changesets are shown
       
   741   $ hg obslog --hidden --all 0dec01379d3b
       
   742   @    eb5a0daa2192 (3) C0
       
   743   |\
       
   744   x |  0dec01379d3b (2) B0
       
   745    /     rewritten by test (*) as eb5a0daa2192 (glob)
       
   746   |
       
   747   x  471f378eab4c (1) A0
       
   748        rewritten by test (*) as eb5a0daa2192 (glob)
       
   749   
       
   750 Check that debugobshistory on the successor revision show a coherent
       
   751 graph
       
   752   $ hg obslog eb5a0daa2192
       
   753   @    eb5a0daa2192 (3) C0
       
   754   |\
       
   755   x |  0dec01379d3b (2) B0
       
   756    /     rewritten by test (*) as eb5a0daa2192 (glob)
       
   757   |
       
   758   x  471f378eab4c (1) A0
       
   759        rewritten by test (*) as eb5a0daa2192 (glob)
       
   760   
       
   761   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   691   [
   762   [
   692       {
   763       {
   693           "debugobshistory.markers": [],
   764           "debugobshistory.markers": [],
   694           "debugobshistory.node": "eb5a0daa2192",
   765           "debugobshistory.node": "eb5a0daa2192",
   695           "debugobshistory.rev": 3,
   766           "debugobshistory.rev": 3,
   812   
   883   
   813 Actual test
   884 Actual test
   814 -----------
   885 -----------
   815 
   886 
   816 Check that debugobshistory on the divergent revision show both destinations
   887 Check that debugobshistory on the divergent revision show both destinations
   817   $ hg olog --hidden 471f378eab4c
   888   $ hg obslog --hidden 471f378eab4c
   818   x  471f378eab4c (1) A0
   889   x  471f378eab4c (1) A0
   819        rewritten by test (*20*) as 65b757b745b9 (glob)
   890        rewritten by test (*) as 65b757b745b9 (glob)
   820        rewritten by test (*20*) as fdf9bde5129a (glob)
   891        rewritten by test (*) as fdf9bde5129a (glob)
   821   
   892   
   822   $ hg olog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
   893 
       
   894 Check that with all option, every changeset is shown
       
   895   $ hg obslog --hidden --all 471f378eab4c
       
   896   @  65b757b745b9 (3) A2
       
   897   |
       
   898   | o  fdf9bde5129a (2) A1
       
   899   |/
       
   900   x  471f378eab4c (1) A0
       
   901        rewritten by test (*) as 65b757b745b9 (glob)
       
   902        rewritten by test (*) as fdf9bde5129a (glob)
       
   903   
       
   904   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
   823   [
   905   [
   824       {
   906       {
   825           "debugobshistory.markers": [
   907           "debugobshistory.markers": [
   826               {
   908               {
   827                   "debugobshistory.marker_date": [
   909                   "debugobshistory.marker_date": [
   851           "debugobshistory.shortdescription": "A0"
   933           "debugobshistory.shortdescription": "A0"
   852       }
   934       }
   853   ]
   935   ]
   854 Check that debugobshistory on the first diverged revision show the revision
   936 Check that debugobshistory on the first diverged revision show the revision
   855 and the diverent one
   937 and the diverent one
   856   $ hg olog fdf9bde5129a
   938   $ hg obslog fdf9bde5129a
   857   o  fdf9bde5129a (2) A1
   939   o  fdf9bde5129a (2) A1
   858   |
   940   |
   859   x  471f378eab4c (1) A0
   941   x  471f378eab4c (1) A0
   860        rewritten by test (*20*) as 65b757b745b9 (glob)
   942        rewritten by test (*) as 65b757b745b9 (glob)
   861        rewritten by test (*20*) as fdf9bde5129a (glob)
   943        rewritten by test (*) as fdf9bde5129a (glob)
       
   944   
       
   945 
       
   946 Check that all option show all of them
       
   947   $ hg obslog fdf9bde5129a -a
       
   948   @  65b757b745b9 (3) A2
       
   949   |
       
   950   | o  fdf9bde5129a (2) A1
       
   951   |/
       
   952   x  471f378eab4c (1) A0
       
   953        rewritten by test (*) as 65b757b745b9 (glob)
       
   954        rewritten by test (*) as fdf9bde5129a (glob)
   862   
   955   
   863 Check that debugobshistory on the second diverged revision show the revision
   956 Check that debugobshistory on the second diverged revision show the revision
   864 and the diverent one
   957 and the diverent one
   865   $ hg olog 65b757b745b9
   958   $ hg obslog 65b757b745b9
   866   @  65b757b745b9 (3) A2
   959   @  65b757b745b9 (3) A2
   867   |
   960   |
   868   x  471f378eab4c (1) A0
   961   x  471f378eab4c (1) A0
   869        rewritten by test (*20*) as 65b757b745b9 (glob)
   962        rewritten by test (*) as 65b757b745b9 (glob)
   870        rewritten by test (*20*) as fdf9bde5129a (glob)
   963        rewritten by test (*) as fdf9bde5129a (glob)
       
   964   
       
   965 Check that all option show all of them
       
   966   $ hg obslog 65b757b745b9 -a
       
   967   @  65b757b745b9 (3) A2
       
   968   |
       
   969   | o  fdf9bde5129a (2) A1
       
   970   |/
       
   971   x  471f378eab4c (1) A0
       
   972        rewritten by test (*) as 65b757b745b9 (glob)
       
   973        rewritten by test (*) as fdf9bde5129a (glob)
   871   
   974   
   872 Check that debugobshistory on the both diverged revision show a coherent
   975 Check that debugobshistory on the both diverged revision show a coherent
   873 graph
   976 graph
   874   $ hg olog '65b757b745b9+fdf9bde5129a'
   977   $ hg obslog '65b757b745b9+fdf9bde5129a'
   875   @  65b757b745b9 (3) A2
   978   @  65b757b745b9 (3) A2
   876   |
   979   |
   877   | o  fdf9bde5129a (2) A1
   980   | o  fdf9bde5129a (2) A1
   878   |/
   981   |/
   879   x  471f378eab4c (1) A0
   982   x  471f378eab4c (1) A0
   880        rewritten by test (*20*) as 65b757b745b9 (glob)
   983        rewritten by test (*) as 65b757b745b9 (glob)
   881        rewritten by test (*20*) as fdf9bde5129a (glob)
   984        rewritten by test (*) as fdf9bde5129a (glob)
   882   
   985   
   883   $ hg olog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
   986   $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
   884   [
   987   [
   885       {
   988       {
   886           "debugobshistory.markers": [],
   989           "debugobshistory.markers": [],
   887           "debugobshistory.node": "65b757b745b9",
   990           "debugobshistory.node": "65b757b745b9",
   888           "debugobshistory.rev": 3,
   991           "debugobshistory.rev": 3,
  1002   
  1105   
  1003  Actual test
  1106  Actual test
  1004  -----------
  1107  -----------
  1005 
  1108 
  1006 Check that debugobshistory on head show a coherent graph
  1109 Check that debugobshistory on head show a coherent graph
  1007   $ hg olog eb5a0daa2192
  1110   $ hg obslog eb5a0daa2192
  1008   @    eb5a0daa2192 (4) C0
  1111   @    eb5a0daa2192 (4) C0
  1009   |\
  1112   |\
  1010   x |  471f378eab4c (1) A0
  1113   x |  471f378eab4c (1) A0
  1011    /     rewritten by test (*20*) as eb5a0daa2192 (glob)
  1114    /     rewritten by test (*) as eb5a0daa2192 (glob)
  1012   |
  1115   |
  1013   x  b7ea6d14e664 (3) B1
  1116   x  b7ea6d14e664 (3) B1
  1014   |    rewritten by test (*20*) as eb5a0daa2192 (glob)
  1117   |    rewritten by test (*) as eb5a0daa2192 (glob)
  1015   |
  1118   |
  1016   x  0dec01379d3b (2) B0
  1119   x  0dec01379d3b (2) B0
  1017        rewritten by test (*20*) as b7ea6d14e664 (glob)
  1120        rewritten by test (*) as b7ea6d14e664 (glob)
  1018   
  1121   
  1019   $ hg olog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
  1122 Check that obslog on ROOT with all option show everything
       
  1123   $ hg obslog 1 --hidden --all
       
  1124   @    eb5a0daa2192 (4) C0
       
  1125   |\
       
  1126   x |  471f378eab4c (1) A0
       
  1127    /     rewritten by test (*) as eb5a0daa2192 (glob)
       
  1128   |
       
  1129   x  b7ea6d14e664 (3) B1
       
  1130   |    rewritten by test (*) as eb5a0daa2192 (glob)
       
  1131   |
       
  1132   x  0dec01379d3b (2) B0
       
  1133        rewritten by test (*) as b7ea6d14e664 (glob)
       
  1134   
       
  1135   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
  1020   [
  1136   [
  1021       {
  1137       {
  1022           "debugobshistory.markers": [],
  1138           "debugobshistory.markers": [],
  1023           "debugobshistory.node": "eb5a0daa2192",
  1139           "debugobshistory.node": "eb5a0daa2192",
  1024           "debugobshistory.rev": 4,
  1140           "debugobshistory.rev": 4,
  1166      summary:     ROOT
  1282      summary:     ROOT
  1167   
  1283   
  1168  Actual test
  1284  Actual test
  1169  -----------
  1285  -----------
  1170 
  1286 
  1171   $ hg olog 7a230b46bf61
  1287   $ hg obslog 7a230b46bf61
  1172   @  7a230b46bf61 (3) A2
  1288   @  7a230b46bf61 (3) A2
  1173   |
  1289   |
  1174   x  fdf9bde5129a (2) A1
  1290   x  fdf9bde5129a (2) A1
  1175   |    rewritten by test (*20*) as 7a230b46bf61 (glob)
  1291   |    rewritten by test (*) as 7a230b46bf61 (glob)
  1176   |
  1292   |
  1177   x  471f378eab4c (1) A0
  1293   x  471f378eab4c (1) A0
  1178        rewritten by test (*20*) as fdf9bde5129a (glob)
  1294        rewritten by test (*) as fdf9bde5129a (glob)
  1179   
  1295   
  1180   $ cd $TESTTMP/local-remote-markers-2
  1296   $ cd $TESTTMP/local-remote-markers-2
  1181   $ hg pull
  1297   $ hg pull
  1182   pulling from $TESTTMP/local-remote-markers-1
  1298   pulling from $TESTTMP/local-remote-markers-1
  1183   searching for changes
  1299   searching for changes
  1189   (run 'hg heads' to see heads, 'hg merge' to merge)
  1305   (run 'hg heads' to see heads, 'hg merge' to merge)
  1190   working directory parent is obsolete! (471f378eab4c)
  1306   working directory parent is obsolete! (471f378eab4c)
  1191   (use 'hg evolve' to update to its successor: 7a230b46bf61)
  1307   (use 'hg evolve' to update to its successor: 7a230b46bf61)
  1192 Check that debugobshistory works with markers pointing to missing local
  1308 Check that debugobshistory works with markers pointing to missing local
  1193 changectx
  1309 changectx
  1194   $ hg olog 7a230b46bf61
  1310   $ hg obslog 7a230b46bf61
  1195   o  7a230b46bf61 (2) A2
  1311   o  7a230b46bf61 (2) A2
  1196   |
  1312   |
  1197   x  fdf9bde5129a
  1313   x  fdf9bde5129a
  1198   |    rewritten by test (*20*) as 7a230b46bf61 (glob)
  1314   |    rewritten by test (*) as 7a230b46bf61 (glob)
  1199   |
  1315   |
  1200   @  471f378eab4c (1) A0
  1316   @  471f378eab4c (1) A0
  1201        rewritten by test (*20*) as fdf9bde5129a (glob)
  1317        rewritten by test (*) as fdf9bde5129a (glob)
  1202   
  1318   
  1203   $ hg olog 7a230b46bf61 --color=debug
  1319   $ hg obslog 7a230b46bf61 --color=debug
  1204   o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
  1320   o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
  1205   |
  1321   |
  1206   x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
  1322   x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
  1207   |    [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*20*)] as [evolve.node|7a230b46bf61] (glob)
  1323   |    [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*)] as [evolve.node|7a230b46bf61] (glob)
  1208   |
  1324   |
  1209   @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
  1325   @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
  1210        [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*20*)] as [evolve.node|fdf9bde5129a] (glob)
  1326        [evolve.verb|rewritten] by [evolve.user|test] [evolve.date|(*)] as [evolve.node|fdf9bde5129a] (glob)
  1211   
  1327   
  1212 
       
  1213 Test with cycle
       
  1214 ===============
       
  1215 
       
  1216 Test setup
       
  1217 ----------
       
  1218 
       
  1219   $ hg init $TESTTMP/cycle
       
  1220   $ cd $TESTTMP/cycle
       
  1221   $ mkcommit ROOT
       
  1222   $ mkcommit A
       
  1223   $ mkcommit B
       
  1224   $ mkcommit C
       
  1225   $ hg log -G
       
  1226   @  changeset:   3:a8df460dbbfe
       
  1227   |  tag:         tip
       
  1228   |  user:        test
       
  1229   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1230   |  summary:     C
       
  1231   |
       
  1232   o  changeset:   2:c473644ee0e9
       
  1233   |  user:        test
       
  1234   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1235   |  summary:     B
       
  1236   |
       
  1237   o  changeset:   1:2a34000d3544
       
  1238   |  user:        test
       
  1239   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1240   |  summary:     A
       
  1241   |
       
  1242   o  changeset:   0:ea207398892e
       
  1243      user:        test
       
  1244      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1245      summary:     ROOT
       
  1246   
       
  1247 Create a cycle
       
  1248   $ hg prune -s "desc(B)" "desc(A)"
       
  1249   1 changesets pruned
       
  1250   2 new unstable changesets
       
  1251   $ hg prune -s "desc(C)" "desc(B)"
       
  1252   1 changesets pruned
       
  1253   $ hg prune -s "desc(A)" "desc(C)"
       
  1254   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
  1255   working directory now at 2a34000d3544
       
  1256   1 changesets pruned
       
  1257   $ hg log --hidden -G
       
  1258   x  changeset:   3:a8df460dbbfe
       
  1259   |  tag:         tip
       
  1260   |  user:        test
       
  1261   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1262   |  summary:     C
       
  1263   |
       
  1264   x  changeset:   2:c473644ee0e9
       
  1265   |  user:        test
       
  1266   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1267   |  summary:     B
       
  1268   |
       
  1269   @  changeset:   1:2a34000d3544
       
  1270   |  user:        test
       
  1271   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1272   |  summary:     A
       
  1273   |
       
  1274   o  changeset:   0:ea207398892e
       
  1275      user:        test
       
  1276      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1277      summary:     ROOT
       
  1278   
       
  1279 Actual test
       
  1280 -----------
       
  1281 
       
  1282 Check that debugobshistory never crash on a cycle
       
  1283 
       
  1284   $ hg olog "desc(A)" --hidden
       
  1285   @  2a34000d3544 (1) A
       
  1286   |    rewritten by test (*20*) as c473644ee0e9 (glob)
       
  1287   |
       
  1288   x  a8df460dbbfe (3) C
       
  1289   |    rewritten by test (*20*) as 2a34000d3544 (glob)
       
  1290   |
       
  1291   x  c473644ee0e9 (2) B
       
  1292   |    rewritten by test (*20*) as a8df460dbbfe (glob)
       
  1293   |
       
  1294 
       
  1295   $ hg olog "desc(B)" --hidden
       
  1296   @  2a34000d3544 (1) A
       
  1297   |    rewritten by test (*20*) as c473644ee0e9 (glob)
       
  1298   |
       
  1299   x  a8df460dbbfe (3) C
       
  1300   |    rewritten by test (*20*) as 2a34000d3544 (glob)
       
  1301   |
       
  1302   x  c473644ee0e9 (2) B
       
  1303   |    rewritten by test (*20*) as a8df460dbbfe (glob)
       
  1304   |
       
  1305 
       
  1306   $ hg olog "desc(C)" --hidden
       
  1307   @  2a34000d3544 (1) A
       
  1308   |    rewritten by test (*20*) as c473644ee0e9 (glob)
       
  1309   |
       
  1310   x  a8df460dbbfe (3) C
       
  1311   |    rewritten by test (*20*) as 2a34000d3544 (glob)
       
  1312   |
       
  1313   x  c473644ee0e9 (2) B
       
  1314   |    rewritten by test (*20*) as a8df460dbbfe (glob)
       
  1315   |
       
  1316 
       
  1317 Test with multiple cyles
       
  1318 ========================
       
  1319 
       
  1320 Test setup
       
  1321 ----------
       
  1322 
       
  1323   $ hg init $TESTTMP/multiple-cycle
       
  1324   $ cd $TESTTMP/multiple-cycle
       
  1325   $ mkcommit ROOT
       
  1326   $ mkcommit A
       
  1327   $ mkcommit B
       
  1328   $ mkcommit C
       
  1329   $ mkcommit D
       
  1330   $ mkcommit E
       
  1331   $ mkcommit F
       
  1332   $ hg log -G
       
  1333   @  changeset:   6:d9f908fde1a1
       
  1334   |  tag:         tip
       
  1335   |  user:        test
       
  1336   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1337   |  summary:     F
       
  1338   |
       
  1339   o  changeset:   5:0da815c333f6
       
  1340   |  user:        test
       
  1341   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1342   |  summary:     E
       
  1343   |
       
  1344   o  changeset:   4:868d2e0eb19c
       
  1345   |  user:        test
       
  1346   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1347   |  summary:     D
       
  1348   |
       
  1349   o  changeset:   3:a8df460dbbfe
       
  1350   |  user:        test
       
  1351   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1352   |  summary:     C
       
  1353   |
       
  1354   o  changeset:   2:c473644ee0e9
       
  1355   |  user:        test
       
  1356   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1357   |  summary:     B
       
  1358   |
       
  1359   o  changeset:   1:2a34000d3544
       
  1360   |  user:        test
       
  1361   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1362   |  summary:     A
       
  1363   |
       
  1364   o  changeset:   0:ea207398892e
       
  1365      user:        test
       
  1366      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1367      summary:     ROOT
       
  1368   
       
  1369 Create a first cycle
       
  1370   $ hg prune -s "desc(B)" "desc(A)"
       
  1371   1 changesets pruned
       
  1372   5 new unstable changesets
       
  1373   $ hg prune -s "desc(C)" "desc(B)"
       
  1374   1 changesets pruned
       
  1375   $ hg prune --split -s "desc(A)" -s "desc(D)" "desc(C)"
       
  1376   1 changesets pruned
       
  1377 And create a second one
       
  1378   $ hg prune -s "desc(E)" "desc(D)"
       
  1379   1 changesets pruned
       
  1380   $ hg prune -s "desc(F)" "desc(E)"
       
  1381   1 changesets pruned
       
  1382   $ hg prune -s "desc(D)" "desc(F)"
       
  1383   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
  1384   working directory now at 868d2e0eb19c
       
  1385   1 changesets pruned
       
  1386   $ hg log --hidden -G
       
  1387   x  changeset:   6:d9f908fde1a1
       
  1388   |  tag:         tip
       
  1389   |  user:        test
       
  1390   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1391   |  summary:     F
       
  1392   |
       
  1393   x  changeset:   5:0da815c333f6
       
  1394   |  user:        test
       
  1395   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1396   |  summary:     E
       
  1397   |
       
  1398   @  changeset:   4:868d2e0eb19c
       
  1399   |  user:        test
       
  1400   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1401   |  summary:     D
       
  1402   |
       
  1403   x  changeset:   3:a8df460dbbfe
       
  1404   |  user:        test
       
  1405   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1406   |  summary:     C
       
  1407   |
       
  1408   x  changeset:   2:c473644ee0e9
       
  1409   |  user:        test
       
  1410   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1411   |  summary:     B
       
  1412   |
       
  1413   x  changeset:   1:2a34000d3544
       
  1414   |  user:        test
       
  1415   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1416   |  summary:     A
       
  1417   |
       
  1418   o  changeset:   0:ea207398892e
       
  1419      user:        test
       
  1420      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1421      summary:     ROOT
       
  1422   
       
  1423 Actual test
       
  1424 -----------
       
  1425 
       
  1426 Check that debugobshistory never crash on a cycle
       
  1427 
       
  1428   $ hg olog "desc(D)" --hidden
       
  1429   x  0da815c333f6 (5) E
       
  1430   |    rewritten by test (*20*) as d9f908fde1a1 (glob)
       
  1431   |
       
  1432   @    868d2e0eb19c (4) D
       
  1433   |\     rewritten by test (*20*) as 0da815c333f6 (glob)
       
  1434   | |
       
  1435   | x  d9f908fde1a1 (6) F
       
  1436   | |    rewritten by test (*20*) as 868d2e0eb19c (glob)
       
  1437   | |
       
  1438   +---x  2a34000d3544 (1) A
       
  1439   | |      rewritten by test (*20*) as c473644ee0e9 (glob)
       
  1440   | |
       
  1441   x |  a8df460dbbfe (3) C
       
  1442   | |    rewritten by test (*20*) as 2a34000d3544, 868d2e0eb19c (glob)
       
  1443   | |
       
  1444   x |  c473644ee0e9 (2) B
       
  1445   | |    rewritten by test (*20*) as a8df460dbbfe (glob)
       
  1446   | |
       
  1447 
       
  1448 Check the json output is valid in this case
       
  1449 
       
  1450   $ hg olog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
       
  1451   [
       
  1452       {
       
  1453           "debugobshistory.markers": [
       
  1454               {
       
  1455                   "debugobshistory.marker_date": [
       
  1456                       *, (glob)
       
  1457                       0
       
  1458                   ],
       
  1459                   "debugobshistory.marker_user": "test",
       
  1460                   "debugobshistory.succnodes": [
       
  1461                       "0da815c333f6"
       
  1462                   ],
       
  1463                   "debugobshistory.verb": "rewritten"
       
  1464               }
       
  1465           ],
       
  1466           "debugobshistory.node": "868d2e0eb19c",
       
  1467           "debugobshistory.rev": 4,
       
  1468           "debugobshistory.shortdescription": "D"
       
  1469       },
       
  1470       {
       
  1471           "debugobshistory.markers": [
       
  1472               {
       
  1473                   "debugobshistory.marker_date": [
       
  1474                       *, (glob)
       
  1475                       0
       
  1476                   ],
       
  1477                   "debugobshistory.marker_user": "test",
       
  1478                   "debugobshistory.succnodes": [
       
  1479                       "868d2e0eb19c"
       
  1480                   ],
       
  1481                   "debugobshistory.verb": "rewritten"
       
  1482               }
       
  1483           ],
       
  1484           "debugobshistory.node": "d9f908fde1a1",
       
  1485           "debugobshistory.rev": 6,
       
  1486           "debugobshistory.shortdescription": "F"
       
  1487       },
       
  1488       {
       
  1489           "debugobshistory.markers": [
       
  1490               {
       
  1491                   "debugobshistory.marker_date": [
       
  1492                       *, (glob)
       
  1493                       0
       
  1494                   ],
       
  1495                   "debugobshistory.marker_user": "test",
       
  1496                   "debugobshistory.succnodes": [
       
  1497                       "d9f908fde1a1"
       
  1498                   ],
       
  1499                   "debugobshistory.verb": "rewritten"
       
  1500               }
       
  1501           ],
       
  1502           "debugobshistory.node": "0da815c333f6",
       
  1503           "debugobshistory.rev": 5,
       
  1504           "debugobshistory.shortdescription": "E"
       
  1505       },
       
  1506       {
       
  1507           "debugobshistory.markers": [
       
  1508               {
       
  1509                   "debugobshistory.marker_date": [
       
  1510                       *, (glob)
       
  1511                       0
       
  1512                   ],
       
  1513                   "debugobshistory.marker_user": "test",
       
  1514                   "debugobshistory.succnodes": [
       
  1515                       "2a34000d3544",
       
  1516                       "868d2e0eb19c"
       
  1517                   ],
       
  1518                   "debugobshistory.verb": "rewritten"
       
  1519               }
       
  1520           ],
       
  1521           "debugobshistory.node": "a8df460dbbfe",
       
  1522           "debugobshistory.rev": 3,
       
  1523           "debugobshistory.shortdescription": "C"
       
  1524       },
       
  1525       {
       
  1526           "debugobshistory.markers": [
       
  1527               {
       
  1528                   "debugobshistory.marker_date": [
       
  1529                       *, (glob)
       
  1530                       0
       
  1531                   ],
       
  1532                   "debugobshistory.marker_user": "test",
       
  1533                   "debugobshistory.succnodes": [
       
  1534                       "a8df460dbbfe"
       
  1535                   ],
       
  1536                   "debugobshistory.verb": "rewritten"
       
  1537               }
       
  1538           ],
       
  1539           "debugobshistory.node": "c473644ee0e9",
       
  1540           "debugobshistory.rev": 2,
       
  1541           "debugobshistory.shortdescription": "B"
       
  1542       },
       
  1543       {
       
  1544           "debugobshistory.markers": [
       
  1545               {
       
  1546                   "debugobshistory.marker_date": [
       
  1547                       *, (glob)
       
  1548                       0
       
  1549                   ],
       
  1550                   "debugobshistory.marker_user": "test",
       
  1551                   "debugobshistory.succnodes": [
       
  1552                       "c473644ee0e9"
       
  1553                   ],
       
  1554                   "debugobshistory.verb": "rewritten"
       
  1555               }
       
  1556           ],
       
  1557           "debugobshistory.node": "2a34000d3544",
       
  1558           "debugobshistory.rev": 1,
       
  1559           "debugobshistory.shortdescription": "A"
       
  1560       }
       
  1561   ]