tests/test-evolve-obshistory-content-divergent.t
branchmercurial-4.6
changeset 5368 844b1ad5b34b
parent 5163 1752a2e7a226
parent 5349 e8660b28bfee
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
    77      summary:     ROOT
    76      summary:     ROOT
    78   
    77   
    79 Actual test
    78 Actual test
    80 -----------
    79 -----------
    81 
    80 
    82 Check that debugobshistory on the divergent revision show both destinations
    81 Check that obslog on the divergent revision shows both destinations
    83   $ hg obslog --hidden 471f378eab4c --patch
    82   $ hg obslog --hidden 471f378eab4c --patch --no-origin
    84   x  471f378eab4c (1) A0
    83   x  471f378eab4c (1) A0
    85        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
    84        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
    86          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
    85          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
    87          --- a/changeset-description
    86          --- a/changeset-description
    88          +++ b/changeset-description
    87          +++ b/changeset-description
   101   
   100   
   102 
   101 
   103 Check that with all option, every changeset is shown
   102 Check that with all option, every changeset is shown
   104   $ hg obslog --hidden --all 471f378eab4c --patch
   103   $ hg obslog --hidden --all 471f378eab4c --patch
   105   @  65b757b745b9 (3) A2
   104   @  65b757b745b9 (3) A2
       
   105   |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   106   |      diff -r 471f378eab4c -r 65b757b745b9 changeset-description
       
   107   |      --- a/changeset-description
       
   108   |      +++ b/changeset-description
       
   109   |      @@ -1,1 +1,1 @@
       
   110   |      -A0
       
   111   |      +A2
       
   112   |
   106   |
   113   |
   107   | *  fdf9bde5129a (2) A1
   114   | *  fdf9bde5129a (2) A1
   108   |/
   115   |/     reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   109   x  471f378eab4c (1) A0
   116   |        diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   110        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   117   |        --- a/changeset-description
   111          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   118   |        +++ b/changeset-description
   112          --- a/changeset-description
   119   |        @@ -1,1 +1,1 @@
   113          +++ b/changeset-description
   120   |        -A0
   114          @@ -1,1 +1,1 @@
   121   |        +A1
   115          -A0
   122   |
   116          +A2
   123   |
   117   
   124   x  471f378eab4c (1) A0
   118        reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   125   
   119          diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   126   $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | python -m json.tool
   120          --- a/changeset-description
       
   121          +++ b/changeset-description
       
   122          @@ -1,1 +1,1 @@
       
   123          -A0
       
   124          +A1
       
   125   
       
   126   
       
   127   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
       
   128   [
   127   [
   129       {
   128       {
   130           "markers": [
   129           "markers": [
   131               {
   130               {
   132                   "date": [
   131                   "dates": [
   133                       *, (glob)
   132                       [
   134                       0
   133                           *, (glob)
   135                   ],
   134                           0
   136                   "effects": [
   135                       ]
   137                       "description"
   136                   ],
   138                   ],
   137                   "effects": [
   139                   "operation": "amend",
   138                       "description"
       
   139                   ],
       
   140                   "operations": [
       
   141                       "amend"
       
   142                   ],
   140                   "succnodes": [
   143                   "succnodes": [
   141                       "65b757b745b935093c87a2bccd877521cccffcbd"
   144                       "65b757b745b935093c87a2bccd877521cccffcbd"
   142                   ],
   145                   ],
   143                   "user": "test",
   146                   "users": [
       
   147                       "test"
       
   148                   ],
   144                   "verb": "reworded"
   149                   "verb": "reworded"
   145               },
   150               },
   146               {
   151               {
   147                   "date": [
   152                   "dates": [
   148                       *, (glob)
   153                       [
   149                       0
   154                           *, (glob)
   150                   ],
   155                           0
   151                   "effects": [
   156                       ]
   152                       "description"
   157                   ],
   153                   ],
   158                   "effects": [
   154                   "operation": "amend",
   159                       "description"
       
   160                   ],
       
   161                   "operations": [
       
   162                       "amend"
       
   163                   ],
   155                   "succnodes": [
   164                   "succnodes": [
   156                       "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
   165                       "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
   157                   ],
   166                   ],
   158                   "user": "test",
   167                   "users": [
       
   168                       "test"
       
   169                   ],
   159                   "verb": "reworded"
   170                   "verb": "reworded"
   160               }
   171               }
   161           ],
   172           ],
   162           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   173           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   163           "shortdescription": "A0"
   174           "shortdescription": "A0"
   164       }
   175       }
   165   ]
   176   ]
   166 Check that debugobshistory on the first diverged revision show the revision
   177   $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
   167 and the diverent one
   178   [
   168   $ hg obslog fdf9bde5129a --patch
   179       {
       
   180           "markers": [],
       
   181           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
       
   182           "shortdescription": "A0"
       
   183       }
       
   184   ]
       
   185 Check that obslog on the first diverged revision shows the revision and the
       
   186 divergent one
       
   187   $ hg obslog fdf9bde5129a --patch --no-origin
   169   *  fdf9bde5129a (2) A1
   188   *  fdf9bde5129a (2) A1
   170   |
   189   |
   171   x  471f378eab4c (1) A0
   190   x  471f378eab4c (1) A0
   172        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   191        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   173          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   192          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   185          -A0
   204          -A0
   186          +A1
   205          +A1
   187   
   206   
   188   
   207   
   189 
   208 
   190 Check that all option show all of them
   209 Check that all option shows all of them
   191   $ hg obslog fdf9bde5129a -a --patch
   210   $ hg obslog fdf9bde5129a -a --patch
   192   @  65b757b745b9 (3) A2
   211   @  65b757b745b9 (3) A2
       
   212   |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   213   |      diff -r 471f378eab4c -r 65b757b745b9 changeset-description
       
   214   |      --- a/changeset-description
       
   215   |      +++ b/changeset-description
       
   216   |      @@ -1,1 +1,1 @@
       
   217   |      -A0
       
   218   |      +A2
       
   219   |
   193   |
   220   |
   194   | *  fdf9bde5129a (2) A1
   221   | *  fdf9bde5129a (2) A1
   195   |/
   222   |/     reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   223   |        diff -r 471f378eab4c -r fdf9bde5129a changeset-description
       
   224   |        --- a/changeset-description
       
   225   |        +++ b/changeset-description
       
   226   |        @@ -1,1 +1,1 @@
       
   227   |        -A0
       
   228   |        +A1
       
   229   |
       
   230   |
       
   231   x  471f378eab4c (1) A0
       
   232   
       
   233 Check that obslog on the second diverged revision shows the revision and the
       
   234 divergent one
       
   235   $ hg obslog 65b757b745b9 --patch --no-origin
       
   236   @  65b757b745b9 (3) A2
       
   237   |
   196   x  471f378eab4c (1) A0
   238   x  471f378eab4c (1) A0
   197        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   239        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   198          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   240          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   199          --- a/changeset-description
   241          --- a/changeset-description
   200          +++ b/changeset-description
   242          +++ b/changeset-description
   209          @@ -1,1 +1,1 @@
   251          @@ -1,1 +1,1 @@
   210          -A0
   252          -A0
   211          +A1
   253          +A1
   212   
   254   
   213   
   255   
   214 Check that debugobshistory on the second diverged revision show the revision
   256 Check that all option shows all of them
   215 and the diverent one
       
   216   $ hg obslog 65b757b745b9 --patch
       
   217   @  65b757b745b9 (3) A2
       
   218   |
       
   219   x  471f378eab4c (1) A0
       
   220        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   221          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
       
   222          --- a/changeset-description
       
   223          +++ b/changeset-description
       
   224          @@ -1,1 +1,1 @@
       
   225          -A0
       
   226          +A2
       
   227   
       
   228        reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   229          diff -r 471f378eab4c -r fdf9bde5129a changeset-description
       
   230          --- a/changeset-description
       
   231          +++ b/changeset-description
       
   232          @@ -1,1 +1,1 @@
       
   233          -A0
       
   234          +A1
       
   235   
       
   236   
       
   237 Check that all option show all of them
       
   238   $ hg obslog 65b757b745b9 -a --patch
   257   $ hg obslog 65b757b745b9 -a --patch
   239   @  65b757b745b9 (3) A2
   258   @  65b757b745b9 (3) A2
       
   259   |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   260   |      diff -r 471f378eab4c -r 65b757b745b9 changeset-description
       
   261   |      --- a/changeset-description
       
   262   |      +++ b/changeset-description
       
   263   |      @@ -1,1 +1,1 @@
       
   264   |      -A0
       
   265   |      +A2
       
   266   |
   240   |
   267   |
   241   | *  fdf9bde5129a (2) A1
   268   | *  fdf9bde5129a (2) A1
   242   |/
   269   |/     reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   243   x  471f378eab4c (1) A0
   270   |        diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   244        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   271   |        --- a/changeset-description
   245          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   272   |        +++ b/changeset-description
   246          --- a/changeset-description
   273   |        @@ -1,1 +1,1 @@
   247          +++ b/changeset-description
   274   |        -A0
   248          @@ -1,1 +1,1 @@
   275   |        +A1
   249          -A0
   276   |
   250          +A2
   277   |
   251   
   278   x  471f378eab4c (1) A0
   252        reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   279   
   253          diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   280 Check that obslog on the both diverged revision shows a coherent graph
   254          --- a/changeset-description
       
   255          +++ b/changeset-description
       
   256          @@ -1,1 +1,1 @@
       
   257          -A0
       
   258          +A1
       
   259   
       
   260   
       
   261 Check that debugobshistory on the both diverged revision show a coherent
       
   262 graph
       
   263   $ hg obslog '65b757b745b9+fdf9bde5129a' --patch
   281   $ hg obslog '65b757b745b9+fdf9bde5129a' --patch
   264   @  65b757b745b9 (3) A2
   282   @  65b757b745b9 (3) A2
       
   283   |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   284   |      diff -r 471f378eab4c -r 65b757b745b9 changeset-description
       
   285   |      --- a/changeset-description
       
   286   |      +++ b/changeset-description
       
   287   |      @@ -1,1 +1,1 @@
       
   288   |      -A0
       
   289   |      +A2
       
   290   |
   265   |
   291   |
   266   | *  fdf9bde5129a (2) A1
   292   | *  fdf9bde5129a (2) A1
   267   |/
   293   |/     reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   268   x  471f378eab4c (1) A0
   294   |        diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   269        reworded(description) as 65b757b745b9 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   295   |        --- a/changeset-description
   270          diff -r 471f378eab4c -r 65b757b745b9 changeset-description
   296   |        +++ b/changeset-description
   271          --- a/changeset-description
   297   |        @@ -1,1 +1,1 @@
   272          +++ b/changeset-description
   298   |        -A0
   273          @@ -1,1 +1,1 @@
   299   |        +A1
   274          -A0
   300   |
   275          +A2
   301   |
   276   
   302   x  471f378eab4c (1) A0
   277        reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
   303   
   278          diff -r 471f378eab4c -r fdf9bde5129a changeset-description
   304   $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph --no-origin -Tjson | python -m json.tool
   279          --- a/changeset-description
       
   280          +++ b/changeset-description
       
   281          @@ -1,1 +1,1 @@
       
   282          -A0
       
   283          +A1
       
   284   
       
   285   
       
   286   $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
       
   287   [
   305   [
   288       {
   306       {
   289           "markers": [],
   307           "markers": [],
   290           "node": "65b757b745b935093c87a2bccd877521cccffcbd",
   308           "node": "65b757b745b935093c87a2bccd877521cccffcbd",
   291           "shortdescription": "A2"
   309           "shortdescription": "A2"
   292       },
   310       },
   293       {
   311       {
   294           "markers": [
   312           "markers": [
   295               {
   313               {
   296                   "date": [
   314                   "dates": [
   297                       *, (glob)
   315                       [
   298                       0
   316                           *, (glob)
   299                   ],
   317                           0
   300                   "effects": [
   318                       ]
   301                       "description"
   319                   ],
   302                   ],
   320                   "effects": [
   303                   "operation": "amend",
   321                       "description"
       
   322                   ],
       
   323                   "operations": [
       
   324                       "amend"
       
   325                   ],
   304                   "succnodes": [
   326                   "succnodes": [
   305                       "65b757b745b935093c87a2bccd877521cccffcbd"
   327                       "65b757b745b935093c87a2bccd877521cccffcbd"
   306                   ],
   328                   ],
   307                   "user": "test",
   329                   "users": [
       
   330                       "test"
       
   331                   ],
   308                   "verb": "reworded"
   332                   "verb": "reworded"
   309               },
   333               },
   310               {
   334               {
   311                   "date": [
   335                   "dates": [
   312                       *, (glob)
   336                       [
   313                       0
   337                           *, (glob)
   314                   ],
   338                           0
   315                   "effects": [
   339                       ]
   316                       "description"
   340                   ],
   317                   ],
   341                   "effects": [
   318                   "operation": "amend",
   342                       "description"
       
   343                   ],
       
   344                   "operations": [
       
   345                       "amend"
       
   346                   ],
   319                   "succnodes": [
   347                   "succnodes": [
   320                       "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
   348                       "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
   321                   ],
   349                   ],
   322                   "user": "test",
   350                   "users": [
       
   351                       "test"
       
   352                   ],
   323                   "verb": "reworded"
   353                   "verb": "reworded"
   324               }
   354               }
   325           ],
   355           ],
   326           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   356           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   327           "shortdescription": "A0"
   357           "shortdescription": "A0"
   328       },
   358       },
   329       {
   359       {
   330           "markers": [],
   360           "markers": [],
       
   361           "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
       
   362           "shortdescription": "A1"
       
   363       }
       
   364   ]
       
   365   $ hg obslog '65b757b745b9+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
       
   366   [
       
   367       {
       
   368           "markers": [
       
   369               {
       
   370                   "dates": [
       
   371                       [
       
   372                           0.0,
       
   373                           0
       
   374                       ]
       
   375                   ],
       
   376                   "effects": [
       
   377                       "description"
       
   378                   ],
       
   379                   "operations": [
       
   380                       "amend"
       
   381                   ],
       
   382                   "prednodes": [
       
   383                       "471f378eab4c5e25f6c77f785b27c936efb22874"
       
   384                   ],
       
   385                   "users": [
       
   386                       "test"
       
   387                   ],
       
   388                   "verb": "reworded"
       
   389               }
       
   390           ],
       
   391           "node": "65b757b745b935093c87a2bccd877521cccffcbd",
       
   392           "shortdescription": "A2"
       
   393       },
       
   394       {
       
   395           "markers": [],
       
   396           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
       
   397           "shortdescription": "A0"
       
   398       },
       
   399       {
       
   400           "markers": [
       
   401               {
       
   402                   "dates": [
       
   403                       [
       
   404                           *, (glob)
       
   405                           0
       
   406                       ]
       
   407                   ],
       
   408                   "effects": [
       
   409                       "description"
       
   410                   ],
       
   411                   "operations": [
       
   412                       "amend"
       
   413                   ],
       
   414                   "prednodes": [
       
   415                       "471f378eab4c5e25f6c77f785b27c936efb22874"
       
   416                   ],
       
   417                   "users": [
       
   418                       "test"
       
   419                   ],
       
   420                   "verb": "reworded"
       
   421               }
       
   422           ],
   331           "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
   423           "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
   332           "shortdescription": "A1"
   424           "shortdescription": "A1"
   333       }
   425       }
   334   ]
   426   ]
   335   $ hg update 471f378eab4c
   427   $ hg update 471f378eab4c