tests/test-evolve-obshistory-fold.t
branchmercurial-4.7
changeset 5367 cb5983c0287f
parent 5162 a7fb433faab6
parent 5349 e8660b28bfee
child 5368 844b1ad5b34b
--- a/tests/test-evolve-obshistory-fold.t	Wed Apr 08 01:16:59 2020 +0800
+++ b/tests/test-evolve-obshistory-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
 ============
@@ -69,9 +68,9 @@
 Check output of the client
 --------------------------
 
-Check that debugobshistory on the first folded revision show only
-the revision with the target
-  $ hg obslog --hidden 471f378eab4c --patch
+Check that obslog on the first folded revision shows only the revision with the
+target
+  $ hg obslog --hidden 471f378eab4c --patch --no-origin
   x  471f378eab4c (1) A0
        rewritten(description, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
          diff -r 471f378eab4c -r eb5a0daa2192 changeset-description
@@ -89,7 +88,7 @@
   
   
 Check that with all option, all changesets are shown
-  $ hg obslog --hidden --all 471f378eab4c --patch
+  $ hg obslog --hidden --all 471f378eab4c --patch --no-origin
   @    eb5a0daa2192 (3) C0
   |\
   x |  0dec01379d3b (2) B0
@@ -112,15 +111,39 @@
          +B0
   
   
-Check that debugobshistory on the second folded revision show only
-the revision with the target
-  $ hg obslog --hidden 0dec01379d3b --patch
+Check that obslog on the second folded revision shows only the revision with
+the target
+  $ hg obslog --hidden 0dec01379d3b --patch --no-origin
   x  0dec01379d3b (2) B0
        rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
          (No patch available, changesets rebased)
   
 Check that with all option, all changesets are shown
-  $ hg obslog --hidden --all 0dec01379d3b --patch
+  $ hg obslog --hidden --all 0dec01379d3b --patch --no-origin
+  @    eb5a0daa2192 (3) C0
+  |\
+  x |  0dec01379d3b (2) B0
+   /     rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  |        (No patch available, changesets rebased)
+  |
+  x  471f378eab4c (1) A0
+       rewritten(description, content) as eb5a0daa2192 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
+  
+  
+Check that obslog on the successor revision shows a coherent graph
+  $ hg obslog eb5a0daa2192 --patch --no-origin
   @    eb5a0daa2192 (3) C0
   |\
   x |  0dec01379d3b (2) B0
@@ -143,32 +166,7 @@
          +B0
   
   
-Check that debugobshistory on the successor revision show a coherent
-graph
-  $ hg obslog eb5a0daa2192 --patch
-  @    eb5a0daa2192 (3) C0
-  |\
-  x |  0dec01379d3b (2) B0
-   /     rewritten(description, parent, content) as eb5a0daa2192 using fold by test (Thu Jan 01 00:00:00 1970 +0000)
-  |        (No patch available, changesets rebased)
-  |
-  x  471f378eab4c (1) A0
-       rewritten(description, content) as eb5a0daa2192 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
-  
-  
-  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  $ hg obslog eb5a0daa2192 --no-graph --no-origin -Tjson | python -m json.tool
   [
       {
           "markers": [],
@@ -178,19 +176,25 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "content"
                   ],
-                  "operation": "fold",
+                  "operations": [
+                      "fold"
+                  ],
                   "succnodes": [
                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -200,20 +204,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "fold",
+                  "operations": [
+                      "fold"
+                  ],
                   "succnodes": [
                       "eb5a0daa21923bbf8caeb2c42085b9e463861fd0"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -221,6 +231,94 @@
           "shortdescription": "B0"
       }
   ]
+
+  $ hg obslog eb5a0daa2192 --patch
+  @    eb5a0daa2192 (3) C0
+  |\     rewritten(description, parent, content) from 0dec01379d3b using fold by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |      (No patch available, changesets rebased)
+  | |    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
+  | |
+  | |
+  x |  0dec01379d3b (2) B0
+   /
+  x  471f378eab4c (1) A0
+  
+  $ hg obslog eb5a0daa2192 --no-graph -Tjson | python -m json.tool
+  [
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "fold"
+                  ],
+                  "prednodes": [
+                      "0dec01379d3be6318c470ead31b1fe7ae7cb53d5"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              },
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "content"
+                  ],
+                  "operations": [
+                      "fold"
+                  ],
+                  "prednodes": [
+                      "471f378eab4c5e25f6c77f785b27c936efb22874"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "eb5a0daa21923bbf8caeb2c42085b9e463861fd0",
+          "shortdescription": "C0"
+      },
+      {
+          "markers": [],
+          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
+          "shortdescription": "A0"
+      },
+      {
+          "markers": [],
+          "node": "0dec01379d3be6318c470ead31b1fe7ae7cb53d5",
+          "shortdescription": "B0"
+      }
+  ]
   $ hg update 471f378eab4c
   abort: hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192!
   (use --hidden to access hidden revisions)
@@ -245,7 +343,7 @@
 Check output of the server
 --------------------------
 
-  $ hg obslog -R $TESTTMP/server --patch tip --all
+  $ hg obslog -R $TESTTMP/server --all --patch tip --no-origin
   o    eb5a0daa2192 (2) C0
   |\
   x |  0dec01379d3b
@@ -268,11 +366,11 @@
          +B0
   
   
-  $ hg obslog -R $TESTTMP/server -f --all --patch tip
+  $ hg obslog -R $TESTTMP/server -f --all --patch tip --no-origin
   o  eb5a0daa2192 (2) C0
   |
   x  471f378eab4c (1) A0
-       rewritten(description, content) as eb5a0daa2192 using fold by test (at Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(description, content) as eb5a0daa2192 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
@@ -288,7 +386,7 @@
   
   
 
-  $ hg obslog -R $TESTTMP/server --all --patch 471f378eab4c --hidden
+  $ hg obslog -R $TESTTMP/server --all --patch 471f378eab4c --no-origin --hidden
   o    eb5a0daa2192 (2) C0
   |\
   x |  0dec01379d3b
@@ -311,11 +409,11 @@
          +B0
   
   
-  $ hg obslog -R $TESTTMP/server -f --all --patch 471f378eab4c --hidden
+  $ hg obslog -R $TESTTMP/server -f --all --patch 471f378eab4c --no-origin --hidden
   o  eb5a0daa2192 (2) C0
   |
   x  471f378eab4c (1) A0
-       rewritten(description, content) as eb5a0daa2192 using fold by test (at Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(description, content) as eb5a0daa2192 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