tests/test-evolve-obshistory-split.t
branchmercurial-5.2
changeset 5362 72340abfcece
parent 5156 b056868312d1
parent 5349 e8660b28bfee
child 5364 be5aa681c122
--- a/tests/test-evolve-obshistory-split.t	Wed Apr 08 01:16:51 2020 +0800
+++ b/tests/test-evolve-obshistory-split.t	Fri May 08 20:24:22 2020 +0800
@@ -1,5 +1,4 @@
-This test file test the various messages when accessing obsolete
-revisions.
+Testing obslog and other commands accessing obsolete revisions.
 
 Global setup
 ============
@@ -103,33 +102,41 @@
 Check output on the client side
 -------------------------------
 
-Check that debugobshistory on split commit show both targets
-  $ hg obslog 471597cad322 --hidden --patch
+Check that obslog on split commit shows both targets
+  $ hg obslog 471597cad322 --hidden --patch --no-origin
   x  471597cad322 (1) A0
        split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
          note: testing split
          (No patch available, too many successors (2))
   
-  $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
+  $ hg obslog 471597cad322 --hidden --no-graph --no-origin -Tjson | python -m json.tool
   [
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "parent",
                       "content"
                   ],
-                  "note": "testing split",
-                  "operation": "split",
+                  "notes": [
+                      "testing split"
+                  ],
+                  "operations": [
+                      "split"
+                  ],
                   "succnodes": [
                       "337fec4d2edcf0e7a467e35f818234bc620068b5",
                       "f257fde29c7a847c9b607f6e958656d0df0fb15c"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "split"
               }
           ],
@@ -137,18 +144,79 @@
           "shortdescription": "A0"
       }
   ]
-Check that debugobshistory on the first successor after split show
-the revision plus the split one
+  $ hg obslog 471597cad322 --hidden --no-graph -Tjson | python -m json.tool
+  [
+      {
+          "markers": [],
+          "node": "471597cad322d1f659bb169751be9133dad92ef3",
+          "shortdescription": "A0"
+      }
+  ]
+Check that obslog on the first successor after split shows the revision plus
+the split one
   $ hg obslog 337fec4d2edc --patch
   o  337fec4d2edc (2) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      diff -r 471597cad322 -r 337fec4d2edc b
+  |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
+  |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  |      @@ -1,1 +0,0 @@
+  |      -43
+  |
   |
   x  471597cad322 (1) A0
-       split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-         note: testing split
-         (No patch available, too many successors (2))
+  
+With the all option, it should show all three changesets
+  $ hg obslog --all 337fec4d2edc --patch
+  o  337fec4d2edc (2) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      diff -r 471597cad322 -r 337fec4d2edc b
+  |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
+  |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  |      @@ -1,1 +0,0 @@
+  |      -43
+  |
+  |
+  | @  f257fde29c7a (3) A0
+  |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |        note: testing split
+  |        (No patch available, changesets rebased)
+  |
+  x  471597cad322 (1) A0
   
-With the all option, it should show the three changesets
-  $ hg obslog --all 337fec4d2edc --patch
+Check that obslog on the second successor after split shows the revision plus
+the split one
+  $ hg obslog f257fde29c7a --patch
+  @  f257fde29c7a (3) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      (No patch available, changesets rebased)
+  |
+  x  471597cad322 (1) A0
+  
+With the all option, it should show all three changesets
+  $ hg obslog f257fde29c7a --all --patch
+  o  337fec4d2edc (2) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      diff -r 471597cad322 -r 337fec4d2edc b
+  |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
+  |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  |      @@ -1,1 +0,0 @@
+  |      -43
+  |
+  |
+  | @  f257fde29c7a (3) A0
+  |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |        note: testing split
+  |        (No patch available, changesets rebased)
+  |
+  x  471597cad322 (1) A0
+  
+Obslog with all option should also works on the split commit
+  $ hg obslog -a 471597cad322 --hidden --patch --no-origin
   o  337fec4d2edc (2) A0
   |
   | @  f257fde29c7a (3) A0
@@ -158,18 +226,8 @@
          note: testing split
          (No patch available, too many successors (2))
   
-Check that debugobshistory on the second successor after split show
-the revision plus the split one
-  $ hg obslog f257fde29c7a --patch
-  @  f257fde29c7a (3) A0
-  |
-  x  471597cad322 (1) A0
-       split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-         note: testing split
-         (No patch available, too many successors (2))
-  
-With the all option, it should show the three changesets
-  $ hg obslog f257fde29c7a --all --patch
+Check that obslog on both successors after split shows a coherent graph
+  $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch --no-origin
   o  337fec4d2edc (2) A0
   |
   | @  f257fde29c7a (3) A0
@@ -179,28 +237,23 @@
          note: testing split
          (No patch available, too many successors (2))
   
-Obslog with all option all should also works on the split commit
-  $ hg obslog -a 471597cad322 --hidden --patch
+  $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
   o  337fec4d2edc (2) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      diff -r 471597cad322 -r 337fec4d2edc b
+  |      --- a/b	Thu Jan 01 00:00:00 1970 +0000
+  |      +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  |      @@ -1,1 +0,0 @@
+  |      -43
+  |
   |
   | @  f257fde29c7a (3) A0
-  |/
+  |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |        note: testing split
+  |        (No patch available, changesets rebased)
+  |
   x  471597cad322 (1) A0
-       split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-         note: testing split
-         (No patch available, too many successors (2))
-  
-Check that debugobshistory on both successors after split show
-a coherent graph
-  $ hg obslog 'f257fde29c7a+337fec4d2edc' --patch
-  o  337fec4d2edc (2) A0
-  |
-  | @  f257fde29c7a (3) A0
-  |/
-  x  471597cad322 (1) A0
-       split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-         note: testing split
-         (No patch available, too many successors (2))
   
   $ hg update 471597cad322
   abort: hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a!
@@ -216,7 +269,7 @@
 Check output on the server side
 -------------------------------
 
-  $ hg obslog -R $TESTTMP/server --patch tip
+  $ hg obslog -R $TESTTMP/server --patch tip --no-origin
   o  f257fde29c7a (2) A0
   |
   x  471597cad322
@@ -224,10 +277,10 @@
          note: testing split
          (No patch available, context is not local)
   
-  $ hg obslog -R $TESTTMP/server -f --patch tip
+  $ hg obslog -R $TESTTMP/server -f --patch tip --no-origin
   o  f257fde29c7a (2) A0
   
-  $ hg obslog -R $TESTTMP/server --all --patch tip
+  $ hg obslog -R $TESTTMP/server --all --patch tip --no-origin
   o  337fec4d2edc (1) A0
   |
   | o  f257fde29c7a (2) A0
@@ -237,12 +290,12 @@
          note: testing split
          (No patch available, context is not local)
   
-  $ hg obslog -R $TESTTMP/server --all -f --patch tip
+  $ hg obslog -R $TESTTMP/server --all -f --patch tip --no-origin
   o  337fec4d2edc (1) A0
   
   o  f257fde29c7a (2) A0
   
-  $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip
+  $ hg obslog -R $TESTTMP/server --no-graph --all --patch tip --no-origin
   f257fde29c7a (2) A0
   
   471597cad322
@@ -250,12 +303,58 @@
       note: testing split        
       (No patch available, context is not local)
   
+  337fec4d2edc (1) A0
+  
+  $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip --no-origin
+  f257fde29c7a (2) A0
+  
+  337fec4d2edc (1) A0
+  
 
+  $ hg obslog -R $TESTTMP/server --patch tip
+  o  f257fde29c7a (2) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      (No patch available, predecessor is unknown locally)
+  |
+  x  471597cad322
+  
+  $ hg obslog -R $TESTTMP/server -f --patch tip
+  o  f257fde29c7a (2) A0
+  
+  $ hg obslog -R $TESTTMP/server --all --patch tip
+  o  337fec4d2edc (1) A0
+  |    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      note: testing split
+  |      (No patch available, predecessor is unknown locally)
+  |
+  | o  f257fde29c7a (2) A0
+  |/     split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+  |        note: testing split
+  |        (No patch available, predecessor is unknown locally)
+  |
+  x  471597cad322
+  
+  $ hg obslog -R $TESTTMP/server --all -f --patch tip
+  o  337fec4d2edc (1) A0
+  
+  o  f257fde29c7a (2) A0
+  
+  $ hg obslog -R $TESTTMP/server --no-graph --all --patch tip
+  f257fde29c7a (2) A0
+    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+      note: testing split        
+      (No patch available, predecessor is unknown locally)
+  
+  471597cad322
+  
+  337fec4d2edc (1) A0
+    split(parent, content) from 471597cad322 using split by test (Thu Jan 01 00:00:00 1970 +0000)
+      note: testing split        
+      (No patch available, predecessor is unknown locally)
+  
   $ hg obslog -R $TESTTMP/server --no-graph -f --all --patch tip
   f257fde29c7a (2) A0
   
-  471597cad322
-    split(parent, content) as 337fec4d2edc, f257fde29c7a using split by test (Thu Jan 01 00:00:00 1970 +0000)
-      note: testing split        
-      (No patch available, context is not local)
+  337fec4d2edc (1) A0