tests/test-evolve-obshistory-amend-then-fold.t
branchmercurial-4.7
changeset 5367 cb5983c0287f
parent 5283 02cc51ca6795
parent 5349 e8660b28bfee
child 5368 844b1ad5b34b
--- a/tests/test-evolve-obshistory-amend-then-fold.t	Wed Apr 08 01:16:59 2020 +0800
+++ b/tests/test-evolve-obshistory-amend-then-fold.t	Fri May 08 22:18:15 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
 ============
@@ -80,8 +79,8 @@
 Actual test
 -----------
 
-Check that debugobshistory on head show a coherent graph
-  $ hg obslog eb5a0daa2192 --patch
+Check that obslog on head shows a coherent graph
+  $ hg obslog eb5a0daa2192 --patch --no-origin
   @    eb5a0daa2192 (4) C0
   |\
   x |  471f378eab4c (1) A0
@@ -114,8 +113,41 @@
          +B1
   
   
-Check that obslog on ROOT with all option show everything
-  $ hg obslog 1 --hidden --all --patch
+  $ hg obslog eb5a0daa2192 --patch
+  @    eb5a0daa2192 (4) C0
+  |\     rewritten(description, content) from 471f378eab4c using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |      diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
+  | |      --- a/changeset-description
+  | |      +++ b/changeset-description
+  | |      @@ -1,1 +1,1 @@
+  | |      -A0
+  | |      +C0
+  | |
+  | |      diff -r 471f378eab4c -r eb5a0daa2192 B0
+  | |      --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  | |      +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
+  | |      @@ -0,0 +1,1 @@
+  | |      +B0
+  | |
+  | |    rewritten(description, parent, content) from b7ea6d14e664 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |      (No patch available, changesets rebased)
+  | |
+  x |  471f378eab4c (1) A0
+   /
+  x  b7ea6d14e664 (3) B1
+  |    reworded(description) from 0dec01379d3b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
+  |      --- a/changeset-description
+  |      +++ b/changeset-description
+  |      @@ -1,1 +1,1 @@
+  |      -B0
+  |      +B1
+  |
+  |
+  x  0dec01379d3b (2) B0
+  
+Check that obslog on A0 with all option shows everything
+  $ hg obslog 1 --hidden --all --patch --no-origin
   @    eb5a0daa2192 (4) C0
   |\
   x |  471f378eab4c (1) A0
@@ -148,7 +180,40 @@
          +B1
   
   
-  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog 1 --hidden --all --patch
+  @    eb5a0daa2192 (4) C0
+  |\     rewritten(description, content) from 471f378eab4c using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |      diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
+  | |      --- a/changeset-description
+  | |      +++ b/changeset-description
+  | |      @@ -1,1 +1,1 @@
+  | |      -A0
+  | |      +C0
+  | |
+  | |      diff -r 471f378eab4c -r eb5a0daa2192 B0
+  | |      --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  | |      +++ b/B0	Thu Jan 01 00:00:00 1970 +0000
+  | |      @@ -0,0 +1,1 @@
+  | |      +B0
+  | |
+  | |    rewritten(description, parent, content) from b7ea6d14e664 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |      (No patch available, changesets rebased)
+  | |
+  x |  471f378eab4c (1) A0
+   /
+  x  b7ea6d14e664 (3) B1
+  |    reworded(description) from 0dec01379d3b using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+  |      diff -r 0dec01379d3b -r b7ea6d14e664 changeset-description
+  |      --- a/changeset-description
+  |      +++ b/changeset-description
+  |      @@ -1,1 +1,1 @@
+  |      -B0
+  |      +B1
+  |
+  |
+  x  0dec01379d3b (2) B0
+  
+  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
   [
       {
           "markers": [],
@@ -158,20 +223,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       *, (glob)
                       *, (glob)
                       "content"
                   ],
-                  "operation": "fold",
+                  "operations": [
+                      "fold"
+                  ],
                   "succnodes": [
                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -181,18 +252,24 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description"
                   ],
-                  "operation": "amend",
+                  "operations": [
+                      "amend"
+                  ],
                   "succnodes": [
                       "b7ea6d14e664bdc8922221f7992631b50da3fb07"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "reworded"
               }
           ],
@@ -202,22 +279,119 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "content"
+                  ],
+                  "operations": [
+                      "fold"
+                  ],
+                  "succnodes": [
+                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
+          "shortdescription": "A0"
+      }
+  ]
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  [
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "content"
                   ],
-                  "operation": "fold",
-                  "succnodes": [
-                      "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
+                  "operations": [
+                      "fold"
+                  ],
+                  "prednodes": [
+                      "471f378eab4c5e25f6c77f785b27c936efb22874"
+                  ],
+                  "users": [
+                      "test"
                   ],
-                  "user": "test",
+                  "verb": "rewritten"
+              },
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      *, (glob)
+                      *, (glob)
+                      "content"
+                  ],
+                  "operations": [
+                      "fold"
+                  ],
+                  "prednodes": [
+                      "b7ea6d14e664bdc8922221f7992631b50da3fb07"
+                  ],
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
+          "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
+          "shortdescription": "C0"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description"
+                  ],
+                  "operations": [
+                      "amend"
+                  ],
+                  "prednodes": [
+                      "0dec01379d3be6318c470ead31b1fe7ae7cb53d5"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "reworded"
+              }
+          ],
+          "node": "b7ea6d14e664bdc8922221f7992631b50da3fb07",
+          "shortdescription": "B1"
+      },
+      {
+          "markers": [],
+          "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
+          "shortdescription": "B0"
+      },
+      {
+          "markers": [],
           "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
           "shortdescription": "A0"
       }