tests/test-evolve-abort-orphan.t
branchmercurial-4.3
changeset 4174 e07e764c0f48
parent 4002 21eab0a99841
parent 4173 e268f7fd7839
equal deleted inserted replaced
4173:e268f7fd7839 4174:e07e764c0f48
    76   [3] added c
    76   [3] added c
    77 
    77 
    78   $ echo babar > d
    78   $ echo babar > d
    79   $ hg add d
    79   $ hg add d
    80   $ hg amend
    80   $ hg amend
    81   1 new orphan changesets
    81   1 new unstable changesets
    82 
    82 
    83   $ hg evolve --all
    83   $ hg evolve --all
    84   move:[4] added d
    84   move:[4] added d
    85   atop:[5] added c
    85   atop:[6] added c
    86   merging d
    86   merging d
    87   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
    87   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
    88   fix conflicts and see `hg help evolve.interrupted`
    88   fix conflicts and see `hg help evolve.interrupted`
    89   [1]
    89   [1]
    90 
    90 
    91   $ hg parents
    91   $ hg parents
    92   changeset:   5:e93a9161a274
    92   changeset:   6:e93a9161a274
    93   tag:         tip
    93   tag:         tip
    94   parent:      2:b1661037fa25
    94   parent:      2:b1661037fa25
    95   user:        test
    95   user:        test
    96   date:        Thu Jan 01 00:00:00 1970 +0000
    96   date:        Thu Jan 01 00:00:00 1970 +0000
    97   summary:     added c
    97   summary:     added c
    98   
    98   
    99   changeset:   4:c41c793e0ef1
    99   changeset:   4:c41c793e0ef1
   100   user:        test
   100   user:        test
   101   date:        Thu Jan 01 00:00:00 1970 +0000
   101   date:        Thu Jan 01 00:00:00 1970 +0000
   102   instability: orphan
   102   trouble:     unstable
   103   summary:     added d
   103   summary:     added d
   104   
   104   
   105 
   105 
   106   $ hg evolve --abort
   106   $ hg evolve --abort
   107   evolve aborted
   107   evolve aborted
   108   working directory is now at e93a9161a274
   108   working directory is now at e93a9161a274
   109 
   109 
   110   $ hg glog
   110   $ hg glog
   111   @  5:e93a9161a274 added c
   111   @  6:e93a9161a274 added c
   112   |   () draft
   112   |   () draft
   113   | o  4:c41c793e0ef1 added d
   113   | o  4:c41c793e0ef1 added d
   114   | |   () draft
   114   | |   () draft
   115   | x  3:ca1b80f7960a added c
   115   | x  3:ca1b80f7960a added c
   116   |/    () draft
   116   |/    () draft
   127 
   127 
   128 cleaning up things for next testing
   128 cleaning up things for next testing
   129 
   129 
   130   $ hg evolve --all
   130   $ hg evolve --all
   131   move:[4] added d
   131   move:[4] added d
   132   atop:[5] added c
   132   atop:[6] added c
   133   merging d
   133   merging d
   134   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
   134   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
   135   fix conflicts and see `hg help evolve.interrupted`
   135   fix conflicts and see `hg help evolve.interrupted`
   136   [1]
   136   [1]
   137   $ echo foo > d
   137   $ echo foo > d
   149 =======================================================
   149 =======================================================
   150 
   150 
   151   $ echo bar > c
   151   $ echo bar > c
   152   $ hg add c
   152   $ hg add c
   153   $ hg amend
   153   $ hg amend
   154   3 new orphan changesets
   154   3 new unstable changesets
   155 
   155 
   156   $ hg evolve --all
   156   $ hg evolve --all
   157   move:[2] added b
   157   move:[2] added b
   158   atop:[7] added a
   158   atop:[9] added a
   159   move:[5] added c
   159   move:[6] added c
   160   merging c
   160   merging c
   161   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   161   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   162   fix conflicts and see `hg help evolve.interrupted`
   162   fix conflicts and see `hg help evolve.interrupted`
   163   [1]
   163   [1]
   164 
   164 
   165 testing that interrupted evolve shows up in morestatus
   165 testing that interrupted evolve shows up in morestatus
   166   $ hg status -v
   166   $ hg status -v
   167   M c
   167   M c
   168   A d
   168   A d
   169   # The repository is in an unfinished *evolve* state.
   169 
   170   
   170   $ hg glog
   171   # Unresolved merge conflicts:
   171   @  10:0c41ec482070 added b
   172   # 
   172   |   () draft
   173   #     c
   173   o  9:125af0ed8cae added a
   174   # 
   174   |   () draft
   175   # To mark files as resolved:  hg resolve --mark FILE
   175   | o  7:e83de241f751 added d
   176   
   176   | |   () draft
   177   # To continue:    hg evolve --continue
   177   | @  6:e93a9161a274 added c
   178   # To abort:       hg evolve --abort
       
   179   # To stop:        hg evolve --stop
       
   180   # (also see `hg help evolve.interrupted`)
       
   181   
       
   182 
       
   183   $ hg glog
       
   184   @  8:0c41ec482070 added b
       
   185   |   () draft
       
   186   o  7:125af0ed8cae added a
       
   187   |   () draft
       
   188   | o  6:e83de241f751 added d
       
   189   | |   () draft
       
   190   | @  5:e93a9161a274 added c
       
   191   | |   () draft
   178   | |   () draft
   192   | x  2:b1661037fa25 added b
   179   | x  2:b1661037fa25 added b
   193   | |   () draft
   180   | |   () draft
   194   | x  1:c7586e2a9264 added a
   181   | x  1:c7586e2a9264 added a
   195   |/    () draft
   182   |/    () draft
   199   $ hg evolve --abort
   186   $ hg evolve --abort
   200   evolve aborted
   187   evolve aborted
   201   working directory is now at 125af0ed8cae
   188   working directory is now at 125af0ed8cae
   202 
   189 
   203   $ hg glog
   190   $ hg glog
   204   @  7:125af0ed8cae added a
   191   @  9:125af0ed8cae added a
   205   |   () draft
   192   |   () draft
   206   | o  6:e83de241f751 added d
   193   | o  7:e83de241f751 added d
   207   | |   () draft
   194   | |   () draft
   208   | o  5:e93a9161a274 added c
   195   | o  6:e93a9161a274 added c
   209   | |   () draft
   196   | |   () draft
   210   | o  2:b1661037fa25 added b
   197   | o  2:b1661037fa25 added b
   211   | |   () draft
   198   | |   () draft
   212   | x  1:c7586e2a9264 added a
   199   | x  1:c7586e2a9264 added a
   213   |/    () draft
   200   |/    () draft
   256   $ hg prev
   243   $ hg prev
   257   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   244   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   258   [1] added a
   245   [1] added a
   259   $ echo aa > a
   246   $ echo aa > a
   260   $ hg amend
   247   $ hg amend
   261   5 new orphan changesets
   248   5 new unstable changesets
   262 
   249 
   263   $ hg evolve --all
   250   $ hg evolve --all
   264   move:[2] added b
   251   move:[2] added b
   265   atop:[7] added a
   252   atop:[8] added a
   266   move:[4] added c
   253   move:[4] added c
   267   atop:[7] added a
   254   atop:[8] added a
   268   move:[6] foo to a
   255   move:[6] foo to a
   269   atop:[7] added a
   256   atop:[8] added a
   270   merging a
   257   merging a
   271   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   258   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   272   fix conflicts and see `hg help evolve.interrupted`
   259   fix conflicts and see `hg help evolve.interrupted`
   273   [1]
   260   [1]
   274 
   261 
   275   $ hg glog
   262   $ hg glog
   276   o  9:7f8e8bd9f0b6 added c
   263   o  10:7f8e8bd9f0b6 added c
   277   |   () draft
   264   |   () draft
   278   | o  8:db3b42ef4da7 added b
   265   | o  9:db3b42ef4da7 added b
   279   |/    () draft
   266   |/    () draft
   280   @  7:807e8e2ca559 added a
   267   @  8:807e8e2ca559 added a
   281   |   () draft
   268   |   () draft
   282   | @  6:8f20d4390c21 foo to a
   269   | @  6:8f20d4390c21 foo to a
   283   | |   () draft
   270   | |   () draft
   284   | | o  5:bcb1c47f8520 added d
   271   | | o  5:bcb1c47f8520 added d
   285   | | |   () draft
   272   | | |   () draft
   297   $ hg evolve --abort
   284   $ hg evolve --abort
   298   evolve aborted
   285   evolve aborted
   299   working directory is now at 807e8e2ca559
   286   working directory is now at 807e8e2ca559
   300 
   287 
   301   $ hg glog
   288   $ hg glog
   302   @  7:807e8e2ca559 added a
   289   @  8:807e8e2ca559 added a
   303   |   () draft
   290   |   () draft
   304   | o  6:8f20d4390c21 foo to a
   291   | o  6:8f20d4390c21 foo to a
   305   | |   () draft
   292   | |   () draft
   306   | | o  5:bcb1c47f8520 added d
   293   | | o  5:bcb1c47f8520 added d
   307   | | |   () draft
   294   | | |   () draft
   323 Testing when user created a new changesets on top of evolved revisions
   310 Testing when user created a new changesets on top of evolved revisions
   324 ======================================================================
   311 ======================================================================
   325 
   312 
   326   $ hg evolve --all
   313   $ hg evolve --all
   327   move:[2] added b
   314   move:[2] added b
   328   atop:[7] added a
   315   atop:[8] added a
   329   move:[4] added c
   316   move:[4] added c
   330   atop:[7] added a
   317   atop:[8] added a
   331   move:[6] foo to a
   318   move:[6] foo to a
   332   atop:[7] added a
   319   atop:[8] added a
   333   merging a
   320   merging a
   334   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   321   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   335   fix conflicts and see `hg help evolve.interrupted`
   322   fix conflicts and see `hg help evolve.interrupted`
   336   [1]
   323   [1]
   337   $ hg glog
   324   $ hg glog
   338   o  9:7f8e8bd9f0b6 added c
   325   o  10:7f8e8bd9f0b6 added c
   339   |   () draft
   326   |   () draft
   340   | o  8:db3b42ef4da7 added b
   327   | o  9:db3b42ef4da7 added b
   341   |/    () draft
   328   |/    () draft
   342   @  7:807e8e2ca559 added a
   329   @  8:807e8e2ca559 added a
   343   |   () draft
   330   |   () draft
   344   | @  6:8f20d4390c21 foo to a
   331   | @  6:8f20d4390c21 foo to a
   345   | |   () draft
   332   | |   () draft
   346   | | o  5:bcb1c47f8520 added d
   333   | | o  5:bcb1c47f8520 added d
   347   | | |   () draft
   334   | | |   () draft
   369   searching for changes
   356   searching for changes
   370   adding changesets
   357   adding changesets
   371   adding manifests
   358   adding manifests
   372   adding file changes
   359   adding file changes
   373   added 10 changesets with 8 changes to 5 files (+4 heads)
   360   added 10 changesets with 8 changes to 5 files (+4 heads)
   374   3 new obsolescence markers
   361   4 new obsolescence markers
   375   $ cd ../clonerepo
   362   $ cd ../clonerepo
   376   $ hg up 7f8e8bd9f0b6
   363   $ hg up 7f8e8bd9f0b6
   377   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   364   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   378   $ echo bar > bar
   365   $ echo bar > bar
   379   $ hg add bar
   366   $ hg add bar
   399 Testing when the evolved revision turned public due to some other user actions
   386 Testing when the evolved revision turned public due to some other user actions
   400 ==============================================================================
   387 ==============================================================================
   401 
   388 
   402   $ hg evolve --all
   389   $ hg evolve --all
   403   move:[3] added c
   390   move:[3] added c
   404   atop:[8] added b
   391   atop:[9] added b
   405   move:[5] added d
   392   move:[5] added d
   406   atop:[9] added c
   393   atop:[10] added c
   407   move:[6] foo to a
   394   move:[6] foo to a
   408   atop:[7] added a
   395   atop:[8] added a
   409   merging a
   396   merging a
   410   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   397   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   411   fix conflicts and see `hg help evolve.interrupted`
   398   fix conflicts and see `hg help evolve.interrupted`
   412   [1]
   399   [1]
   413 
   400 
   414   $ hg glog
   401   $ hg glog
   415   o  12:1c476940790a added d
   402   o  13:1c476940790a added d
   416   |   () draft
   403   |   () draft
   417   | o  11:c10a55eb0cc6 added c
   404   | o  12:c10a55eb0cc6 added c
   418   | |   () draft
   405   | |   () draft
   419   +---o  10:48eca1ed5478 made an new commit on evolved rev
   406   +---o  11:48eca1ed5478 made an new commit on evolved rev
   420   | |     () draft
   407   | |     () draft
   421   o |  9:7f8e8bd9f0b6 added c
   408   o |  10:7f8e8bd9f0b6 added c
   422   | |   () draft
   409   | |   () draft
   423   | o  8:db3b42ef4da7 added b
   410   | o  9:db3b42ef4da7 added b
   424   |/    () draft
   411   |/    () draft
   425   @  7:807e8e2ca559 added a
   412   @  8:807e8e2ca559 added a
   426   |   () draft
   413   |   () draft
   427   | @  6:8f20d4390c21 foo to a
   414   | @  6:8f20d4390c21 foo to a
   428   | |   () draft
   415   | |   () draft
   429   | x  1:2f913b0c9220 added a
   416   | x  1:2f913b0c9220 added a
   430   |/    () draft
   417   |/    () draft
   461   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   448   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   462   (leaving bookmark bm1)
   449   (leaving bookmark bm1)
   463   $ echo foo > c
   450   $ echo foo > c
   464   $ hg add c
   451   $ hg add c
   465   $ hg amend
   452   $ hg amend
   466   2 new orphan changesets
   453   2 new unstable changesets
   467 
   454 
   468   $ hg glog
   455   $ hg glog
   469   @  4:a0086c17bfc7 added a
   456   @  5:a0086c17bfc7 added a
   470   |   () draft
   457   |   () draft
   471   | o  3:17509928e5bf added c
   458   | o  3:17509928e5bf added c
   472   | |   () draft
   459   | |   () draft
   473   | o  2:9f0c80a55ddc added b
   460   | o  2:9f0c80a55ddc added b
   474   | |   (bm1) draft
   461   | |   (bm1) draft
   477   o  0:8fa14d15e168 added hgignore
   464   o  0:8fa14d15e168 added hgignore
   478       () draft
   465       () draft
   479 
   466 
   480   $ hg evolve --all
   467   $ hg evolve --all
   481   move:[2] added b
   468   move:[2] added b
   482   atop:[4] added a
   469   atop:[5] added a
   483   move:[3] added c
   470   move:[3] added c
   484   merging c
   471   merging c
   485   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   472   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   486   fix conflicts and see `hg help evolve.interrupted`
   473   fix conflicts and see `hg help evolve.interrupted`
   487   [1]
   474   [1]
   488 
   475 
   489   $ hg glog
   476   $ hg glog
   490   @  5:c1f4718020e3 added b
   477   @  6:c1f4718020e3 added b
   491   |   (bm1) draft
   478   |   (bm1) draft
   492   o  4:a0086c17bfc7 added a
   479   o  5:a0086c17bfc7 added a
   493   |   () draft
   480   |   () draft
   494   | @  3:17509928e5bf added c
   481   | @  3:17509928e5bf added c
   495   | |   () draft
   482   | |   () draft
   496   | x  2:9f0c80a55ddc added b
   483   | x  2:9f0c80a55ddc added b
   497   | |   () draft
   484   | |   () draft
   503   $ hg evolve --abort
   490   $ hg evolve --abort
   504   evolve aborted
   491   evolve aborted
   505   working directory is now at a0086c17bfc7
   492   working directory is now at a0086c17bfc7
   506 
   493 
   507   $ hg glog
   494   $ hg glog
   508   @  4:a0086c17bfc7 added a
   495   @  5:a0086c17bfc7 added a
   509   |   () draft
   496   |   () draft
   510   | o  3:17509928e5bf added c
   497   | o  3:17509928e5bf added c
   511   | |   () draft
   498   | |   () draft
   512   | o  2:9f0c80a55ddc added b
   499   | o  2:9f0c80a55ddc added b
   513   | |   (bm1) draft
   500   | |   (bm1) draft
   519 Testing `--abort` when conflicts are caused due to `hg next --evolve`
   506 Testing `--abort` when conflicts are caused due to `hg next --evolve`
   520 =====================================================================
   507 =====================================================================
   521 
   508 
   522   $ hg next --evolve
   509   $ hg next --evolve
   523   move:[2] added b
   510   move:[2] added b
   524   atop:[4] added a
   511   atop:[5] added a
   525   working directory now at c1f4718020e3
   512   working directory now at c1f4718020e3
   526   $ hg next --evolve
   513   $ hg next --evolve
   527   move:[3] added c
   514   move:[3] added c
   528   atop:[5] added b
   515   atop:[6] added b
   529   merging c
   516   merging c
   530   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   517   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
   531   fix conflicts and see `hg help evolve.interrupted`
   518   fix conflicts and see `hg help evolve.interrupted`
   532   [1]
   519   [1]
   533 
   520