tests/test-evolve-obshistory.t
branchmercurial-3.9
changeset 2702 167567795f6c
parent 2701 26ec0839865b
parent 2617 da0d3d4171cb
child 2703 8f199a2b87e9
child 2801 49494d0155b7
equal deleted inserted replaced
2701:26ec0839865b 2702:167567795f6c
     1 This test file test the various messages when accessing obsolete
       
     2 revisions.
       
     3 
       
     4 Global setup
       
     5 ============
       
     6 
       
     7   $ . $TESTDIR/testlib/common.sh
       
     8   $ cat >> $HGRCPATH <<EOF
       
     9   > [ui]
       
    10   > interactive = true
       
    11   > [phases]
       
    12   > publish=False
       
    13   > [extensions]
       
    14   > evolve =
       
    15   > color =
       
    16   > [experimental]
       
    17   > evolution.effect-flags = yes
       
    18   > EOF
       
    19 
       
    20 Test output on amended commit
       
    21 =============================
       
    22 
       
    23 Test setup
       
    24 ----------
       
    25 
       
    26   $ hg init $TESTTMP/local-amend
       
    27   $ cd $TESTTMP/local-amend
       
    28   $ mkcommit ROOT
       
    29   $ mkcommit A0
       
    30   $ echo 42 >> A0
       
    31   $ hg amend -m "A1
       
    32   > 
       
    33   > Better commit message"
       
    34   $ hg log --hidden -G
       
    35   @  changeset:   3:4ae3a4151de9
       
    36   |  tag:         tip
       
    37   |  parent:      0:ea207398892e
       
    38   |  user:        test
       
    39   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
    40   |  summary:     A1
       
    41   |
       
    42   | x  changeset:   2:f137d23bb3e1
       
    43   | |  user:        test
       
    44   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
    45   | |  summary:     temporary amend commit for 471f378eab4c
       
    46   | |
       
    47   | x  changeset:   1:471f378eab4c
       
    48   |/   user:        test
       
    49   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
    50   |    summary:     A0
       
    51   |
       
    52   o  changeset:   0:ea207398892e
       
    53      user:        test
       
    54      date:        Thu Jan 01 00:00:00 1970 +0000
       
    55      summary:     ROOT
       
    56   
       
    57 Actual test
       
    58 -----------
       
    59   $ hg obslog --patch 4ae3a4151de9
       
    60   @  4ae3a4151de9 (3) A1
       
    61   |
       
    62   x  471f378eab4c (1) A0
       
    63        rewritten(description, content) by test (*) as 4ae3a4151de9 (glob)
       
    64          --- a/471f378eab4c-changeset-description
       
    65          +++ b/4ae3a4151de9-changeset-description
       
    66          @@ -1,1 +1,3 @@
       
    67          -A0
       
    68          +A1
       
    69          +
       
    70          +Better commit message
       
    71   
       
    72          diff -r 471f378eab4c -r 4ae3a4151de9 A0
       
    73          --- a/A0	Thu Jan 01 00:00:00 1970 +0000
       
    74          +++ b/A0	Thu Jan 01 00:00:00 1970 +0000
       
    75          @@ -1,1 +1,2 @@
       
    76           A0
       
    77          +42
       
    78   
       
    79   
       
    80   $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
       
    81   [
       
    82       {
       
    83           "debugobshistory.markers": [],
       
    84           "debugobshistory.node": "4ae3a4151de9",
       
    85           "debugobshistory.rev": 3,
       
    86           "debugobshistory.shortdescription": "A1"
       
    87       },
       
    88       {
       
    89           "debugobshistory.markers": [
       
    90               {
       
    91                   "debugobshistory.effect": [
       
    92                       "description",
       
    93                       "content"
       
    94                   ],
       
    95                   "debugobshistory.marker_date": [
       
    96                       *, (glob)
       
    97                       0 (glob)
       
    98                   ],
       
    99                   "debugobshistory.marker_user": "test",
       
   100                   "debugobshistory.succnodes": [
       
   101                       "4ae3a4151de9"
       
   102                   ],
       
   103                   "debugobshistory.verb": "rewritten"
       
   104               }
       
   105           ],
       
   106           "debugobshistory.node": "471f378eab4c",
       
   107           "debugobshistory.rev": 1,
       
   108           "debugobshistory.shortdescription": "A0"
       
   109       }
       
   110   ]
       
   111   $ hg obslog --hidden --patch 471f378eab4c
       
   112   x  471f378eab4c (1) A0
       
   113        rewritten(description, content) by test (*) as 4ae3a4151de9 (glob)
       
   114          --- a/471f378eab4c-changeset-description
       
   115          +++ b/4ae3a4151de9-changeset-description
       
   116          @@ -1,1 +1,3 @@
       
   117          -A0
       
   118          +A1
       
   119          +
       
   120          +Better commit message
       
   121   
       
   122          diff -r 471f378eab4c -r 4ae3a4151de9 A0
       
   123          --- a/A0	Thu Jan 01 00:00:00 1970 +0000
       
   124          +++ b/A0	Thu Jan 01 00:00:00 1970 +0000
       
   125          @@ -1,1 +1,2 @@
       
   126           A0
       
   127          +42
       
   128   
       
   129   
       
   130   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
       
   131   [
       
   132       {
       
   133           "debugobshistory.markers": [
       
   134               {
       
   135                   "debugobshistory.effect": [
       
   136                       *, (glob)
       
   137                       "content"
       
   138                   ],
       
   139                   "debugobshistory.marker_date": [
       
   140                       *, (glob)
       
   141                       0 (glob)
       
   142                   ],
       
   143                   "debugobshistory.marker_user": "test",
       
   144                   "debugobshistory.succnodes": [
       
   145                       "4ae3a4151de9"
       
   146                   ],
       
   147                   "debugobshistory.verb": "rewritten"
       
   148               }
       
   149           ],
       
   150           "debugobshistory.node": "471f378eab4c",
       
   151           "debugobshistory.rev": 1,
       
   152           "debugobshistory.shortdescription": "A0"
       
   153       }
       
   154   ]
       
   155   $ hg update 471f378eab4c
       
   156   abort: hidden revision '471f378eab4c'!
       
   157   (use --hidden to access hidden revisions)
       
   158   [255]
       
   159   $ hg update --hidden "desc(A0)"
       
   160   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   161   working directory parent is obsolete! (471f378eab4c)
       
   162   (use 'hg evolve' to update to its successor: 4ae3a4151de9)
       
   163 
       
   164 Test output with pruned commit
       
   165 ==============================
       
   166 
       
   167 Test setup
       
   168 ----------
       
   169 
       
   170   $ hg init $TESTTMP/local-prune
       
   171   $ cd $TESTTMP/local-prune
       
   172   $ mkcommit ROOT
       
   173   $ mkcommit A0 # 0
       
   174   $ mkcommit B0 # 1
       
   175   $ hg log --hidden -G
       
   176   @  changeset:   2:0dec01379d3b
       
   177   |  tag:         tip
       
   178   |  user:        test
       
   179   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   180   |  summary:     B0
       
   181   |
       
   182   o  changeset:   1:471f378eab4c
       
   183   |  user:        test
       
   184   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   185   |  summary:     A0
       
   186   |
       
   187   o  changeset:   0:ea207398892e
       
   188      user:        test
       
   189      date:        Thu Jan 01 00:00:00 1970 +0000
       
   190      summary:     ROOT
       
   191   
       
   192   $ hg prune -r 'desc(B0)'
       
   193   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   194   working directory now at 471f378eab4c
       
   195   1 changesets pruned
       
   196   $ hg log --hidden -G
       
   197   x  changeset:   2:0dec01379d3b
       
   198   |  tag:         tip
       
   199   |  user:        test
       
   200   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   201   |  summary:     B0
       
   202   |
       
   203   @  changeset:   1:471f378eab4c
       
   204   |  user:        test
       
   205   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   206   |  summary:     A0
       
   207   |
       
   208   o  changeset:   0:ea207398892e
       
   209      user:        test
       
   210      date:        Thu Jan 01 00:00:00 1970 +0000
       
   211      summary:     ROOT
       
   212   
       
   213 
       
   214 Actual test
       
   215 -----------
       
   216 
       
   217   $ hg obslog 'desc(B0)' --hidden --patch
       
   218   x  0dec01379d3b (2) B0
       
   219        pruned by test (*) (glob)
       
   220          (No patch available yet, no successors)
       
   221   
       
   222   $ hg obslog 'desc(B0)' --hidden --no-graph -Tjson | python -m json.tool
       
   223   [
       
   224       {
       
   225           "debugobshistory.markers": [
       
   226               {
       
   227                   "debugobshistory.marker_date": [
       
   228                       *, (glob)
       
   229                       0 (glob)
       
   230                   ],
       
   231                   "debugobshistory.marker_user": "test",
       
   232                   "debugobshistory.verb": "pruned"
       
   233               }
       
   234           ],
       
   235           "debugobshistory.node": "0dec01379d3b",
       
   236           "debugobshistory.rev": 2,
       
   237           "debugobshistory.shortdescription": "B0"
       
   238       }
       
   239   ]
       
   240   $ hg obslog 'desc(A0)' --patch
       
   241   @  471f378eab4c (1) A0
       
   242   
       
   243   $ hg obslog 'desc(A0)' --no-graph -Tjson | python -m json.tool
       
   244   [
       
   245       {
       
   246           "debugobshistory.markers": [],
       
   247           "debugobshistory.node": "471f378eab4c",
       
   248           "debugobshistory.rev": 1,
       
   249           "debugobshistory.shortdescription": "A0"
       
   250       }
       
   251   ]
       
   252   $ hg up 1
       
   253   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   254   $ hg up 0dec01379d3b
       
   255   abort: hidden revision '0dec01379d3b'!
       
   256   (use --hidden to access hidden revisions)
       
   257   [255]
       
   258   $ hg up --hidden -r 'desc(B0)'
       
   259   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   260   working directory parent is obsolete! (0dec01379d3b)
       
   261   (use 'hg evolve' to update to its parent successor)
       
   262 
       
   263 Test output with splitted commit
       
   264 ================================
       
   265 
       
   266 Test setup
       
   267 ----------
       
   268 
       
   269   $ hg init $TESTTMP/local-split
       
   270   $ cd $TESTTMP/local-split
       
   271   $ mkcommit ROOT
       
   272   $ echo 42 >> a
       
   273   $ echo 43 >> b
       
   274   $ hg commit -A -m "A0"
       
   275   adding a
       
   276   adding b
       
   277   $ hg log --hidden -G
       
   278   @  changeset:   1:471597cad322
       
   279   |  tag:         tip
       
   280   |  user:        test
       
   281   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   282   |  summary:     A0
       
   283   |
       
   284   o  changeset:   0:ea207398892e
       
   285      user:        test
       
   286      date:        Thu Jan 01 00:00:00 1970 +0000
       
   287      summary:     ROOT
       
   288   
       
   289   $ hg split -r 'desc(A0)' -d "0 0" << EOF
       
   290   > y
       
   291   > y
       
   292   > n
       
   293   > n
       
   294   > y
       
   295   > y
       
   296   > EOF
       
   297   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
       
   298   adding a
       
   299   adding b
       
   300   diff --git a/a b/a
       
   301   new file mode 100644
       
   302   examine changes to 'a'? [Ynesfdaq?] y
       
   303   
       
   304   @@ -0,0 +1,1 @@
       
   305   +42
       
   306   record change 1/2 to 'a'? [Ynesfdaq?] y
       
   307   
       
   308   diff --git a/b b/b
       
   309   new file mode 100644
       
   310   examine changes to 'b'? [Ynesfdaq?] n
       
   311   
       
   312   created new head
       
   313   Done splitting? [yN] n
       
   314   diff --git a/b b/b
       
   315   new file mode 100644
       
   316   examine changes to 'b'? [Ynesfdaq?] y
       
   317   
       
   318   @@ -0,0 +1,1 @@
       
   319   +43
       
   320   record this change to 'b'? [Ynesfdaq?] y
       
   321   
       
   322   no more change to split
       
   323 
       
   324   $ hg log --hidden -G
       
   325   @  changeset:   3:f257fde29c7a
       
   326   |  tag:         tip
       
   327   |  user:        test
       
   328   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   329   |  summary:     A0
       
   330   |
       
   331   o  changeset:   2:337fec4d2edc
       
   332   |  parent:      0:ea207398892e
       
   333   |  user:        test
       
   334   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   335   |  summary:     A0
       
   336   |
       
   337   | x  changeset:   1:471597cad322
       
   338   |/   user:        test
       
   339   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   340   |    summary:     A0
       
   341   |
       
   342   o  changeset:   0:ea207398892e
       
   343      user:        test
       
   344      date:        Thu Jan 01 00:00:00 1970 +0000
       
   345      summary:     ROOT
       
   346   
       
   347 Actual test
       
   348 -----------
       
   349 
       
   350 Check that debugobshistory on splitted commit show both targets
       
   351   $ hg obslog 471597cad322 --hidden --patch
       
   352   x  471597cad322 (1) A0
       
   353        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   354          (No patch available yet, too many successors (2))
       
   355   
       
   356   $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
       
   357   [
       
   358       {
       
   359           "debugobshistory.markers": [
       
   360               {
       
   361                   "debugobshistory.effect": [
       
   362                       "parent",
       
   363                       "content"
       
   364                   ],
       
   365                   "debugobshistory.marker_date": [
       
   366                       *, (glob)
       
   367                       0 (glob)
       
   368                   ],
       
   369                   "debugobshistory.marker_user": "test",
       
   370                   "debugobshistory.succnodes": [
       
   371                       "337fec4d2edc",
       
   372                       "f257fde29c7a"
       
   373                   ],
       
   374                   "debugobshistory.verb": "rewritten"
       
   375               }
       
   376           ],
       
   377           "debugobshistory.node": "471597cad322",
       
   378           "debugobshistory.rev": 1,
       
   379           "debugobshistory.shortdescription": "A0"
       
   380       }
       
   381   ]
       
   382 Check that debugobshistory on the first successor after split show
       
   383 the revision plus the splitted one
       
   384   $ hg obslog 337fec4d2edc --patch
       
   385   o  337fec4d2edc (2) A0
       
   386   |
       
   387   x  471597cad322 (1) A0
       
   388        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   389          (No patch available yet, too many successors (2))
       
   390   
       
   391 With the all option, it should show the three changesets
       
   392   $ hg obslog --all 337fec4d2edc --patch
       
   393   o  337fec4d2edc (2) A0
       
   394   |
       
   395   | @  f257fde29c7a (3) A0
       
   396   |/
       
   397   x  471597cad322 (1) A0
       
   398        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   399          (No patch available yet, too many successors (2))
       
   400   
       
   401 Check that debugobshistory on the second successor after split show
       
   402 the revision plus the splitted one
       
   403   $ hg obslog f257fde29c7a --patch
       
   404   @  f257fde29c7a (3) A0
       
   405   |
       
   406   x  471597cad322 (1) A0
       
   407        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   408          (No patch available yet, too many successors (2))
       
   409   
       
   410 With the all option, it should show the three changesets
       
   411   $ hg obslog f257fde29c7a --all --patch
       
   412   o  337fec4d2edc (2) A0
       
   413   |
       
   414   | @  f257fde29c7a (3) A0
       
   415   |/
       
   416   x  471597cad322 (1) A0
       
   417        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   418          (No patch available yet, too many successors (2))
       
   419   
       
   420 Obslog with all option all should also works on the splitted commit
       
   421   $ hg obslog -a 471597cad322 --hidden --patch
       
   422   o  337fec4d2edc (2) A0
       
   423   |
       
   424   | @  f257fde29c7a (3) A0
       
   425   |/
       
   426   x  471597cad322 (1) A0
       
   427        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   428          (No patch available yet, too many successors (2))
       
   429   
       
   430 Check that debugobshistory on both successors after split show
       
   431 a coherent graph
       
   432   $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
       
   433   o  337fec4d2edc (2) A0
       
   434   |
       
   435   | @  f257fde29c7a (3) A0
       
   436   |/
       
   437   x  471597cad322 (1) A0
       
   438        rewritten(parent, content) by test (*) as 337fec4d2edc, f257fde29c7a (glob)
       
   439          (No patch available yet, too many successors (2))
       
   440   
       
   441   $ hg update 471597cad322
       
   442   abort: hidden revision '471597cad322'!
       
   443   (use --hidden to access hidden revisions)
       
   444   [255]
       
   445   $ hg update --hidden 'min(desc(A0))'
       
   446   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   447   working directory parent is obsolete! (471597cad322)
       
   448   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
       
   449 
       
   450 Test output with lots of splitted commit
       
   451 ========================================
       
   452 
       
   453 Test setup
       
   454 ----------
       
   455 
       
   456   $ hg init $TESTTMP/local-lots-split
       
   457   $ cd $TESTTMP/local-lots-split
       
   458   $ mkcommit ROOT
       
   459   $ echo 42 >> a
       
   460   $ echo 43 >> b
       
   461   $ echo 44 >> c
       
   462   $ echo 45 >> d
       
   463   $ hg commit -A -m "A0"
       
   464   adding a
       
   465   adding b
       
   466   adding c
       
   467   adding d
       
   468   $ hg log --hidden -G
       
   469   @  changeset:   1:de7290d8b885
       
   470   |  tag:         tip
       
   471   |  user:        test
       
   472   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   473   |  summary:     A0
       
   474   |
       
   475   o  changeset:   0:ea207398892e
       
   476      user:        test
       
   477      date:        Thu Jan 01 00:00:00 1970 +0000
       
   478      summary:     ROOT
       
   479   
       
   480 
       
   481   $ hg split -r 'desc(A0)' -d "0 0" << EOF
       
   482   > y
       
   483   > y
       
   484   > n
       
   485   > n
       
   486   > n
       
   487   > n
       
   488   > y
       
   489   > y
       
   490   > n
       
   491   > n
       
   492   > n
       
   493   > y
       
   494   > y
       
   495   > n
       
   496   > n
       
   497   > y
       
   498   > y
       
   499   > EOF
       
   500   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
       
   501   adding a
       
   502   adding b
       
   503   adding c
       
   504   adding d
       
   505   diff --git a/a b/a
       
   506   new file mode 100644
       
   507   examine changes to 'a'? [Ynesfdaq?] y
       
   508   
       
   509   @@ -0,0 +1,1 @@
       
   510   +42
       
   511   record change 1/4 to 'a'? [Ynesfdaq?] y
       
   512   
       
   513   diff --git a/b b/b
       
   514   new file mode 100644
       
   515   examine changes to 'b'? [Ynesfdaq?] n
       
   516   
       
   517   diff --git a/c b/c
       
   518   new file mode 100644
       
   519   examine changes to 'c'? [Ynesfdaq?] n
       
   520   
       
   521   diff --git a/d b/d
       
   522   new file mode 100644
       
   523   examine changes to 'd'? [Ynesfdaq?] n
       
   524   
       
   525   created new head
       
   526   Done splitting? [yN] n
       
   527   diff --git a/b b/b
       
   528   new file mode 100644
       
   529   examine changes to 'b'? [Ynesfdaq?] y
       
   530   
       
   531   @@ -0,0 +1,1 @@
       
   532   +43
       
   533   record change 1/3 to 'b'? [Ynesfdaq?] y
       
   534   
       
   535   diff --git a/c b/c
       
   536   new file mode 100644
       
   537   examine changes to 'c'? [Ynesfdaq?] n
       
   538   
       
   539   diff --git a/d b/d
       
   540   new file mode 100644
       
   541   examine changes to 'd'? [Ynesfdaq?] n
       
   542   
       
   543   Done splitting? [yN] n
       
   544   diff --git a/c b/c
       
   545   new file mode 100644
       
   546   examine changes to 'c'? [Ynesfdaq?] y
       
   547   
       
   548   @@ -0,0 +1,1 @@
       
   549   +44
       
   550   record change 1/2 to 'c'? [Ynesfdaq?] y
       
   551   
       
   552   diff --git a/d b/d
       
   553   new file mode 100644
       
   554   examine changes to 'd'? [Ynesfdaq?] n
       
   555   
       
   556   Done splitting? [yN] n
       
   557   diff --git a/d b/d
       
   558   new file mode 100644
       
   559   examine changes to 'd'? [Ynesfdaq?] y
       
   560   
       
   561   @@ -0,0 +1,1 @@
       
   562   +45
       
   563   record this change to 'd'? [Ynesfdaq?] y
       
   564   
       
   565   no more change to split
       
   566 
       
   567   $ hg log --hidden -G
       
   568   @  changeset:   5:c7f044602e9b
       
   569   |  tag:         tip
       
   570   |  user:        test
       
   571   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   572   |  summary:     A0
       
   573   |
       
   574   o  changeset:   4:1ae8bc733a14
       
   575   |  user:        test
       
   576   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   577   |  summary:     A0
       
   578   |
       
   579   o  changeset:   3:f257fde29c7a
       
   580   |  user:        test
       
   581   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   582   |  summary:     A0
       
   583   |
       
   584   o  changeset:   2:337fec4d2edc
       
   585   |  parent:      0:ea207398892e
       
   586   |  user:        test
       
   587   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   588   |  summary:     A0
       
   589   |
       
   590   | x  changeset:   1:de7290d8b885
       
   591   |/   user:        test
       
   592   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   593   |    summary:     A0
       
   594   |
       
   595   o  changeset:   0:ea207398892e
       
   596      user:        test
       
   597      date:        Thu Jan 01 00:00:00 1970 +0000
       
   598      summary:     ROOT
       
   599   
       
   600 Actual test
       
   601 -----------
       
   602 
       
   603   $ hg obslog de7290d8b885 --hidden --patch
       
   604   x  de7290d8b885 (1) A0
       
   605        rewritten(parent, content) by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   606          (No patch available yet, too many successors (4))
       
   607   
       
   608   $ hg obslog de7290d8b885 --hidden --all --patch
       
   609   o  1ae8bc733a14 (4) A0
       
   610   |
       
   611   | o  337fec4d2edc (2) A0
       
   612   |/
       
   613   | @  c7f044602e9b (5) A0
       
   614   |/
       
   615   | o  f257fde29c7a (3) A0
       
   616   |/
       
   617   x  de7290d8b885 (1) A0
       
   618        rewritten(parent, content) by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   619          (No patch available yet, too many successors (4))
       
   620   
       
   621   $ hg obslog de7290d8b885 --hidden --no-graph -Tjson | python -m json.tool
       
   622   [
       
   623       {
       
   624           "debugobshistory.markers": [
       
   625               {
       
   626                   "debugobshistory.effect": [
       
   627                       "parent",
       
   628                       "content"
       
   629                   ],
       
   630                   "debugobshistory.marker_date": [
       
   631                       *, (glob)
       
   632                       0 (glob)
       
   633                   ],
       
   634                   "debugobshistory.marker_user": "test",
       
   635                   "debugobshistory.succnodes": [
       
   636                       "1ae8bc733a14",
       
   637                       "337fec4d2edc",
       
   638                       "c7f044602e9b",
       
   639                       "f257fde29c7a"
       
   640                   ],
       
   641                   "debugobshistory.verb": "rewritten"
       
   642               }
       
   643           ],
       
   644           "debugobshistory.node": "de7290d8b885",
       
   645           "debugobshistory.rev": 1,
       
   646           "debugobshistory.shortdescription": "A0"
       
   647       }
       
   648   ]
       
   649   $ hg obslog c7f044602e9b --patch
       
   650   @  c7f044602e9b (5) A0
       
   651   |
       
   652   x  de7290d8b885 (1) A0
       
   653        rewritten(parent, content) by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   654          (No patch available yet, too many successors (4))
       
   655   
       
   656   $ hg obslog c7f044602e9b --no-graph -Tjson | python -m json.tool
       
   657   [
       
   658       {
       
   659           "debugobshistory.markers": [],
       
   660           "debugobshistory.node": "c7f044602e9b",
       
   661           "debugobshistory.rev": 5,
       
   662           "debugobshistory.shortdescription": "A0"
       
   663       },
       
   664       {
       
   665           "debugobshistory.markers": [
       
   666               {
       
   667                   "debugobshistory.effect": [
       
   668                       "parent",
       
   669                       "content"
       
   670                   ],
       
   671                   "debugobshistory.marker_date": [
       
   672                       *, (glob)
       
   673                       0 (glob)
       
   674                   ],
       
   675                   "debugobshistory.marker_user": "test",
       
   676                   "debugobshistory.succnodes": [
       
   677                       "1ae8bc733a14",
       
   678                       "337fec4d2edc",
       
   679                       "c7f044602e9b",
       
   680                       "f257fde29c7a"
       
   681                   ],
       
   682                   "debugobshistory.verb": "rewritten"
       
   683               }
       
   684           ],
       
   685           "debugobshistory.node": "de7290d8b885",
       
   686           "debugobshistory.rev": 1,
       
   687           "debugobshistory.shortdescription": "A0"
       
   688       }
       
   689   ]
       
   690 Check that debugobshistory on all heads show a coherent graph
       
   691   $ hg obslog 2::5 --patch
       
   692   o  1ae8bc733a14 (4) A0
       
   693   |
       
   694   | o  337fec4d2edc (2) A0
       
   695   |/
       
   696   | @  c7f044602e9b (5) A0
       
   697   |/
       
   698   | o  f257fde29c7a (3) A0
       
   699   |/
       
   700   x  de7290d8b885 (1) A0
       
   701        rewritten(parent, content) by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   702          (No patch available yet, too many successors (4))
       
   703   
       
   704   $ hg obslog 5 --all --patch
       
   705   o  1ae8bc733a14 (4) A0
       
   706   |
       
   707   | o  337fec4d2edc (2) A0
       
   708   |/
       
   709   | @  c7f044602e9b (5) A0
       
   710   |/
       
   711   | o  f257fde29c7a (3) A0
       
   712   |/
       
   713   x  de7290d8b885 (1) A0
       
   714        rewritten(parent, content) by test (*) as 1ae8bc733a14, 337fec4d2edc, c7f044602e9b, f257fde29c7a (glob)
       
   715          (No patch available yet, too many successors (4))
       
   716   
       
   717   $ hg update de7290d8b885
       
   718   abort: hidden revision 'de7290d8b885'!
       
   719   (use --hidden to access hidden revisions)
       
   720   [255]
       
   721   $ hg update --hidden 'min(desc(A0))'
       
   722   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   723   working directory parent is obsolete! (de7290d8b885)
       
   724   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more)
       
   725 
       
   726 Test output with folded commit
       
   727 ==============================
       
   728 
       
   729 Test setup
       
   730 ----------
       
   731 
       
   732   $ hg init $TESTTMP/local-fold
       
   733   $ cd $TESTTMP/local-fold
       
   734   $ mkcommit ROOT
       
   735   $ mkcommit A0
       
   736   $ mkcommit B0
       
   737   $ hg log --hidden -G
       
   738   @  changeset:   2:0dec01379d3b
       
   739   |  tag:         tip
       
   740   |  user:        test
       
   741   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   742   |  summary:     B0
       
   743   |
       
   744   o  changeset:   1:471f378eab4c
       
   745   |  user:        test
       
   746   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   747   |  summary:     A0
       
   748   |
       
   749   o  changeset:   0:ea207398892e
       
   750      user:        test
       
   751      date:        Thu Jan 01 00:00:00 1970 +0000
       
   752      summary:     ROOT
       
   753   
       
   754   $ hg fold --exact -r 'desc(A0) + desc(B0)' --date "0 0" -m "C0"
       
   755   2 changesets folded
       
   756   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   757   $ hg log --hidden -G
       
   758   @  changeset:   3:eb5a0daa2192
       
   759   |  tag:         tip
       
   760   |  parent:      0:ea207398892e
       
   761   |  user:        test
       
   762   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   763   |  summary:     C0
       
   764   |
       
   765   | x  changeset:   2:0dec01379d3b
       
   766   | |  user:        test
       
   767   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   768   | |  summary:     B0
       
   769   | |
       
   770   | x  changeset:   1:471f378eab4c
       
   771   |/   user:        test
       
   772   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   773   |    summary:     A0
       
   774   |
       
   775   o  changeset:   0:ea207398892e
       
   776      user:        test
       
   777      date:        Thu Jan 01 00:00:00 1970 +0000
       
   778      summary:     ROOT
       
   779   
       
   780  Actual test
       
   781  -----------
       
   782 
       
   783 Check that debugobshistory on the first folded revision show only
       
   784 the revision with the target
       
   785   $ hg obslog --hidden 471f378eab4c --patch
       
   786   x  471f378eab4c (1) A0
       
   787        rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
   788          --- a/471f378eab4c-changeset-description
       
   789          +++ b/eb5a0daa2192-changeset-description
       
   790          @@ -1,1 +1,1 @@
       
   791          -A0
       
   792          +C0
       
   793   
       
   794          diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   795          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   796          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   797          @@ -0,0 +1,1 @@
       
   798          +B0
       
   799   
       
   800   
       
   801 Check that with all option, all changesets are shown
       
   802   $ hg obslog --hidden --all 471f378eab4c --patch
       
   803   @    eb5a0daa2192 (3) C0
       
   804   |\
       
   805   x |  0dec01379d3b (2) B0
       
   806    /     rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
   807   |        (No patch available yet, changesets rebased)
       
   808   |
       
   809   x  471f378eab4c (1) A0
       
   810        rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
   811          --- a/471f378eab4c-changeset-description
       
   812          +++ b/eb5a0daa2192-changeset-description
       
   813          @@ -1,1 +1,1 @@
       
   814          -A0
       
   815          +C0
       
   816   
       
   817          diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   818          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   819          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   820          @@ -0,0 +1,1 @@
       
   821          +B0
       
   822   
       
   823   
       
   824 Check that debugobshistory on the second folded revision show only
       
   825 the revision with the target
       
   826   $ hg obslog --hidden 0dec01379d3b --patch
       
   827   x  0dec01379d3b (2) B0
       
   828        rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
   829          (No patch available yet, changesets rebased)
       
   830   
       
   831 Check that with all option, all changesets are shown
       
   832   $ hg obslog --hidden --all 0dec01379d3b --patch
       
   833   @    eb5a0daa2192 (3) C0
       
   834   |\
       
   835   x |  0dec01379d3b (2) B0
       
   836    /     rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
   837   |        (No patch available yet, changesets rebased)
       
   838   |
       
   839   x  471f378eab4c (1) A0
       
   840        rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
   841          --- a/471f378eab4c-changeset-description
       
   842          +++ b/eb5a0daa2192-changeset-description
       
   843          @@ -1,1 +1,1 @@
       
   844          -A0
       
   845          +C0
       
   846   
       
   847          diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   848          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   849          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   850          @@ -0,0 +1,1 @@
       
   851          +B0
       
   852   
       
   853   
       
   854 Check that debugobshistory on the successor revision show a coherent
       
   855 graph
       
   856   $ hg obslog eb5a0daa2192 --patch
       
   857   @    eb5a0daa2192 (3) C0
       
   858   |\
       
   859   x |  0dec01379d3b (2) B0
       
   860    /     rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
   861   |        (No patch available yet, changesets rebased)
       
   862   |
       
   863   x  471f378eab4c (1) A0
       
   864        rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
   865          --- a/471f378eab4c-changeset-description
       
   866          +++ b/eb5a0daa2192-changeset-description
       
   867          @@ -1,1 +1,1 @@
       
   868          -A0
       
   869          +C0
       
   870   
       
   871          diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   872          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   873          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   874          @@ -0,0 +1,1 @@
       
   875          +B0
       
   876   
       
   877   
       
   878   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
       
   879   [
       
   880       {
       
   881           "debugobshistory.markers": [],
       
   882           "debugobshistory.node": "eb5a0daa2192",
       
   883           "debugobshistory.rev": 3,
       
   884           "debugobshistory.shortdescription": "C0"
       
   885       },
       
   886       {
       
   887           "debugobshistory.markers": [
       
   888               {
       
   889                   "debugobshistory.effect": [
       
   890                       "description",
       
   891                       "content"
       
   892                   ],
       
   893                   "debugobshistory.marker_date": [
       
   894                       *, (glob)
       
   895                       0 (glob)
       
   896                   ],
       
   897                   "debugobshistory.marker_user": "test",
       
   898                   "debugobshistory.succnodes": [
       
   899                       "eb5a0daa2192"
       
   900                   ],
       
   901                   "debugobshistory.verb": "rewritten"
       
   902               }
       
   903           ],
       
   904           "debugobshistory.node": "471f378eab4c",
       
   905           "debugobshistory.rev": 1,
       
   906           "debugobshistory.shortdescription": "A0"
       
   907       },
       
   908       {
       
   909           "debugobshistory.markers": [
       
   910               {
       
   911                   "debugobshistory.effect": [
       
   912                       "description",
       
   913                       "parent",
       
   914                       "content"
       
   915                   ],
       
   916                   "debugobshistory.marker_date": [
       
   917                       *, (glob)
       
   918                       0 (glob)
       
   919                   ],
       
   920                   "debugobshistory.marker_user": "test",
       
   921                   "debugobshistory.succnodes": [
       
   922                       "eb5a0daa2192"
       
   923                   ],
       
   924                   "debugobshistory.verb": "rewritten"
       
   925               }
       
   926           ],
       
   927           "debugobshistory.node": "0dec01379d3b",
       
   928           "debugobshistory.rev": 2,
       
   929           "debugobshistory.shortdescription": "B0"
       
   930       }
       
   931   ]
       
   932   $ hg update 471f378eab4c
       
   933   abort: hidden revision '471f378eab4c'!
       
   934   (use --hidden to access hidden revisions)
       
   935   [255]
       
   936   $ hg update --hidden 'desc(A0)'
       
   937   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
   938   working directory parent is obsolete! (471f378eab4c)
       
   939   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
   940   $ hg update 0dec01379d3b
       
   941   working directory parent is obsolete! (471f378eab4c)
       
   942   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
   943   abort: hidden revision '0dec01379d3b'!
       
   944   (use --hidden to access hidden revisions)
       
   945   [255]
       
   946   $ hg update --hidden 'desc(B0)'
       
   947   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   948   working directory parent is obsolete! (0dec01379d3b)
       
   949   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
   950 
       
   951 Test output with divergence
       
   952 ===========================
       
   953 
       
   954 Test setup
       
   955 ----------
       
   956 
       
   957   $ hg init $TESTTMP/local-divergence
       
   958   $ cd $TESTTMP/local-divergence
       
   959   $ mkcommit ROOT
       
   960   $ mkcommit A0
       
   961   $ hg amend -m "A1"
       
   962   $ hg log --hidden -G
       
   963   @  changeset:   2:fdf9bde5129a
       
   964   |  tag:         tip
       
   965   |  parent:      0:ea207398892e
       
   966   |  user:        test
       
   967   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   968   |  summary:     A1
       
   969   |
       
   970   | x  changeset:   1:471f378eab4c
       
   971   |/   user:        test
       
   972   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   973   |    summary:     A0
       
   974   |
       
   975   o  changeset:   0:ea207398892e
       
   976      user:        test
       
   977      date:        Thu Jan 01 00:00:00 1970 +0000
       
   978      summary:     ROOT
       
   979   
       
   980   $ hg update --hidden 'desc(A0)'
       
   981   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   982   working directory parent is obsolete! (471f378eab4c)
       
   983   (use 'hg evolve' to update to its successor: fdf9bde5129a)
       
   984   $ hg amend -m "A2"
       
   985   2 new divergent changesets
       
   986   $ hg log --hidden -G
       
   987   @  changeset:   3:65b757b745b9
       
   988   |  tag:         tip
       
   989   |  parent:      0:ea207398892e
       
   990   |  user:        test
       
   991   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   992   |  summary:     A2
       
   993   |
       
   994   | o  changeset:   2:fdf9bde5129a
       
   995   |/   parent:      0:ea207398892e
       
   996   |    user:        test
       
   997   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   998   |    summary:     A1
       
   999   |
       
  1000   | x  changeset:   1:471f378eab4c
       
  1001   |/   user:        test
       
  1002   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1003   |    summary:     A0
       
  1004   |
       
  1005   o  changeset:   0:ea207398892e
       
  1006      user:        test
       
  1007      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1008      summary:     ROOT
       
  1009   
       
  1010 Actual test
       
  1011 -----------
       
  1012 
       
  1013 Check that debugobshistory on the divergent revision show both destinations
       
  1014   $ hg obslog --hidden 471f378eab4c --patch
       
  1015   x  471f378eab4c (1) A0
       
  1016        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1017          --- a/471f378eab4c-changeset-description
       
  1018          +++ b/65b757b745b9-changeset-description
       
  1019          @@ -1,1 +1,1 @@
       
  1020          -A0
       
  1021          +A2
       
  1022   
       
  1023        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1024          --- a/471f378eab4c-changeset-description
       
  1025          +++ b/fdf9bde5129a-changeset-description
       
  1026          @@ -1,1 +1,1 @@
       
  1027          -A0
       
  1028          +A1
       
  1029   
       
  1030   
       
  1031 
       
  1032 Check that with all option, every changeset is shown
       
  1033   $ hg obslog --hidden --all 471f378eab4c --patch
       
  1034   @  65b757b745b9 (3) A2
       
  1035   |
       
  1036   | o  fdf9bde5129a (2) A1
       
  1037   |/
       
  1038   x  471f378eab4c (1) A0
       
  1039        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1040          --- a/471f378eab4c-changeset-description
       
  1041          +++ b/65b757b745b9-changeset-description
       
  1042          @@ -1,1 +1,1 @@
       
  1043          -A0
       
  1044          +A2
       
  1045   
       
  1046        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1047          --- a/471f378eab4c-changeset-description
       
  1048          +++ b/fdf9bde5129a-changeset-description
       
  1049          @@ -1,1 +1,1 @@
       
  1050          -A0
       
  1051          +A1
       
  1052   
       
  1053   
       
  1054   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
       
  1055   [
       
  1056       {
       
  1057           "debugobshistory.markers": [
       
  1058               {
       
  1059                   "debugobshistory.effect": [
       
  1060                       "description"
       
  1061                   ],
       
  1062                   "debugobshistory.marker_date": [
       
  1063                       *, (glob)
       
  1064                       0 (glob)
       
  1065                   ],
       
  1066                   "debugobshistory.marker_user": "test",
       
  1067                   "debugobshistory.succnodes": [
       
  1068                       "65b757b745b9"
       
  1069                   ],
       
  1070                   "debugobshistory.verb": "rewritten"
       
  1071               },
       
  1072               {
       
  1073                   "debugobshistory.effect": [
       
  1074                       "description"
       
  1075                   ],
       
  1076                   "debugobshistory.marker_date": [
       
  1077                       *, (glob)
       
  1078                       0 (glob)
       
  1079                   ],
       
  1080                   "debugobshistory.marker_user": "test",
       
  1081                   "debugobshistory.succnodes": [
       
  1082                       "fdf9bde5129a"
       
  1083                   ],
       
  1084                   "debugobshistory.verb": "rewritten"
       
  1085               }
       
  1086           ],
       
  1087           "debugobshistory.node": "471f378eab4c",
       
  1088           "debugobshistory.rev": 1,
       
  1089           "debugobshistory.shortdescription": "A0"
       
  1090       }
       
  1091   ]
       
  1092 Check that debugobshistory on the first diverged revision show the revision
       
  1093 and the diverent one
       
  1094   $ hg obslog fdf9bde5129a --patch
       
  1095   o  fdf9bde5129a (2) A1
       
  1096   |
       
  1097   x  471f378eab4c (1) A0
       
  1098        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1099          --- a/471f378eab4c-changeset-description
       
  1100          +++ b/65b757b745b9-changeset-description
       
  1101          @@ -1,1 +1,1 @@
       
  1102          -A0
       
  1103          +A2
       
  1104   
       
  1105        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1106          --- a/471f378eab4c-changeset-description
       
  1107          +++ b/fdf9bde5129a-changeset-description
       
  1108          @@ -1,1 +1,1 @@
       
  1109          -A0
       
  1110          +A1
       
  1111   
       
  1112   
       
  1113 
       
  1114 Check that all option show all of them
       
  1115   $ hg obslog fdf9bde5129a -a --patch
       
  1116   @  65b757b745b9 (3) A2
       
  1117   |
       
  1118   | o  fdf9bde5129a (2) A1
       
  1119   |/
       
  1120   x  471f378eab4c (1) A0
       
  1121        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1122          --- a/471f378eab4c-changeset-description
       
  1123          +++ b/65b757b745b9-changeset-description
       
  1124          @@ -1,1 +1,1 @@
       
  1125          -A0
       
  1126          +A2
       
  1127   
       
  1128        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1129          --- a/471f378eab4c-changeset-description
       
  1130          +++ b/fdf9bde5129a-changeset-description
       
  1131          @@ -1,1 +1,1 @@
       
  1132          -A0
       
  1133          +A1
       
  1134   
       
  1135   
       
  1136 Check that debugobshistory on the second diverged revision show the revision
       
  1137 and the diverent one
       
  1138   $ hg obslog 65b757b745b9 --patch
       
  1139   @  65b757b745b9 (3) A2
       
  1140   |
       
  1141   x  471f378eab4c (1) A0
       
  1142        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1143          --- a/471f378eab4c-changeset-description
       
  1144          +++ b/65b757b745b9-changeset-description
       
  1145          @@ -1,1 +1,1 @@
       
  1146          -A0
       
  1147          +A2
       
  1148   
       
  1149        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1150          --- a/471f378eab4c-changeset-description
       
  1151          +++ b/fdf9bde5129a-changeset-description
       
  1152          @@ -1,1 +1,1 @@
       
  1153          -A0
       
  1154          +A1
       
  1155   
       
  1156   
       
  1157 Check that all option show all of them
       
  1158   $ hg obslog 65b757b745b9 -a --patch
       
  1159   @  65b757b745b9 (3) A2
       
  1160   |
       
  1161   | o  fdf9bde5129a (2) A1
       
  1162   |/
       
  1163   x  471f378eab4c (1) A0
       
  1164        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1165          --- a/471f378eab4c-changeset-description
       
  1166          +++ b/65b757b745b9-changeset-description
       
  1167          @@ -1,1 +1,1 @@
       
  1168          -A0
       
  1169          +A2
       
  1170   
       
  1171        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1172          --- a/471f378eab4c-changeset-description
       
  1173          +++ b/fdf9bde5129a-changeset-description
       
  1174          @@ -1,1 +1,1 @@
       
  1175          -A0
       
  1176          +A1
       
  1177   
       
  1178   
       
  1179 Check that debugobshistory on the both diverged revision show a coherent
       
  1180 graph
       
  1181   $ hg obslog '65b757b745b9+fdf9bde5129a' --patch
       
  1182   @  65b757b745b9 (3) A2
       
  1183   |
       
  1184   | o  fdf9bde5129a (2) A1
       
  1185   |/
       
  1186   x  471f378eab4c (1) A0
       
  1187        rewritten(description) by test (*) as 65b757b745b9 (glob)
       
  1188          --- a/471f378eab4c-changeset-description
       
  1189          +++ b/65b757b745b9-changeset-description
       
  1190          @@ -1,1 +1,1 @@
       
  1191          -A0
       
  1192          +A2
       
  1193   
       
  1194        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1195          --- a/471f378eab4c-changeset-description
       
  1196          +++ b/fdf9bde5129a-changeset-description
       
  1197          @@ -1,1 +1,1 @@
       
  1198          -A0
       
  1199          +A1
       
  1200   
       
  1201   
       
  1202   $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
       
  1203   [
       
  1204       {
       
  1205           "debugobshistory.markers": [],
       
  1206           "debugobshistory.node": "65b757b745b9",
       
  1207           "debugobshistory.rev": 3,
       
  1208           "debugobshistory.shortdescription": "A2"
       
  1209       },
       
  1210       {
       
  1211           "debugobshistory.markers": [
       
  1212               {
       
  1213                   "debugobshistory.effect": [
       
  1214                       "description"
       
  1215                   ],
       
  1216                   "debugobshistory.marker_date": [
       
  1217                       *, (glob)
       
  1218                       0 (glob)
       
  1219                   ],
       
  1220                   "debugobshistory.marker_user": "test",
       
  1221                   "debugobshistory.succnodes": [
       
  1222                       "65b757b745b9"
       
  1223                   ],
       
  1224                   "debugobshistory.verb": "rewritten"
       
  1225               },
       
  1226               {
       
  1227                   "debugobshistory.effect": [
       
  1228                       "description"
       
  1229                   ],
       
  1230                   "debugobshistory.marker_date": [
       
  1231                       *, (glob)
       
  1232                       0 (glob)
       
  1233                   ],
       
  1234                   "debugobshistory.marker_user": "test",
       
  1235                   "debugobshistory.succnodes": [
       
  1236                       "fdf9bde5129a"
       
  1237                   ],
       
  1238                   "debugobshistory.verb": "rewritten"
       
  1239               }
       
  1240           ],
       
  1241           "debugobshistory.node": "471f378eab4c",
       
  1242           "debugobshistory.rev": 1,
       
  1243           "debugobshistory.shortdescription": "A0"
       
  1244       },
       
  1245       {
       
  1246           "debugobshistory.markers": [],
       
  1247           "debugobshistory.node": "fdf9bde5129a",
       
  1248           "debugobshistory.rev": 2,
       
  1249           "debugobshistory.shortdescription": "A1"
       
  1250       }
       
  1251   ]
       
  1252   $ hg update 471f378eab4c
       
  1253   abort: hidden revision '471f378eab4c'!
       
  1254   (use --hidden to access hidden revisions)
       
  1255   [255]
       
  1256   $ hg update --hidden 'desc(A0)'
       
  1257   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1258   working directory parent is obsolete! (471f378eab4c)
       
  1259   (471f378eab4c has diverged, use 'hg evolve --list --divergent' to resolve the issue)
       
  1260 
       
  1261 Test output with amended + folded commit
       
  1262 ========================================
       
  1263 
       
  1264 Test setup
       
  1265 ----------
       
  1266 
       
  1267   $ hg init $TESTTMP/local-amend-fold
       
  1268   $ cd $TESTTMP/local-amend-fold
       
  1269   $ mkcommit ROOT
       
  1270   $ mkcommit A0
       
  1271   $ mkcommit B0
       
  1272   $ hg amend -m "B1"
       
  1273   $ hg log --hidden -G
       
  1274   @  changeset:   3:b7ea6d14e664
       
  1275   |  tag:         tip
       
  1276   |  parent:      1:471f378eab4c
       
  1277   |  user:        test
       
  1278   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1279   |  summary:     B1
       
  1280   |
       
  1281   | x  changeset:   2:0dec01379d3b
       
  1282   |/   user:        test
       
  1283   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1284   |    summary:     B0
       
  1285   |
       
  1286   o  changeset:   1:471f378eab4c
       
  1287   |  user:        test
       
  1288   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1289   |  summary:     A0
       
  1290   |
       
  1291   o  changeset:   0:ea207398892e
       
  1292      user:        test
       
  1293      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1294      summary:     ROOT
       
  1295   
       
  1296   $ hg fold --exact -r 'desc(A0) + desc(B1)' --date "0 0" -m "C0"
       
  1297   2 changesets folded
       
  1298   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1299   $ hg log --hidden -G
       
  1300   @  changeset:   4:eb5a0daa2192
       
  1301   |  tag:         tip
       
  1302   |  parent:      0:ea207398892e
       
  1303   |  user:        test
       
  1304   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1305   |  summary:     C0
       
  1306   |
       
  1307   | x  changeset:   3:b7ea6d14e664
       
  1308   | |  parent:      1:471f378eab4c
       
  1309   | |  user:        test
       
  1310   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1311   | |  summary:     B1
       
  1312   | |
       
  1313   | | x  changeset:   2:0dec01379d3b
       
  1314   | |/   user:        test
       
  1315   | |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1316   | |    summary:     B0
       
  1317   | |
       
  1318   | x  changeset:   1:471f378eab4c
       
  1319   |/   user:        test
       
  1320   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1321   |    summary:     A0
       
  1322   |
       
  1323   o  changeset:   0:ea207398892e
       
  1324      user:        test
       
  1325      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1326      summary:     ROOT
       
  1327   
       
  1328  Actual test
       
  1329  -----------
       
  1330 
       
  1331 Check that debugobshistory on head show a coherent graph
       
  1332   $ hg obslog eb5a0daa2192 --patch
       
  1333   @    eb5a0daa2192 (4) C0
       
  1334   |\
       
  1335   x |  471f378eab4c (1) A0
       
  1336    /     rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
  1337   |        --- a/471f378eab4c-changeset-description
       
  1338   |        +++ b/eb5a0daa2192-changeset-description
       
  1339   |        @@ -1,1 +1,1 @@
       
  1340   |        -A0
       
  1341   |        +C0
       
  1342   |
       
  1343   |        diff -r 471f378eab4c -r eb5a0daa2192 B0
       
  1344   |        --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1345   |        +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
  1346   |        @@ -0,0 +1,1 @@
       
  1347   |        +B0
       
  1348   |
       
  1349   |
       
  1350   x  b7ea6d14e664 (3) B1
       
  1351   |    rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
  1352   |      (No patch available yet, changesets rebased)
       
  1353   |
       
  1354   x  0dec01379d3b (2) B0
       
  1355        rewritten(description) by test (*) as b7ea6d14e664 (glob)
       
  1356          --- a/0dec01379d3b-changeset-description
       
  1357          +++ b/b7ea6d14e664-changeset-description
       
  1358          @@ -1,1 +1,1 @@
       
  1359          -B0
       
  1360          +B1
       
  1361   
       
  1362   
       
  1363 Check that obslog on ROOT with all option show everything
       
  1364   $ hg obslog 1 --hidden --all --patch
       
  1365   @    eb5a0daa2192 (4) C0
       
  1366   |\
       
  1367   x |  471f378eab4c (1) A0
       
  1368    /     rewritten(description, content) by test (*) as eb5a0daa2192 (glob)
       
  1369   |        --- a/471f378eab4c-changeset-description
       
  1370   |        +++ b/eb5a0daa2192-changeset-description
       
  1371   |        @@ -1,1 +1,1 @@
       
  1372   |        -A0
       
  1373   |        +C0
       
  1374   |
       
  1375   |        diff -r 471f378eab4c -r eb5a0daa2192 B0
       
  1376   |        --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
  1377   |        +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
  1378   |        @@ -0,0 +1,1 @@
       
  1379   |        +B0
       
  1380   |
       
  1381   |
       
  1382   x  b7ea6d14e664 (3) B1
       
  1383   |    rewritten(description, parent, content) by test (*) as eb5a0daa2192 (glob)
       
  1384   |      (No patch available yet, changesets rebased)
       
  1385   |
       
  1386   x  0dec01379d3b (2) B0
       
  1387        rewritten(description) by test (*) as b7ea6d14e664 (glob)
       
  1388          --- a/0dec01379d3b-changeset-description
       
  1389          +++ b/b7ea6d14e664-changeset-description
       
  1390          @@ -1,1 +1,1 @@
       
  1391          -B0
       
  1392          +B1
       
  1393   
       
  1394   
       
  1395   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
       
  1396   [
       
  1397       {
       
  1398           "debugobshistory.markers": [],
       
  1399           "debugobshistory.node": "eb5a0daa2192",
       
  1400           "debugobshistory.rev": 4,
       
  1401           "debugobshistory.shortdescription": "C0"
       
  1402       },
       
  1403       {
       
  1404           "debugobshistory.markers": [
       
  1405               {
       
  1406                   "debugobshistory.effect": [
       
  1407                       *, (glob)
       
  1408                       *, (glob)
       
  1409                       "content"
       
  1410                   ],
       
  1411                   "debugobshistory.marker_date": [
       
  1412                       *, (glob)
       
  1413                       0 (glob)
       
  1414                   ],
       
  1415                   "debugobshistory.marker_user": "test",
       
  1416                   "debugobshistory.succnodes": [
       
  1417                       "eb5a0daa2192"
       
  1418                   ],
       
  1419                   "debugobshistory.verb": "rewritten"
       
  1420               }
       
  1421           ],
       
  1422           "debugobshistory.node": "b7ea6d14e664",
       
  1423           "debugobshistory.rev": 3,
       
  1424           "debugobshistory.shortdescription": "B1"
       
  1425       },
       
  1426       {
       
  1427           "debugobshistory.markers": [
       
  1428               {
       
  1429                   "debugobshistory.effect": [
       
  1430                       "description"
       
  1431                   ],
       
  1432                   "debugobshistory.marker_date": [
       
  1433                       *, (glob)
       
  1434                       0 (glob)
       
  1435                   ],
       
  1436                   "debugobshistory.marker_user": "test",
       
  1437                   "debugobshistory.succnodes": [
       
  1438                       "b7ea6d14e664"
       
  1439                   ],
       
  1440                   "debugobshistory.verb": "rewritten"
       
  1441               }
       
  1442           ],
       
  1443           "debugobshistory.node": "0dec01379d3b",
       
  1444           "debugobshistory.rev": 2,
       
  1445           "debugobshistory.shortdescription": "B0"
       
  1446       },
       
  1447       {
       
  1448           "debugobshistory.markers": [
       
  1449               {
       
  1450                   "debugobshistory.effect": [
       
  1451                       "description",
       
  1452                       "content"
       
  1453                   ],
       
  1454                   "debugobshistory.marker_date": [
       
  1455                       *, (glob)
       
  1456                       0 (glob)
       
  1457                   ],
       
  1458                   "debugobshistory.marker_user": "test",
       
  1459                   "debugobshistory.succnodes": [
       
  1460                       "eb5a0daa2192"
       
  1461                   ],
       
  1462                   "debugobshistory.verb": "rewritten"
       
  1463               }
       
  1464           ],
       
  1465           "debugobshistory.node": "471f378eab4c",
       
  1466           "debugobshistory.rev": 1,
       
  1467           "debugobshistory.shortdescription": "A0"
       
  1468       }
       
  1469   ]
       
  1470   $ hg update 471f378eab4c
       
  1471   abort: hidden revision '471f378eab4c'!
       
  1472   (use --hidden to access hidden revisions)
       
  1473   [255]
       
  1474   $ hg update --hidden 'desc(A0)'
       
  1475   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
       
  1476   working directory parent is obsolete! (471f378eab4c)
       
  1477   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
  1478   $ hg update --hidden 0dec01379d3b
       
  1479   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1480   working directory parent is obsolete! (0dec01379d3b)
       
  1481   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
  1482   $ hg update 0dec01379d3b
       
  1483   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1484   working directory parent is obsolete! (0dec01379d3b)
       
  1485   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
  1486   $ hg update --hidden 'desc(B0)'
       
  1487   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1488   working directory parent is obsolete! (0dec01379d3b)
       
  1489   (use 'hg evolve' to update to its successor: eb5a0daa2192)
       
  1490 
       
  1491 Test output with pushed and pulled obs markers
       
  1492 ==============================================
       
  1493 
       
  1494 Test setup
       
  1495 ----------
       
  1496 
       
  1497   $ hg init $TESTTMP/local-remote-markers-1
       
  1498   $ cd $TESTTMP/local-remote-markers-1
       
  1499   $ mkcommit ROOT
       
  1500   $ mkcommit A0
       
  1501   $ hg log --hidden -G
       
  1502   @  changeset:   1:471f378eab4c
       
  1503   |  tag:         tip
       
  1504   |  user:        test
       
  1505   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1506   |  summary:     A0
       
  1507   |
       
  1508   o  changeset:   0:ea207398892e
       
  1509      user:        test
       
  1510      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1511      summary:     ROOT
       
  1512   
       
  1513   $ hg clone $TESTTMP/local-remote-markers-1 $TESTTMP/local-remote-markers-2
       
  1514   updating to branch default
       
  1515   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1516   $ cd $TESTTMP/local-remote-markers-2
       
  1517   $ hg log --hidden -G
       
  1518   @  changeset:   1:471f378eab4c
       
  1519   |  tag:         tip
       
  1520   |  user:        test
       
  1521   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1522   |  summary:     A0
       
  1523   |
       
  1524   o  changeset:   0:ea207398892e
       
  1525      user:        test
       
  1526      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1527      summary:     ROOT
       
  1528   
       
  1529   $ cd $TESTTMP/local-remote-markers-1
       
  1530   $ hg amend -m "A1"
       
  1531   $ hg amend -m "A2"
       
  1532   $ hg log --hidden -G
       
  1533   @  changeset:   3:7a230b46bf61
       
  1534   |  tag:         tip
       
  1535   |  parent:      0:ea207398892e
       
  1536   |  user:        test
       
  1537   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
  1538   |  summary:     A2
       
  1539   |
       
  1540   | x  changeset:   2:fdf9bde5129a
       
  1541   |/   parent:      0:ea207398892e
       
  1542   |    user:        test
       
  1543   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1544   |    summary:     A1
       
  1545   |
       
  1546   | x  changeset:   1:471f378eab4c
       
  1547   |/   user:        test
       
  1548   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
  1549   |    summary:     A0
       
  1550   |
       
  1551   o  changeset:   0:ea207398892e
       
  1552      user:        test
       
  1553      date:        Thu Jan 01 00:00:00 1970 +0000
       
  1554      summary:     ROOT
       
  1555   
       
  1556  Actual test
       
  1557  -----------
       
  1558 
       
  1559   $ hg obslog 7a230b46bf61 --patch
       
  1560   @  7a230b46bf61 (3) A2
       
  1561   |
       
  1562   x  fdf9bde5129a (2) A1
       
  1563   |    rewritten(description) by test (*) as 7a230b46bf61 (glob)
       
  1564   |      --- a/fdf9bde5129a-changeset-description
       
  1565   |      +++ b/7a230b46bf61-changeset-description
       
  1566   |      @@ -1,1 +1,1 @@
       
  1567   |      -A1
       
  1568   |      +A2
       
  1569   |
       
  1570   |
       
  1571   x  471f378eab4c (1) A0
       
  1572        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1573          --- a/471f378eab4c-changeset-description
       
  1574          +++ b/fdf9bde5129a-changeset-description
       
  1575          @@ -1,1 +1,1 @@
       
  1576          -A0
       
  1577          +A1
       
  1578   
       
  1579   
       
  1580   $ cd $TESTTMP/local-remote-markers-2
       
  1581   $ hg pull
       
  1582   pulling from $TESTTMP/local-remote-markers-1
       
  1583   searching for changes
       
  1584   adding changesets
       
  1585   adding manifests
       
  1586   adding file changes
       
  1587   added 1 changesets with 0 changes to 1 files (+1 heads)
       
  1588   2 new obsolescence markers
       
  1589   (run 'hg heads' to see heads, 'hg merge' to merge)
       
  1590   working directory parent is obsolete! (471f378eab4c)
       
  1591   (use 'hg evolve' to update to its successor: 7a230b46bf61)
       
  1592 Check that debugobshistory works with markers pointing to missing local
       
  1593 changectx
       
  1594   $ hg obslog 7a230b46bf61 --patch
       
  1595   o  7a230b46bf61 (2) A2
       
  1596   |
       
  1597   x  fdf9bde5129a
       
  1598   |    rewritten(description) by test (*) as 7a230b46bf61 (glob)
       
  1599   |      (No patch available yet, context is not local)
       
  1600   |
       
  1601   @  471f378eab4c (1) A0
       
  1602        rewritten(description) by test (*) as fdf9bde5129a (glob)
       
  1603          (No patch available yet, succ is unknown locally)
       
  1604   
       
  1605   $ hg obslog 7a230b46bf61 --color=debug --patch
       
  1606   o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
       
  1607   |
       
  1608   x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
       
  1609   |    [evolve.verb|rewritten](description) by [evolve.user|test] [evolve.date|(*)] as [evolve.node|7a230b46bf61] (glob)
       
  1610   |      (No patch available yet, context is not local)
       
  1611   |
       
  1612   @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
       
  1613        [evolve.verb|rewritten](description) by [evolve.user|test] [evolve.date|(*)] as [evolve.node|fdf9bde5129a] (glob)
       
  1614          (No patch available yet, succ is unknown locally)
       
  1615