tests/test-evolve-obshistory-fold.t
branchmercurial-4.8
changeset 5366 62855e1ce9d8
parent 5349 e8660b28bfee
child 5367 cb5983c0287f
equal deleted inserted replaced
5282:1bb465fad209 5366:62855e1ce9d8
     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
    67 
    66 
    68   $ sync
    67   $ sync
    69 Check output of the client
    68 Check output of the client
    70 --------------------------
    69 --------------------------
    71 
    70 
    72 Check that debugobshistory on the first folded revision show only
    71 Check that obslog on the first folded revision shows only the revision with the
    73 the revision with the target
    72 target
    74   $ hg obslog --hidden 471f378eab4c --patch
    73   $ hg obslog --hidden 471f378eab4c --patch --no-origin
    75   x  471f378eab4c (1) A0
    74   x  471f378eab4c (1) A0
    76        folded(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    75        folded(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    77          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
    76          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
    78          --- a/changeset-description
    77          --- a/changeset-description
    79          +++ b/changeset-description
    78          +++ b/changeset-description
    87          @@ -0,0 +1,1 @@
    86          @@ -0,0 +1,1 @@
    88          +B0
    87          +B0
    89   
    88   
    90   
    89   
    91 Check that with all option, all changesets are shown
    90 Check that with all option, all changesets are shown
    92   $ hg obslog --hidden --all 471f378eab4c --patch
    91   $ hg obslog --hidden --all 471f378eab4c --patch --no-origin
    93   @    eb5a0daa2192 (3) C0
    92   @    eb5a0daa2192 (3) C0
    94   |\
    93   |\
    95   x |  0dec01379d3b (2) B0
    94   x |  0dec01379d3b (2) B0
    96    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    95    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
    97   |        (No patch available, changesets rebased)
    96   |        (No patch available, changesets rebased)
   110          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   109          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   111          @@ -0,0 +1,1 @@
   110          @@ -0,0 +1,1 @@
   112          +B0
   111          +B0
   113   
   112   
   114   
   113   
   115 Check that debugobshistory on the second folded revision show only
   114 Check that obslog on the second folded revision shows only the revision with
   116 the revision with the target
   115 the target
   117   $ hg obslog --hidden 0dec01379d3b --patch
   116   $ hg obslog --hidden 0dec01379d3b --patch --no-origin
   118   x  0dec01379d3b (2) B0
   117   x  0dec01379d3b (2) B0
   119        folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   118        folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   120          (No patch available, changesets rebased)
   119          (No patch available, changesets rebased)
   121   
   120   
   122 Check that with all option, all changesets are shown
   121 Check that with all option, all changesets are shown
   123   $ hg obslog --hidden --all 0dec01379d3b --patch
   122   $ hg obslog --hidden --all 0dec01379d3b --patch --no-origin
   124   @    eb5a0daa2192 (3) C0
   123   @    eb5a0daa2192 (3) C0
   125   |\
   124   |\
   126   x |  0dec01379d3b (2) B0
   125   x |  0dec01379d3b (2) B0
   127    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   126    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   128   |        (No patch available, changesets rebased)
   127   |        (No patch available, changesets rebased)
   141          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   140          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   142          @@ -0,0 +1,1 @@
   141          @@ -0,0 +1,1 @@
   143          +B0
   142          +B0
   144   
   143   
   145   
   144   
   146 Check that debugobshistory on the successor revision show a coherent
   145 Check that obslog on the successor revision shows a coherent graph
   147 graph
   146   $ hg obslog eb5a0daa2192 --patch --no-origin
   148   $ hg obslog eb5a0daa2192 --patch
       
   149   @    eb5a0daa2192 (3) C0
   147   @    eb5a0daa2192 (3) C0
   150   |\
   148   |\
   151   x |  0dec01379d3b (2) B0
   149   x |  0dec01379d3b (2) B0
   152    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   150    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   153   |        (No patch available, changesets rebased)
   151   |        (No patch available, changesets rebased)
   166          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   164          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   167          @@ -0,0 +1,1 @@
   165          @@ -0,0 +1,1 @@
   168          +B0
   166          +B0
   169   
   167   
   170   
   168   
   171   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
   169   $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
   172   [
   170   [
   173       {
   171       {
   174           "markers": [],
   172           "markers": [],
   175           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
   173           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
   176           "shortdescription": "C0"
   174           "shortdescription": "C0"
   177       },
   175       },
   178       {
   176       {
   179           "markers": [
   177           "markers": [
   180               {
   178               {
   181                   "date": [
   179                   "dates": [
   182                       *, (glob)
   180                       [
   183                       0
   181                           *, (glob)
       
   182                           0
       
   183                       ]
   184                   ],
   184                   ],
   185                   "effects": [
   185                   "effects": [
   186                       "description",
   186                       "description",
   187                       "content"
   187                       "content"
   188                   ],
   188                   ],
   189                   "operation": "fold",
   189                   "operations": [
       
   190                       "fold"
       
   191                   ],
   190                   "succnodes": [
   192                   "succnodes": [
   191                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   193                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   192                   ],
   194                   ],
   193                   "user": "test",
   195                   "users": [
       
   196                       "test"
       
   197                   ],
   194                   "verb": "folded"
   198                   "verb": "folded"
   195               }
   199               }
   196           ],
   200           ],
   197           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   201           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
   198           "shortdescription": "A0"
   202           "shortdescription": "A0"
   199       },
   203       },
   200       {
   204       {
   201           "markers": [
   205           "markers": [
   202               {
   206               {
   203                   "date": [
   207                   "dates": [
   204                       *, (glob)
   208                       [
   205                       0
   209                           *, (glob)
       
   210                           0
       
   211                       ]
   206                   ],
   212                   ],
   207                   "effects": [
   213                   "effects": [
   208                       "description",
   214                       "description",
   209                       "parent",
   215                       "parent",
   210                       "content"
   216                       "content"
   211                   ],
   217                   ],
   212                   "operation": "fold",
   218                   "operations": [
       
   219                       "fold"
       
   220                   ],
   213                   "succnodes": [
   221                   "succnodes": [
   214                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   222                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
   215                   ],
   223                   ],
   216                   "user": "test",
   224                   "users": [
       
   225                       "test"
       
   226                   ],
   217                   "verb": "folded"
   227                   "verb": "folded"
   218               }
   228               }
   219           ],
   229           ],
       
   230           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
       
   231           "shortdescription": "B0"
       
   232       }
       
   233   ]
       
   234 
       
   235   $ hg obslog eb5a0daa2192 --patch
       
   236   @    eb5a0daa2192 (3) C0
       
   237   |\     folded(description, parent, content) from 0dec01379d3b, 471f378eab4c using fold by test (Thu Jan 01 00:00:00 1970 +0000)
       
   238   | |      (No patch available, too many predecessors (2))
       
   239   | |
       
   240   x |  0dec01379d3b (2) B0
       
   241    /
       
   242   x  471f378eab4c (1) A0
       
   243   
       
   244   $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
       
   245   [
       
   246       {
       
   247           "markers": [
       
   248               {
       
   249                   "dates": [
       
   250                       [
       
   251                           *, (glob)
       
   252                           0
       
   253                       ],
       
   254                       [
       
   255                           *, (glob)
       
   256                           0
       
   257                       ]
       
   258                   ],
       
   259                   "effects": [
       
   260                       "description",
       
   261                       "parent",
       
   262                       "content"
       
   263                   ],
       
   264                   "operations": [
       
   265                       "fold"
       
   266                   ],
       
   267                   "prednodes": [
       
   268                       "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
       
   269                       "471f378eab4c5e25f6c77f785b27c936efb22874"
       
   270                   ],
       
   271                   "users": [
       
   272                       "test"
       
   273                   ],
       
   274                   "verb": "folded"
       
   275               }
       
   276           ],
       
   277           "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
       
   278           "shortdescription": "C0"
       
   279       },
       
   280       {
       
   281           "markers": [],
       
   282           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
       
   283           "shortdescription": "A0"
       
   284       },
       
   285       {
       
   286           "markers": [],
   220           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
   287           "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
   221           "shortdescription": "B0"
   288           "shortdescription": "B0"
   222       }
   289       }
   223   ]
   290   ]
   224   $ hg update 471f378eab4c
   291   $ hg update 471f378eab4c
   243   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   310   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   244 
   311 
   245 Check output of the server
   312 Check output of the server
   246 --------------------------
   313 --------------------------
   247 
   314 
   248   $ hg obslog -R $TESTTMP/server --patch tip --all
   315   $ hg obslog -R $TESTTMP/server --all --patch tip --no-origin
   249   o    eb5a0daa2192 (2) C0
   316   o    eb5a0daa2192 (2) C0
   250   |\
   317   |\
   251   x |  0dec01379d3b
   318   x |  0dec01379d3b
   252    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   319    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   253   |        (No patch available, context is not local)
   320   |        (No patch available, context is not local)
   266          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   333          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   267          @@ -0,0 +1,1 @@
   334          @@ -0,0 +1,1 @@
   268          +B0
   335          +B0
   269   
   336   
   270   
   337   
   271   $ hg obslog -R $TESTTMP/server -f --all --patch tip
   338   $ hg obslog -R $TESTTMP/server -f --all --patch tip --no-origin
   272   o  eb5a0daa2192 (2) C0
   339   o  eb5a0daa2192 (2) C0
   273   |
   340   |
   274   x  471f378eab4c (1) A0
   341   x  471f378eab4c (1) A0
   275        folded(description, content) as eb5a0daa2192 using fold by test (at Thu Jan 01 00:00:00 1970 +0000)
   342        folded(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   276          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   343          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   277          --- a/changeset-description
   344          --- a/changeset-description
   278          +++ b/changeset-description
   345          +++ b/changeset-description
   279          @@ -1,1 +1,1 @@
   346          @@ -1,1 +1,1 @@
   280          -A0
   347          -A0
   281          +C0
   348          +C0
   282   
   349   
   283          diff -r 471f378eab4c -r eb5a0daa2192 B0
   350          diff -r 471f378eab4c -r eb5a0daa2192 B0
   284          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   351          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   285          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   352          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   286          @@ -0,0 +1,1 @@
   353          @@ -0,0 +1,1 @@
   287          +B0
   354          +B0
   288   
   355   
   289   
   356   
   290 
   357 
   291   $ hg obslog -R $TESTTMP/server --all --patch 471f378eab4c --hidden
   358   $ hg obslog -R $TESTTMP/server --all --patch 471f378eab4c --no-origin --hidden
   292   o    eb5a0daa2192 (2) C0
   359   o    eb5a0daa2192 (2) C0
   293   |\
   360   |\
   294   x |  0dec01379d3b
   361   x |  0dec01379d3b
   295    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   362    /     folded(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   296   |        (No patch available, context is not local)
   363   |        (No patch available, context is not local)
   309          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   376          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   310          @@ -0,0 +1,1 @@
   377          @@ -0,0 +1,1 @@
   311          +B0
   378          +B0
   312   
   379   
   313   
   380   
   314   $ hg obslog -R $TESTTMP/server -f --all --patch 471f378eab4c --hidden
   381   $ hg obslog -R $TESTTMP/server -f --all --patch 471f378eab4c --no-origin --hidden
   315   o  eb5a0daa2192 (2) C0
   382   o  eb5a0daa2192 (2) C0
   316   |
   383   |
   317   x  471f378eab4c (1) A0
   384   x  471f378eab4c (1) A0
   318        folded(description, content) as eb5a0daa2192 using fold by test (at Thu Jan 01 00:00:00 1970 +0000)
   385        folded(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
   319          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   386          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
   320          --- a/changeset-description
   387          --- a/changeset-description
   321          +++ b/changeset-description
   388          +++ b/changeset-description
   322          @@ -1,1 +1,1 @@
   389          @@ -1,1 +1,1 @@
   323          -A0
   390          -A0
   324          +C0
   391          +C0
   325   
   392   
   326          diff -r 471f378eab4c -r eb5a0daa2192 B0
   393          diff -r 471f378eab4c -r eb5a0daa2192 B0
   327          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   394          --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   328          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   395          +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
   329          @@ -0,0 +1,1 @@
   396          @@ -0,0 +1,1 @@
   330          +B0
   397          +B0
   331   
   398   
   332   
   399