tests/test-evolve-obshistory-amend-then-fold.t
branchmercurial-4.6
changeset 5368 844b1ad5b34b
parent 5284 0471b9ddd0b2
parent 5367 cb5983c0287f
equal deleted inserted replaced
5284:0471b9ddd0b2 5368:844b1ad5b34b
     1 This test file test the various messages when accessing obsolete
     1 Testing obslog and other commands accessing obsolete revisions.
     2 revisions.
       
     3 
     2 
     4 Global setup
     3 Global setup
     5 ============
     4 ============
     6 
     5 
     7   $ . $TESTDIR/testlib/obshistory_setup.sh
     6   $ . $TESTDIR/testlib/obshistory_setup.sh
    78      summary:     ROOT
    77      summary:     ROOT
    79   
    78   
    80 Actual test
    79 Actual test
    81 -----------
    80 -----------
    82 
    81 
    83 Check that debugobshistory on head show a coherent graph
    82 Check that obslog on head shows a coherent graph
    84   $ hg obslog eb5a0daa2192 --patch
    83   $ hg obslog eb5a0daa2192 --patch --no-origin
    85   @    eb5a0daa2192 (4) C0
    84   @    eb5a0daa2192 (4) C0
    86   |\
    85   |\
    87   x |  471f378eab4c (1) A0
    86   x |  471f378eab4c (1) A0
    88    /     rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    87    /     rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    89   |        diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
    88   |        diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   112          @@ -1,1 +1,1 @@
   111          @@ -1,1 +1,1 @@
   113          -B0
   112          -B0
   114          +B1
   113          +B1
   115   
   114   
   116   
   115   
   117 Check that obslog on ROOT with all option show everything
   116   $ hg obslog eb5a0daa2192 --patch
   118   $ hg obslog 1 --hidden --all --patch
   117   @    eb5a0daa2192 (4) C0
       
   118   |\     rewritten(description, content) from 471f378eab4c using fold by test (Thu Jan 01 00:00:00 1970 +0000)
       
   119   | |      diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
       
   120   | |      --- a/changeset-description
       
   121   | |      +++ b/changeset-description
       
   122   | |      @@ -1,1 +1,1 @@
       
   123   | |      -A0
       
   124   | |      +C0
       
   125   | |
       
   126   | |      diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   127   | |      --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   128   | |      +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   129   | |      @@ -0,0 +1,1 @@
       
   130   | |      +B0
       
   131   | |
       
   132   | |    rewritten(description, parent, content) from b7ea6d14e664 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
       
   133   | |      (No patch available, changesets rebased)
       
   134   | |
       
   135   x |  471f378eab4c (1) A0
       
   136    /
       
   137   x  b7ea6d14e664 (3) B1
       
   138   |    reworded(description) from 0dec01379d3b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   139   |      diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
       
   140   |      --- a/changeset-description
       
   141   |      +++ b/changeset-description
       
   142   |      @@ -1,1 +1,1 @@
       
   143   |      -B0
       
   144   |      +B1
       
   145   |
       
   146   |
       
   147   x  0dec01379d3b (2) B0
       
   148   
       
   149 Check that obslog on A0 with all option shows everything
       
   150   $ hg obslog 1 --hidden --all --patch --no-origin
   119   @    eb5a0daa2192 (4) C0
   151   @    eb5a0daa2192 (4) C0
   120   |\
   152   |\
   121   x |  471f378eab4c (1) A0
   153   x |  471f378eab4c (1) A0
   122    /     rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   154    /     rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   123   |        diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   155   |        diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   146          @@ -1,1 +1,1 @@
   178          @@ -1,1 +1,1 @@
   147          -B0
   179          -B0
   148          +B1
   180          +B1
   149   
   181   
   150   
   182   
   151   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   183   $ hg obslog 1 --hidden --all --patch
       
   184   @    eb5a0daa2192 (4) C0
       
   185   |\     rewritten(description, content) from 471f378eab4c using fold by test (Thu Jan 01 00:00:00 1970 +0000)
       
   186   | |      diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
       
   187   | |      --- a/changeset-description
       
   188   | |      +++ b/changeset-description
       
   189   | |      @@ -1,1 +1,1 @@
       
   190   | |      -A0
       
   191   | |      +C0
       
   192   | |
       
   193   | |      diff -r 471f378eab4c -r eb5a0daa2192 B0
       
   194   | |      --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   195   | |      +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
       
   196   | |      @@ -0,0 +1,1 @@
       
   197   | |      +B0
       
   198   | |
       
   199   | |    rewritten(description, parent, content) from b7ea6d14e664 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
       
   200   | |      (No patch available, changesets rebased)
       
   201   | |
       
   202   x |  471f378eab4c (1) A0
       
   203    /
       
   204   x  b7ea6d14e664 (3) B1
       
   205   |    reworded(description) from 0dec01379d3b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   206   |      diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
       
   207   |      --- a/changeset-description
       
   208   |      +++ b/changeset-description
       
   209   |      @@ -1,1 +1,1 @@
       
   210   |      -B0
       
   211   |      +B1
       
   212   |
       
   213   |
       
   214   x  0dec01379d3b (2) B0
       
   215   
       
   216   $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
   152   [
   217   [
   153       {
   218       {
   154           "markers": [],
   219           "markers": [],
   155           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
   220           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
   156           "shortdescription": "C0"
   221           "shortdescription": "C0"
   157       },
   222       },
   158       {
   223       {
   159           "markers": [
   224           "markers": [
   160               {
   225               {
   161                   "date": [
   226                   "dates": [
   162                       *, (glob)
   227                       [
   163                       0
   228                           *, (glob)
       
   229                           0
       
   230                       ]
   164                   ],
   231                   ],
   165                   "effects": [
   232                   "effects": [
   166                       *, (glob)
   233                       *, (glob)
   167                       *, (glob)
   234                       *, (glob)
   168                       "content"
   235                       "content"
   169                   ],
   236                   ],
   170                   "operation": "fold",
   237                   "operations": [
       
   238                       "fold"
       
   239                   ],
   171                   "succnodes": [
   240                   "succnodes": [
   172                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   241                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   173                   ],
   242                   ],
   174                   "user": "test",
   243                   "users": [
       
   244                       "test"
       
   245                   ],
   175                   "verb": "rewritten"
   246                   "verb": "rewritten"
   176               }
   247               }
   177           ],
   248           ],
   178           "node": "b7ea6d14e664bdc8922221f7992631b50da3fb07",
   249           "node": "b7ea6d14e664bdc8922221f7992631b50da3fb07",
   179           "shortdescription": "B1"
   250           "shortdescription": "B1"
   180       },
   251       },
   181       {
   252       {
   182           "markers": [
   253           "markers": [
   183               {
   254               {
   184                   "date": [
   255                   "dates": [
   185                       *, (glob)
   256                       [
   186                       0
   257                           *, (glob)
       
   258                           0
       
   259                       ]
   187                   ],
   260                   ],
   188                   "effects": [
   261                   "effects": [
   189                       "description"
   262                       "description"
   190                   ],
   263                   ],
   191                   "operation": "amend",
   264                   "operations": [
       
   265                       "amend"
       
   266                   ],
   192                   "succnodes": [
   267                   "succnodes": [
   193                       "b7ea6d14e664bdc8922221f7992631b50da3fb07"
   268                       "b7ea6d14e664bdc8922221f7992631b50da3fb07"
   194                   ],
   269                   ],
   195                   "user": "test",
   270                   "users": [
       
   271                       "test"
       
   272                   ],
   196                   "verb": "reworded"
   273                   "verb": "reworded"
   197               }
   274               }
   198           ],
   275           ],
   199           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
   276           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
   200           "shortdescription": "B0"
   277           "shortdescription": "B0"
   201       },
   278       },
   202       {
   279       {
   203           "markers": [
   280           "markers": [
   204               {
   281               {
   205                   "date": [
   282                   "dates": [
   206                       *, (glob)
   283                       [
   207                       0
   284                           *, (glob)
       
   285                           0
       
   286                       ]
   208                   ],
   287                   ],
   209                   "effects": [
   288                   "effects": [
   210                       "description",
   289                       "description",
   211                       "content"
   290                       "content"
   212                   ],
   291                   ],
   213                   "operation": "fold",
   292                   "operations": [
       
   293                       "fold"
       
   294                   ],
   214                   "succnodes": [
   295                   "succnodes": [
   215                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   296                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   216                   ],
   297                   ],
   217                   "user": "test",
   298                   "users": [
       
   299                       "test"
       
   300                   ],
   218                   "verb": "rewritten"
   301                   "verb": "rewritten"
   219               }
   302               }
   220           ],
   303           ],
       
   304           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
       
   305           "shortdescription": "A0"
       
   306       }
       
   307   ]
       
   308   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
       
   309   [
       
   310       {
       
   311           "markers": [
       
   312               {
       
   313                   "dates": [
       
   314                       [
       
   315                           *, (glob)
       
   316                           0
       
   317                       ]
       
   318                   ],
       
   319                   "effects": [
       
   320                       "description",
       
   321                       "content"
       
   322                   ],
       
   323                   "operations": [
       
   324                       "fold"
       
   325                   ],
       
   326                   "prednodes": [
       
   327                       "471f378eab4c5e25f6c77f785b27c936efb22874"
       
   328                   ],
       
   329                   "users": [
       
   330                       "test"
       
   331                   ],
       
   332                   "verb": "rewritten"
       
   333               },
       
   334               {
       
   335                   "dates": [
       
   336                       [
       
   337                           *, (glob)
       
   338                           0
       
   339                       ]
       
   340                   ],
       
   341                   "effects": [
       
   342                       *, (glob)
       
   343                       *, (glob)
       
   344                       "content"
       
   345                   ],
       
   346                   "operations": [
       
   347                       "fold"
       
   348                   ],
       
   349                   "prednodes": [
       
   350                       "b7ea6d14e664bdc8922221f7992631b50da3fb07"
       
   351                   ],
       
   352                   "users": [
       
   353                       "test"
       
   354                   ],
       
   355                   "verb": "rewritten"
       
   356               }
       
   357           ],
       
   358           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
       
   359           "shortdescription": "C0"
       
   360       },
       
   361       {
       
   362           "markers": [
       
   363               {
       
   364                   "dates": [
       
   365                       [
       
   366                           *, (glob)
       
   367                           0
       
   368                       ]
       
   369                   ],
       
   370                   "effects": [
       
   371                       "description"
       
   372                   ],
       
   373                   "operations": [
       
   374                       "amend"
       
   375                   ],
       
   376                   "prednodes": [
       
   377                       "0dec01379d3be6318c470ead31b1fe7ae7cb53d5"
       
   378                   ],
       
   379                   "users": [
       
   380                       "test"
       
   381                   ],
       
   382                   "verb": "reworded"
       
   383               }
       
   384           ],
       
   385           "node": "b7ea6d14e664bdc8922221f7992631b50da3fb07",
       
   386           "shortdescription": "B1"
       
   387       },
       
   388       {
       
   389           "markers": [],
       
   390           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
       
   391           "shortdescription": "B0"
       
   392       },
       
   393       {
       
   394           "markers": [],
   221           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   395           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   222           "shortdescription": "A0"
   396           "shortdescription": "A0"
   223       }
   397       }
   224   ]
   398   ]
   225   $ hg update 471f378eab4c
   399   $ hg update 471f378eab4c