tests/test-evolve-cycles.t
branchmercurial-4.6
changeset 5368 844b1ad5b34b
parent 5349 e8660b28bfee
--- a/tests/test-evolve-cycles.t	Wed Apr 08 01:17:01 2020 +0800
+++ b/tests/test-evolve-cycles.t	Fri May 08 22:50:09 2020 +0800
@@ -85,10 +85,43 @@
 Actual test
 -----------
 
-Check that debugobshistory never crash on a cycle
+Check that obslog never crashes on a cycle
 
   $ hg obslog "desc(A)" --hidden
   @  2a34000d3544 (1) A
+  |    rewritten(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+
+  $ hg obslog "desc(B)" --hidden
+  @  2a34000d3544 (1) A
+  |    rewritten(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+
+  $ hg obslog "desc(C)" --hidden
+  @  2a34000d3544 (1) A
+  |    rewritten(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  a8df460dbbfe (3) C
+  |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  c473644ee0e9 (2) B
+  |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+
+  $ hg obslog "desc(C)" --hidden --no-origin
+  @  2a34000d3544 (1) A
   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
   x  a8df460dbbfe (3) C
@@ -98,31 +131,20 @@
   |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
 
-  $ hg obslog "desc(B)" --hidden
+Check that all option doesn't crash on a cycle either
+
+  $ hg obslog "desc(C)" --hidden --all
   @  2a34000d3544 (1) A
-  |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |    rewritten(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
   x  a8df460dbbfe (3) C
-  |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
   x  c473644ee0e9 (2) B
-  |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
 
-  $ hg obslog "desc(C)" --hidden
-  @  2a34000d3544 (1) A
-  |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
-  |
-  x  a8df460dbbfe (3) C
-  |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
-  |
-  x  c473644ee0e9 (2) B
-  |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
-  |
-
-Check that all option don't crash on a cycle either
-
-  $ hg obslog "desc(C)" --hidden --all
+  $ hg obslog "desc(C)" --hidden --all --no-origin
   @  2a34000d3544 (1) A
   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
@@ -248,10 +270,31 @@
 Actual test
 -----------
 
-Check that debugobshistory never crash on a cycle
+Check that obslog never crashes on a cycle
 
   $ hg obslog "desc(D)" --hidden
   x  0da815c333f6 (5) E
+  |    rewritten(description, parent, content) from 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  @    868d2e0eb19c (4) D
+  |\     split(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |    rewritten(description, parent, content) from d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  | x  d9f908fde1a1 (6) F
+  | |    rewritten(description, parent, content) from 0da815c333f6 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  +---x  2a34000d3544 (1) A
+  | |      split(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  a8df460dbbfe (3) C
+  | |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  c473644ee0e9 (2) B
+  | |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+
+  $ hg obslog "desc(D)" --hidden --no-origin
+  x  0da815c333f6 (5) E
   |    rewritten(description, parent, content) as d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
   @    868d2e0eb19c (4) D
@@ -269,9 +312,32 @@
   x |  c473644ee0e9 (2) B
   | |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   | |
-Check that all option don't crash either on a cycle
+
+Check that all option doesn't crash on a cycle either
+
   $ hg obslog --all --hidden "desc(F)"
   x  0da815c333f6 (5) E
+  |    rewritten(description, parent, content) from 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  @    868d2e0eb19c (4) D
+  |\     split(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |    rewritten(description, parent, content) from d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  | x  d9f908fde1a1 (6) F
+  | |    rewritten(description, parent, content) from 0da815c333f6 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  +---x  2a34000d3544 (1) A
+  | |      split(description, parent, content) from a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  a8df460dbbfe (3) C
+  | |    rewritten(description, parent, content) from c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  c473644ee0e9 (2) B
+  | |    rewritten(description, parent, content) from 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+
+  $ hg obslog --all --hidden --no-origin "desc(F)"
+  x  0da815c333f6 (5) E
   |    rewritten(description, parent, content) as d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   |
   @    868d2e0eb19c (4) D
@@ -289,6 +355,7 @@
   x |  c473644ee0e9 (2) B
   | |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   | |
+
 Check the json output is valid in this case
 
   $ hg obslog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
@@ -296,20 +363,49 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
-                  "succnodes": [
-                      "0da815c333f6364b46c86b0a897c00eb617397b6"
+                  "operations": [
+                      "prune"
+                  ],
+                  "prednodes": [
+                      "a8df460dbbfe9ef0c1e5ab4fff02e9514672e379"
+                  ],
+                  "users": [
+                      "test"
                   ],
-                  "user": "test",
+                  "verb": "split"
+              },
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "prednodes": [
+                      "d9f908fde1a10ad198a462a3ec8b440bb397fc9c"
+                  ],
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -319,20 +415,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
-                  "succnodes": [
-                      "868d2e0eb19c2b55a2894d37e1c435c221384d48"
+                  "operations": [
+                      "prune"
                   ],
-                  "user": "test",
+                  "prednodes": [
+                      "0da815c333f6364b46c86b0a897c00eb617397b6"
+                  ],
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -342,20 +444,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
-                  "succnodes": [
-                      "d9f908fde1a10ad198a462a3ec8b440bb397fc9c"
+                  "operations": [
+                      "prune"
                   ],
-                  "user": "test",
+                  "prednodes": [
+                      "868d2e0eb19c2b55a2894d37e1c435c221384d48"
+                  ],
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -365,21 +473,205 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "prednodes": [
+                      "c473644ee0e988d7f537e31423831bbc409f12f7"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "a8df460dbbfe9ef0c1e5ab4fff02e9514672e379",
+          "shortdescription": "C"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "prednodes": [
+                      "2a34000d35446022104f7a091c06fe21ff2b5912"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "c473644ee0e988d7f537e31423831bbc409f12f7",
+          "shortdescription": "B"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
+                  "operations": [
+                      "prune"
+                  ],
+                  "prednodes": [
+                      "a8df460dbbfe9ef0c1e5ab4fff02e9514672e379"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "split"
+              }
+          ],
+          "node": "2a34000d35446022104f7a091c06fe21ff2b5912",
+          "shortdescription": "A"
+      }
+  ]
+
+  $ hg obslog "desc(D)" --hidden --no-graph --no-origin -Tjson | python -m json.tool
+  [
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "succnodes": [
+                      "0da815c333f6364b46c86b0a897c00eb617397b6"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "868d2e0eb19c2b55a2894d37e1c435c221384d48",
+          "shortdescription": "D"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "succnodes": [
+                      "868d2e0eb19c2b55a2894d37e1c435c221384d48"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "d9f908fde1a10ad198a462a3ec8b440bb397fc9c",
+          "shortdescription": "F"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
+                  "succnodes": [
+                      "d9f908fde1a10ad198a462a3ec8b440bb397fc9c"
+                  ],
+                  "users": [
+                      "test"
+                  ],
+                  "verb": "rewritten"
+              }
+          ],
+          "node": "0da815c333f6364b46c86b0a897c00eb617397b6",
+          "shortdescription": "E"
+      },
+      {
+          "markers": [
+              {
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
+                  ],
+                  "effects": [
+                      "description",
+                      "parent",
+                      "content"
+                  ],
+                  "operations": [
+                      "prune"
+                  ],
                   "succnodes": [
                       "2a34000d35446022104f7a091c06fe21ff2b5912",
                       "868d2e0eb19c2b55a2894d37e1c435c221384d48"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "split"
               }
           ],
@@ -389,20 +681,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
+                  "operations": [
+                      "prune"
+                  ],
                   "succnodes": [
                       "a8df460dbbfe9ef0c1e5ab4fff02e9514672e379"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -412,20 +710,26 @@
       {
           "markers": [
               {
-                  "date": [
-                      *, (glob)
-                      0
+                  "dates": [
+                      [
+                          *, (glob)
+                          0
+                      ]
                   ],
                   "effects": [
                       "description",
                       "parent",
                       "content"
                   ],
-                  "operation": "prune",
+                  "operations": [
+                      "prune"
+                  ],
                   "succnodes": [
                       "c473644ee0e988d7f537e31423831bbc409f12f7"
                   ],
-                  "user": "test",
+                  "users": [
+                      "test"
+                  ],
                   "verb": "rewritten"
               }
           ],
@@ -433,4 +737,3 @@
           "shortdescription": "A"
       }
   ]
-