tests/test-evolve-cycles.t
branchmercurial-4.3
changeset 4228 9a384c7a3b6a
parent 3716 e5ba6531503e
equal deleted inserted replaced
4227:4684e6db4480 4228:9a384c7a3b6a
    48      summary:     ROOT
    48      summary:     ROOT
    49   
    49   
    50 Create a cycle
    50 Create a cycle
    51   $ hg prune -s "desc(B)" "desc(A)"
    51   $ hg prune -s "desc(B)" "desc(A)"
    52   1 changesets pruned
    52   1 changesets pruned
    53   2 new orphan changesets
    53   2 new unstable changesets
    54   $ hg prune -s "desc(C)" "desc(B)"
    54   $ hg prune -s "desc(C)" "desc(B)"
    55   1 changesets pruned
    55   1 changesets pruned
    56   $ hg prune -s "desc(A)" "desc(C)"
    56   $ hg prune -s "desc(A)" "desc(C)"
    57   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    57   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    58   working directory now at 2a34000d3544
    58   working directory now at 2a34000d3544
    60   $ hg log --hidden -G
    60   $ hg log --hidden -G
    61   x  changeset:   3:a8df460dbbfe
    61   x  changeset:   3:a8df460dbbfe
    62   |  tag:         tip
    62   |  tag:         tip
    63   |  user:        test
    63   |  user:        test
    64   |  date:        Thu Jan 01 00:00:00 1970 +0000
    64   |  date:        Thu Jan 01 00:00:00 1970 +0000
    65   |  obsolete:    rewritten using prune as 1:2a34000d3544
    65   |  obsolete:    rewritten as 2a34000d3544
    66   |  summary:     C
    66   |  summary:     C
    67   |
    67   |
    68   x  changeset:   2:c473644ee0e9
    68   x  changeset:   2:c473644ee0e9
    69   |  user:        test
    69   |  user:        test
    70   |  date:        Thu Jan 01 00:00:00 1970 +0000
    70   |  date:        Thu Jan 01 00:00:00 1970 +0000
    71   |  obsolete:    rewritten using prune as 3:a8df460dbbfe
    71   |  obsolete:    rewritten as a8df460dbbfe
    72   |  summary:     B
    72   |  summary:     B
    73   |
    73   |
    74   @  changeset:   1:2a34000d3544
    74   @  changeset:   1:2a34000d3544
    75   |  user:        test
    75   |  user:        test
    76   |  date:        Thu Jan 01 00:00:00 1970 +0000
    76   |  date:        Thu Jan 01 00:00:00 1970 +0000
    77   |  obsolete:    rewritten using prune as 2:c473644ee0e9
    77   |  obsolete:    rewritten as c473644ee0e9
    78   |  summary:     A
    78   |  summary:     A
    79   |
    79   |
    80   o  changeset:   0:ea207398892e
    80   o  changeset:   0:ea207398892e
    81      user:        test
    81      user:        test
    82      date:        Thu Jan 01 00:00:00 1970 +0000
    82      date:        Thu Jan 01 00:00:00 1970 +0000
    87 
    87 
    88 Check that debugobshistory never crash on a cycle
    88 Check that debugobshistory never crash on a cycle
    89 
    89 
    90   $ hg obslog "desc(A)" --hidden
    90   $ hg obslog "desc(A)" --hidden
    91   @  2a34000d3544 (1) A
    91   @  2a34000d3544 (1) A
    92   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
    92   |    rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
    93   |
    93   |
    94   x  a8df460dbbfe (3) C
    94   x  a8df460dbbfe (3) C
    95   |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
    95   |    rewritten(description, parent, content) as 2a34000d3544 by test (Thu Jan 01 00:00:00 1970 +0000)
    96   |
    96   |
    97   x  c473644ee0e9 (2) B
    97   x  c473644ee0e9 (2) B
    98   |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
    98   |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
    99   |
    99   |
   100 
   100 
   101   $ hg obslog "desc(B)" --hidden
   101   $ hg obslog "desc(B)" --hidden
   102   @  2a34000d3544 (1) A
   102   @  2a34000d3544 (1) A
   103   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   103   |    rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
   104   |
   104   |
   105   x  a8df460dbbfe (3) C
   105   x  a8df460dbbfe (3) C
   106   |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   106   |    rewritten(description, parent, content) as 2a34000d3544 by test (Thu Jan 01 00:00:00 1970 +0000)
   107   |
   107   |
   108   x  c473644ee0e9 (2) B
   108   x  c473644ee0e9 (2) B
   109   |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   109   |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
   110   |
   110   |
   111 
   111 
   112   $ hg obslog "desc(C)" --hidden
   112   $ hg obslog "desc(C)" --hidden
   113   @  2a34000d3544 (1) A
   113   @  2a34000d3544 (1) A
   114   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   114   |    rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
   115   |
   115   |
   116   x  a8df460dbbfe (3) C
   116   x  a8df460dbbfe (3) C
   117   |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   117   |    rewritten(description, parent, content) as 2a34000d3544 by test (Thu Jan 01 00:00:00 1970 +0000)
   118   |
   118   |
   119   x  c473644ee0e9 (2) B
   119   x  c473644ee0e9 (2) B
   120   |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   120   |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
   121   |
   121   |
   122 
   122 
   123 Check that all option don't crash on a cycle either
   123 Check that all option don't crash on a cycle either
   124 
   124 
   125   $ hg obslog "desc(C)" --hidden --all
   125   $ hg obslog "desc(C)" --hidden --all
   126   @  2a34000d3544 (1) A
   126   @  2a34000d3544 (1) A
   127   |    rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   127   |    rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
   128   |
   128   |
   129   x  a8df460dbbfe (3) C
   129   x  a8df460dbbfe (3) C
   130   |    rewritten(description, parent, content) as 2a34000d3544 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   130   |    rewritten(description, parent, content) as 2a34000d3544 by test (Thu Jan 01 00:00:00 1970 +0000)
   131   |
   131   |
   132   x  c473644ee0e9 (2) B
   132   x  c473644ee0e9 (2) B
   133   |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   133   |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
   134   |
   134   |
   135 
   135 
   136 Test with multiple cyles
   136 Test with multiple cyles
   137 ========================
   137 ========================
   138 
   138 
   186      summary:     ROOT
   186      summary:     ROOT
   187   
   187   
   188 Create a first cycle
   188 Create a first cycle
   189   $ hg prune -s "desc(B)" "desc(A)"
   189   $ hg prune -s "desc(B)" "desc(A)"
   190   1 changesets pruned
   190   1 changesets pruned
   191   5 new orphan changesets
   191   5 new unstable changesets
   192   $ hg prune -s "desc(C)" "desc(B)"
   192   $ hg prune -s "desc(C)" "desc(B)"
   193   1 changesets pruned
   193   1 changesets pruned
   194   $ hg prune --split -s "desc(A)" -s "desc(D)" "desc(C)"
   194   $ hg prune --split -s "desc(A)" -s "desc(D)" "desc(C)"
   195   1 changesets pruned
   195   1 changesets pruned
   196 And create a second one
   196 And create a second one
   205   $ hg log --hidden -G
   205   $ hg log --hidden -G
   206   x  changeset:   6:d9f908fde1a1
   206   x  changeset:   6:d9f908fde1a1
   207   |  tag:         tip
   207   |  tag:         tip
   208   |  user:        test
   208   |  user:        test
   209   |  date:        Thu Jan 01 00:00:00 1970 +0000
   209   |  date:        Thu Jan 01 00:00:00 1970 +0000
   210   |  obsolete:    rewritten using prune as 4:868d2e0eb19c
   210   |  obsolete:    rewritten as 868d2e0eb19c
   211   |  summary:     F
   211   |  summary:     F
   212   |
   212   |
   213   x  changeset:   5:0da815c333f6
   213   x  changeset:   5:0da815c333f6
   214   |  user:        test
   214   |  user:        test
   215   |  date:        Thu Jan 01 00:00:00 1970 +0000
   215   |  date:        Thu Jan 01 00:00:00 1970 +0000
   216   |  obsolete:    rewritten using prune as 6:d9f908fde1a1
   216   |  obsolete:    rewritten as d9f908fde1a1
   217   |  summary:     E
   217   |  summary:     E
   218   |
   218   |
   219   @  changeset:   4:868d2e0eb19c
   219   @  changeset:   4:868d2e0eb19c
   220   |  user:        test
   220   |  user:        test
   221   |  date:        Thu Jan 01 00:00:00 1970 +0000
   221   |  date:        Thu Jan 01 00:00:00 1970 +0000
   222   |  obsolete:    rewritten using prune as 5:0da815c333f6
   222   |  obsolete:    rewritten as 0da815c333f6
   223   |  summary:     D
   223   |  summary:     D
   224   |
   224   |
   225   x  changeset:   3:a8df460dbbfe
   225   x  changeset:   3:a8df460dbbfe
   226   |  user:        test
   226   |  user:        test
   227   |  date:        Thu Jan 01 00:00:00 1970 +0000
   227   |  date:        Thu Jan 01 00:00:00 1970 +0000
   228   |  obsolete:    split using prune as 1:2a34000d3544, 4:868d2e0eb19c
   228   |  obsolete:    split as 2a34000d3544, 868d2e0eb19c
   229   |  summary:     C
   229   |  summary:     C
   230   |
   230   |
   231   x  changeset:   2:c473644ee0e9
   231   x  changeset:   2:c473644ee0e9
   232   |  user:        test
   232   |  user:        test
   233   |  date:        Thu Jan 01 00:00:00 1970 +0000
   233   |  date:        Thu Jan 01 00:00:00 1970 +0000
   234   |  obsolete:    rewritten using prune as 3:a8df460dbbfe
   234   |  obsolete:    rewritten as a8df460dbbfe
   235   |  summary:     B
   235   |  summary:     B
   236   |
   236   |
   237   x  changeset:   1:2a34000d3544
   237   x  changeset:   1:2a34000d3544
   238   |  user:        test
   238   |  user:        test
   239   |  date:        Thu Jan 01 00:00:00 1970 +0000
   239   |  date:        Thu Jan 01 00:00:00 1970 +0000
   240   |  obsolete:    rewritten using prune as 2:c473644ee0e9
   240   |  obsolete:    rewritten as c473644ee0e9
   241   |  summary:     A
   241   |  summary:     A
   242   |
   242   |
   243   o  changeset:   0:ea207398892e
   243   o  changeset:   0:ea207398892e
   244      user:        test
   244      user:        test
   245      date:        Thu Jan 01 00:00:00 1970 +0000
   245      date:        Thu Jan 01 00:00:00 1970 +0000
   250 
   250 
   251 Check that debugobshistory never crash on a cycle
   251 Check that debugobshistory never crash on a cycle
   252 
   252 
   253   $ hg obslog "desc(D)" --hidden
   253   $ hg obslog "desc(D)" --hidden
   254   x  0da815c333f6 (5) E
   254   x  0da815c333f6 (5) E
   255   |    rewritten(description, parent, content) as d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   255   |    rewritten(description, parent, content) as d9f908fde1a1 by test (Thu Jan 01 00:00:00 1970 +0000)
   256   |
   256   |
   257   @    868d2e0eb19c (4) D
   257   @    868d2e0eb19c (4) D
   258   |\     rewritten(description, parent, content) as 0da815c333f6 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   258   |\     rewritten(description, parent, content) as 0da815c333f6 by test (Thu Jan 01 00:00:00 1970 +0000)
   259   | |
   259   | |
   260   | x  d9f908fde1a1 (6) F
   260   | x  d9f908fde1a1 (6) F
   261   | |    rewritten(description, parent, content) as 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   261   | |    rewritten(description, parent, content) as 868d2e0eb19c by test (Thu Jan 01 00:00:00 1970 +0000)
   262   | |
   262   | |
   263   +---x  2a34000d3544 (1) A
   263   +---x  2a34000d3544 (1) A
   264   | |      rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   264   | |      rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
   265   | |
   265   | |
   266   x |  a8df460dbbfe (3) C
   266   x |  a8df460dbbfe (3) C
   267   | |    rewritten(description, parent, content) as 2a34000d3544, 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   267   | |    rewritten(description, parent, content) as 2a34000d3544, 868d2e0eb19c by test (Thu Jan 01 00:00:00 1970 +0000)
   268   | |
   268   | |
   269   x |  c473644ee0e9 (2) B
   269   x |  c473644ee0e9 (2) B
   270   | |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   270   | |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
   271   | |
   271   | |
   272 Check that all option don't crash either on a cycle
   272 Check that all option don't crash either on a cycle
   273   $ hg obslog --all --hidden "desc(F)"
   273   $ hg obslog --all --hidden "desc(F)"
   274   x  0da815c333f6 (5) E
   274   x  0da815c333f6 (5) E
   275   |    rewritten(description, parent, content) as d9f908fde1a1 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   275   |    rewritten(description, parent, content) as d9f908fde1a1 by test (Thu Jan 01 00:00:00 1970 +0000)
   276   |
   276   |
   277   @    868d2e0eb19c (4) D
   277   @    868d2e0eb19c (4) D
   278   |\     rewritten(description, parent, content) as 0da815c333f6 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   278   |\     rewritten(description, parent, content) as 0da815c333f6 by test (Thu Jan 01 00:00:00 1970 +0000)
   279   | |
   279   | |
   280   | x  d9f908fde1a1 (6) F
   280   | x  d9f908fde1a1 (6) F
   281   | |    rewritten(description, parent, content) as 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   281   | |    rewritten(description, parent, content) as 868d2e0eb19c by test (Thu Jan 01 00:00:00 1970 +0000)
   282   | |
   282   | |
   283   +---x  2a34000d3544 (1) A
   283   +---x  2a34000d3544 (1) A
   284   | |      rewritten(description, parent, content) as c473644ee0e9 using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   284   | |      rewritten(description, parent, content) as c473644ee0e9 by test (Thu Jan 01 00:00:00 1970 +0000)
   285   | |
   285   | |
   286   x |  a8df460dbbfe (3) C
   286   x |  a8df460dbbfe (3) C
   287   | |    rewritten(description, parent, content) as 2a34000d3544, 868d2e0eb19c using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   287   | |    rewritten(description, parent, content) as 2a34000d3544, 868d2e0eb19c by test (Thu Jan 01 00:00:00 1970 +0000)
   288   | |
   288   | |
   289   x |  c473644ee0e9 (2) B
   289   x |  c473644ee0e9 (2) B
   290   | |    rewritten(description, parent, content) as a8df460dbbfe using prune by test (Thu Jan 01 00:00:00 1970 +0000)
   290   | |    rewritten(description, parent, content) as a8df460dbbfe by test (Thu Jan 01 00:00:00 1970 +0000)
   291   | |
   291   | |
   292 Check the json output is valid in this case
   292 Check the json output is valid in this case
   293 
   293 
   294   $ hg obslog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
   294   $ hg obslog "desc(D)" --hidden --no-graph -Tjson | python -m json.tool
   295   [
   295   [
   299                   "date": [
   299                   "date": [
   300                       *, (glob)
   300                       *, (glob)
   301                       0
   301                       0
   302                   ],
   302                   ],
   303                   "effect": [
   303                   "effect": [
   304                       "description",
   304                       *, (glob)
   305                       "parent",
   305                       *, (glob)
   306                       "content"
   306                       "content"
   307                   ],
   307                   ],
   308                   "operation": "prune",
       
   309                   "succnodes": [
   308                   "succnodes": [
   310                       "0da815c333f6"
   309                       "0da815c333f6"
   311                   ],
   310                   ],
   312                   "user": "test",
   311                   "user": "test",
   313                   "verb": "rewritten"
   312                   "verb": "rewritten"
   323                   "date": [
   322                   "date": [
   324                       *, (glob)
   323                       *, (glob)
   325                       0
   324                       0
   326                   ],
   325                   ],
   327                   "effect": [
   326                   "effect": [
   328                       "description",
   327                       *, (glob)
   329                       "parent",
   328                       *, (glob)
   330                       "content"
   329                       "content"
   331                   ],
   330                   ],
   332                   "operation": "prune",
       
   333                   "succnodes": [
   331                   "succnodes": [
   334                       "868d2e0eb19c"
   332                       "868d2e0eb19c"
   335                   ],
   333                   ],
   336                   "user": "test",
   334                   "user": "test",
   337                   "verb": "rewritten"
   335                   "verb": "rewritten"
   343       },
   341       },
   344       {
   342       {
   345           "markers": [
   343           "markers": [
   346               {
   344               {
   347                   "date": [
   345                   "date": [
   348                       *, (glob)
   346                       0.0,
   349                       0
   347                       0
   350                   ],
   348                   ],
   351                   "effect": [
   349                   "effect": [
   352                       "description",
   350                       "description",
   353                       "parent",
   351                       "parent",
   354                       "content"
   352                       "content"
   355                   ],
   353                   ],
   356                   "operation": "prune",
       
   357                   "succnodes": [
   354                   "succnodes": [
   358                       "d9f908fde1a1"
   355                       "d9f908fde1a1"
   359                   ],
   356                   ],
   360                   "user": "test",
   357                   "user": "test",
   361                   "verb": "rewritten"
   358                   "verb": "rewritten"
   367       },
   364       },
   368       {
   365       {
   369           "markers": [
   366           "markers": [
   370               {
   367               {
   371                   "date": [
   368                   "date": [
   372                       *, (glob)
   369                       0.0,
   373                       0
   370                       0
   374                   ],
   371                   ],
   375                   "effect": [
   372                   "effect": [
   376                       "description",
   373                       "description",
   377                       "parent",
   374                       "parent",
   378                       "content"
   375                       "content"
   379                   ],
   376                   ],
   380                   "operation": "prune",
       
   381                   "succnodes": [
   377                   "succnodes": [
   382                       "2a34000d3544",
   378                       "2a34000d3544",
   383                       "868d2e0eb19c"
   379                       "868d2e0eb19c"
   384                   ],
   380                   ],
   385                   "user": "test",
   381                   "user": "test",
   392       },
   388       },
   393       {
   389       {
   394           "markers": [
   390           "markers": [
   395               {
   391               {
   396                   "date": [
   392                   "date": [
   397                       *, (glob)
   393                       0.0,
   398                       0
   394                       0
   399                   ],
   395                   ],
   400                   "effect": [
   396                   "effect": [
   401                       "description",
   397                       "description",
   402                       "parent",
   398                       "parent",
   403                       "content"
   399                       "content"
   404                   ],
   400                   ],
   405                   "operation": "prune",
       
   406                   "succnodes": [
   401                   "succnodes": [
   407                       "a8df460dbbfe"
   402                       "a8df460dbbfe"
   408                   ],
   403                   ],
   409                   "user": "test",
   404                   "user": "test",
   410                   "verb": "rewritten"
   405                   "verb": "rewritten"
   416       },
   411       },
   417       {
   412       {
   418           "markers": [
   413           "markers": [
   419               {
   414               {
   420                   "date": [
   415                   "date": [
   421                       *, (glob)
   416                       0.0,
   422                       0
   417                       0
   423                   ],
   418                   ],
   424                   "effect": [
   419                   "effect": [
   425                       "description",
   420                       "description",
   426                       "parent",
   421                       "parent",
   427                       "content"
   422                       "content"
   428                   ],
   423                   ],
   429                   "operation": "prune",
       
   430                   "succnodes": [
   424                   "succnodes": [
   431                       "c473644ee0e9"
   425                       "c473644ee0e9"
   432                   ],
   426                   ],
   433                   "user": "test",
   427                   "user": "test",
   434                   "verb": "rewritten"
   428                   "verb": "rewritten"