tests/test-evolve-obshistory-split.t
branchmercurial-5.2
changeset 5362 72340abfcece
parent 5156 b056868312d1
parent 5349 e8660b28bfee
child 5364 be5aa681c122
equal deleted inserted replaced
5278:6434f3c4f7aa 5362:72340abfcece
     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
   101      summary:     ROOT
   100      summary:     ROOT
   102   
   101   
   103 Check output on the client side
   102 Check output on the client side
   104 -------------------------------
   103 -------------------------------
   105 
   104 
   106 Check that debugobshistory on split commit show both targets
   105 Check that obslog on split commit shows both targets
   107   $ hg obslog 471597cad322 --hidden --patch
   106   $ hg obslog 471597cad322 --hidden --patch --no-origin
   108   x  471597cad322 (1) A0
   107   x  471597cad322 (1) A0
   109        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   108        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   110          note: testing split
   109          note: testing split
   111          (No patch available, too many successors (2))
   110          (No patch available, too many successors (2))
   112   
   111   
   113   $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
   112   $ hg obslog 471597cad322 --hidden --no-graph --no-origin -Tjson | python -m json.tool
   114   [
   113   [
   115       {
   114       {
   116           "markers": [
   115           "markers": [
   117               {
   116               {
   118                   "date": [
   117                   "dates": [
   119                       *, (glob)
   118                       [
   120                       0
   119                           *, (glob)
       
   120                           0
       
   121                       ]
   121                   ],
   122                   ],
   122                   "effects": [
   123                   "effects": [
   123                       "parent",
   124                       "parent",
   124                       "content"
   125                       "content"
   125                   ],
   126                   ],
   126                   "note": "testing split",
   127                   "notes": [
   127                   "operation": "split",
   128                       "testing split"
       
   129                   ],
       
   130                   "operations": [
       
   131                       "split"
       
   132                   ],
   128                   "succnodes": [
   133                   "succnodes": [
   129                       "337fec4d2edcf0e7a467e35f818234bc620068b5",
   134                       "337fec4d2edcf0e7a467e35f818234bc620068b5",
   130                       "f257fde29c7a847c9b607f6e958656d0df0fb15c"
   135                       "f257fde29c7a847c9b607f6e958656d0df0fb15c"
   131                   ],
   136                   ],
   132                   "user": "test",
   137                   "users": [
       
   138                       "test"
       
   139                   ],
   133                   "verb": "split"
   140                   "verb": "split"
   134               }
   141               }
   135           ],
   142           ],
   136           "node": "471597cad322d1f659bb169751be9133dad92ef3",
   143           "node": "471597cad322d1f659bb169751be9133dad92ef3",
   137           "shortdescription": "A0"
   144           "shortdescription": "A0"
   138       }
   145       }
   139   ]
   146   ]
   140 Check that debugobshistory on the first successor after split show
   147   $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
   141 the revision plus the split one
   148   [
       
   149       {
       
   150           "markers": [],
       
   151           "node": "471597cad322d1f659bb169751be9133dad92ef3",
       
   152           "shortdescription": "A0"
       
   153       }
       
   154   ]
       
   155 Check that obslog on the first successor after split shows the revision plus
       
   156 the split one
   142   $ hg obslog 337fec4d2edc --patch
   157   $ hg obslog 337fec4d2edc --patch
   143   o  337fec4d2edc (2) A0
   158   o  337fec4d2edc (2) A0
   144   |
   159   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
   145   x  471597cad322 (1) A0
   160   |      note: testing split
   146        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   161   |      diff -r 471597cad322 -r 337fec4d2edc b
   147          note: testing split
   162   |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
   148          (No patch available, too many successors (2))
   163   |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   149   
   164   |      @@ -1,1 +0,0 @@
   150 With the all option, it should show the three changesets
   165   |      -43
       
   166   |
       
   167   |
       
   168   x  471597cad322 (1) A0
       
   169   
       
   170 With the all option, it should show all three changesets
   151   $ hg obslog --all 337fec4d2edc --patch
   171   $ hg obslog --all 337fec4d2edc --patch
   152   o  337fec4d2edc (2) A0
   172   o  337fec4d2edc (2) A0
   153   |
   173   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
   154   | @  f257fde29c7a (3) A0
   174   |      note: testing split
   155   |/
   175   |      diff -r 471597cad322 -r 337fec4d2edc b
   156   x  471597cad322 (1) A0
   176   |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
   157        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   177   |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   158          note: testing split
   178   |      @@ -1,1 +0,0 @@
   159          (No patch available, too many successors (2))
   179   |      -43
   160   
   180   |
   161 Check that debugobshistory on the second successor after split show
   181   |
   162 the revision plus the split one
   182   | @  f257fde29c7a (3) A0
       
   183   |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   184   |        note: testing split
       
   185   |        (No patch available, changesets rebased)
       
   186   |
       
   187   x  471597cad322 (1) A0
       
   188   
       
   189 Check that obslog on the second successor after split shows the revision plus
       
   190 the split one
   163   $ hg obslog f257fde29c7a --patch
   191   $ hg obslog f257fde29c7a --patch
   164   @  f257fde29c7a (3) A0
   192   @  f257fde29c7a (3) A0
   165   |
   193   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   194   |      note: testing split
       
   195   |      (No patch available, changesets rebased)
       
   196   |
       
   197   x  471597cad322 (1) A0
       
   198   
       
   199 With the all option, it should show all three changesets
       
   200   $ hg obslog f257fde29c7a --all --patch
       
   201   o  337fec4d2edc (2) A0
       
   202   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   203   |      note: testing split
       
   204   |      diff -r 471597cad322 -r 337fec4d2edc b
       
   205   |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
       
   206   |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
       
   207   |      @@ -1,1 +0,0 @@
       
   208   |      -43
       
   209   |
       
   210   |
       
   211   | @  f257fde29c7a (3) A0
       
   212   |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   213   |        note: testing split
       
   214   |        (No patch available, changesets rebased)
       
   215   |
       
   216   x  471597cad322 (1) A0
       
   217   
       
   218 Obslog with all option should also works on the split commit
       
   219   $ hg obslog -a 471597cad322 --hidden --patch --no-origin
       
   220   o  337fec4d2edc (2) A0
       
   221   |
       
   222   | @  f257fde29c7a (3) A0
       
   223   |/
   166   x  471597cad322 (1) A0
   224   x  471597cad322 (1) A0
   167        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   225        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   168          note: testing split
   226          note: testing split
   169          (No patch available, too many successors (2))
   227          (No patch available, too many successors (2))
   170   
   228   
   171 With the all option, it should show the three changesets
   229 Check that obslog on both successors after split shows a coherent graph
   172   $ hg obslog f257fde29c7a --all --patch
   230   $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch --no-origin
   173   o  337fec4d2edc (2) A0
   231   o  337fec4d2edc (2) A0
   174   |
   232   |
   175   | @  f257fde29c7a (3) A0
   233   | @  f257fde29c7a (3) A0
   176   |/
   234   |/
   177   x  471597cad322 (1) A0
   235   x  471597cad322 (1) A0
   178        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   236        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   179          note: testing split
   237          note: testing split
   180          (No patch available, too many successors (2))
   238          (No patch available, too many successors (2))
   181   
   239   
   182 Obslog with all option all should also works on the split commit
       
   183   $ hg obslog -a 471597cad322 --hidden --patch
       
   184   o  337fec4d2edc (2) A0
       
   185   |
       
   186   | @  f257fde29c7a (3) A0
       
   187   |/
       
   188   x  471597cad322 (1) A0
       
   189        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   190          note: testing split
       
   191          (No patch available, too many successors (2))
       
   192   
       
   193 Check that debugobshistory on both successors after split show
       
   194 a coherent graph
       
   195   $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
   240   $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
   196   o  337fec4d2edc (2) A0
   241   o  337fec4d2edc (2) A0
   197   |
   242   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
   198   | @  f257fde29c7a (3) A0
   243   |      note: testing split
   199   |/
   244   |      diff -r 471597cad322 -r 337fec4d2edc b
   200   x  471597cad322 (1) A0
   245   |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
   201        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   246   |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   202          note: testing split
   247   |      @@ -1,1 +0,0 @@
   203          (No patch available, too many successors (2))
   248   |      -43
       
   249   |
       
   250   |
       
   251   | @  f257fde29c7a (3) A0
       
   252   |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   253   |        note: testing split
       
   254   |        (No patch available, changesets rebased)
       
   255   |
       
   256   x  471597cad322 (1) A0
   204   
   257   
   205   $ hg update 471597cad322
   258   $ hg update 471597cad322
   206   abort: hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a!
   259   abort: hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a!
   207   (use --hidden to access hidden revisions)
   260   (use --hidden to access hidden revisions)
   208   [255]
   261   [255]
   214   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
   267   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
   215 
   268 
   216 Check output on the server side
   269 Check output on the server side
   217 -------------------------------
   270 -------------------------------
   218 
   271 
   219   $ hg obslog -R $TESTTMP/server --patch tip
   272   $ hg obslog -R $TESTTMP/server --patch tip --no-origin
   220   o  f257fde29c7a (2) A0
   273   o  f257fde29c7a (2) A0
   221   |
   274   |
   222   x  471597cad322
   275   x  471597cad322
   223        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   276        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   224          note: testing split
   277          note: testing split
   225          (No patch available, context is not local)
   278          (No patch available, context is not local)
   226   
   279   
   227   $ hg obslog -R $TESTTMP/server -f --patch tip
   280   $ hg obslog -R $TESTTMP/server -f --patch tip --no-origin
   228   o  f257fde29c7a (2) A0
   281   o  f257fde29c7a (2) A0
   229   
   282   
   230   $ hg obslog -R $TESTTMP/server --all --patch tip
   283   $ hg obslog -R $TESTTMP/server --all --patch tip --no-origin
   231   o  337fec4d2edc (1) A0
   284   o  337fec4d2edc (1) A0
   232   |
   285   |
   233   | o  f257fde29c7a (2) A0
   286   | o  f257fde29c7a (2) A0
   234   |/
   287   |/
   235   x  471597cad322
   288   x  471597cad322
   236        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   289        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   237          note: testing split
   290          note: testing split
   238          (No patch available, context is not local)
   291          (No patch available, context is not local)
   239   
   292   
   240   $ hg obslog -R $TESTTMP/server --all -f --patch tip
   293   $ hg obslog -R $TESTTMP/server --all -f --patch tip --no-origin
   241   o  337fec4d2edc (1) A0
   294   o  337fec4d2edc (1) A0
   242   
   295   
   243   o  f257fde29c7a (2) A0
   296   o  f257fde29c7a (2) A0
   244   
   297   
   245   $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip
   298   $ hg obslog -R $TESTTMP/server --no-graph --all --patch tip --no-origin
   246   f257fde29c7a (2) A0
   299   f257fde29c7a (2) A0
   247   
   300   
   248   471597cad322
   301   471597cad322
   249     split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   302     split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   250       note: testing split        
   303       note: testing split        
   251       (No patch available, context is not local)
   304       (No patch available, context is not local)
   252   
   305   
   253 
   306   337fec4d2edc (1) A0
       
   307   
       
   308   $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip --no-origin
       
   309   f257fde29c7a (2) A0
       
   310   
       
   311   337fec4d2edc (1) A0
       
   312   
       
   313 
       
   314   $ hg obslog -R $TESTTMP/server --patch tip
       
   315   o  f257fde29c7a (2) A0
       
   316   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   317   |      note: testing split
       
   318   |      (No patch available, predecessor is unknown locally)
       
   319   |
       
   320   x  471597cad322
       
   321   
       
   322   $ hg obslog -R $TESTTMP/server -f --patch tip
       
   323   o  f257fde29c7a (2) A0
       
   324   
       
   325   $ hg obslog -R $TESTTMP/server --all --patch tip
       
   326   o  337fec4d2edc (1) A0
       
   327   |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   328   |      note: testing split
       
   329   |      (No patch available, predecessor is unknown locally)
       
   330   |
       
   331   | o  f257fde29c7a (2) A0
       
   332   |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   333   |        note: testing split
       
   334   |        (No patch available, predecessor is unknown locally)
       
   335   |
       
   336   x  471597cad322
       
   337   
       
   338   $ hg obslog -R $TESTTMP/server --all -f --patch tip
       
   339   o  337fec4d2edc (1) A0
       
   340   
       
   341   o  f257fde29c7a (2) A0
       
   342   
       
   343   $ hg obslog -R $TESTTMP/server --no-graph --all --patch tip
       
   344   f257fde29c7a (2) A0
       
   345     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   346       note: testing split        
       
   347       (No patch available, predecessor is unknown locally)
       
   348   
       
   349   471597cad322
       
   350   
       
   351   337fec4d2edc (1) A0
       
   352     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
       
   353       note: testing split        
       
   354       (No patch available, predecessor is unknown locally)
       
   355   
   254   $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip
   356   $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip
   255   f257fde29c7a (2) A0
   357   f257fde29c7a (2) A0
   256   
   358   
   257   471597cad322
   359   337fec4d2edc (1) A0
   258     split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
   360   
   259       note: testing split        
       
   260       (No patch available, context is not local)
       
   261