tests/test-evolve-content-divergent-stack.t
changeset 5028 109889c7d02d
parent 5027 08be8a4d5196
child 5029 421b295e32b4
equal deleted inserted replaced
5027:08be8a4d5196 5028:109889c7d02d
   485   4 new orphan changesets
   485   4 new orphan changesets
   486   unresolved merge conflicts
   486   unresolved merge conflicts
   487   (see 'hg help evolve.interrupted')
   487   (see 'hg help evolve.interrupted')
   488   [1]
   488   [1]
   489 
   489 
   490 (make sure that --abort works fine when relocation of "divergent" also included)
   490 As now we have interrupted evolution of stack of content-divergent cset (when
       
   491 relocation of "divergent" also included) let's test --abort and --stop 
       
   492 test --abort:
   491   $ hg evolve --abort
   493   $ hg evolve --abort
   492   2 new content-divergent changesets
   494   2 new content-divergent changesets
   493   evolve aborted
   495   evolve aborted
   494   working directory is now at 509103439e5e
   496   working directory is now at 509103439e5e
   495 
   497 
   500   user:        test
   502   user:        test
   501   date:        Thu Jan 01 00:00:00 1970 +0000
   503   date:        Thu Jan 01 00:00:00 1970 +0000
   502   instability: content-divergent
   504   instability: content-divergent
   503   summary:     added d
   505   summary:     added d
   504   
   506   
   505 
   507 test --stop:
   506 Again, let's evolve the stack
   508   $ hg log -G
       
   509   *  changeset:   19:c351be27f199
       
   510   |  tag:         tip
       
   511   |  user:        test
       
   512   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   513   |  instability: content-divergent
       
   514   |  summary:     added d
       
   515   |
       
   516   *  changeset:   18:eaf34afe4df3
       
   517   |  user:        test
       
   518   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   519   |  instability: content-divergent
       
   520   |  summary:     added c
       
   521   |
       
   522   @  changeset:   17:509103439e5e
       
   523   |  parent:      5:8e222f257bbf
       
   524   |  user:        test
       
   525   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   526   |  instability: content-divergent
       
   527   |  summary:     added b
       
   528   |
       
   529   | *  changeset:   16:91c8ccb9c241
       
   530   | |  user:        test
       
   531   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   532   | |  instability: content-divergent
       
   533   | |  summary:     added d
       
   534   | |
       
   535   | *  changeset:   15:48b0f803817a
       
   536   | |  user:        test
       
   537   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   538   | |  instability: content-divergent
       
   539   | |  summary:     added c
       
   540   | |
       
   541   | *  changeset:   14:2a955e808c53
       
   542   | |  parent:      10:c04ff147ef79
       
   543   | |  user:        test
       
   544   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   545   | |  instability: content-divergent
       
   546   | |  summary:     added b
       
   547   | |
       
   548   | *  changeset:   10:c04ff147ef79
       
   549   | |  user:        test
       
   550   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   551   | |  instability: content-divergent
       
   552   | |  summary:     added a
       
   553   | |
       
   554   | o  changeset:   9:2228e3b74514
       
   555   | |  parent:      0:8fa14d15e168
       
   556   | |  user:        test
       
   557   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   558   | |  summary:     add newfile
       
   559   | |
       
   560   * |  changeset:   5:8e222f257bbf
       
   561   |/   parent:      0:8fa14d15e168
       
   562   |    user:        test
       
   563   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   564   |    instability: content-divergent
       
   565   |    summary:     watbar to a
       
   566   |
       
   567   o  changeset:   0:8fa14d15e168
       
   568      user:        test
       
   569      date:        Thu Jan 01 00:00:00 1970 +0000
       
   570      summary:     added hgignore
       
   571   
   507   $ hg evolve --content-divergent
   572   $ hg evolve --content-divergent
   508   merge:[10] added a
   573   merge:[10] added a
   509   with: [5] watbar to a
   574   with: [5] watbar to a
   510   base: [1] added a
   575   base: [1] added a
   511   rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514
   576   rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514
   521   4 new orphan changesets
   586   4 new orphan changesets
   522   unresolved merge conflicts
   587   unresolved merge conflicts
   523   (see 'hg help evolve.interrupted')
   588   (see 'hg help evolve.interrupted')
   524   [1]
   589   [1]
   525 
   590 
       
   591   $ hg evolve --stop
       
   592   1 new orphan changesets
       
   593   stopped the interrupted evolve
       
   594   working directory is now at 509103439e5e
       
   595   $ hg log -G
       
   596   *  changeset:   22:a93be2347074
       
   597   |  tag:         tip
       
   598   |  user:        test
       
   599   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   600   |  instability: content-divergent
       
   601   |  summary:     added b
       
   602   |
       
   603   o  changeset:   21:74fbf3e6a0b6
       
   604   |  parent:      9:2228e3b74514
       
   605   |  user:        test
       
   606   |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   607   |  summary:     watbar to a
       
   608   |
       
   609   | *  changeset:   19:c351be27f199
       
   610   | |  user:        test
       
   611   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   612   | |  instability: orphan, content-divergent
       
   613   | |  summary:     added d
       
   614   | |
       
   615   | *  changeset:   18:eaf34afe4df3
       
   616   | |  user:        test
       
   617   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   618   | |  instability: orphan, content-divergent
       
   619   | |  summary:     added c
       
   620   | |
       
   621   | @  changeset:   17:509103439e5e
       
   622   | |  parent:      5:8e222f257bbf
       
   623   | |  user:        test
       
   624   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   625   | |  instability: orphan, content-divergent
       
   626   | |  summary:     added b
       
   627   | |
       
   628   | | *  changeset:   16:91c8ccb9c241
       
   629   | | |  user:        test
       
   630   | | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   631   | | |  instability: orphan, content-divergent
       
   632   | | |  summary:     added d
       
   633   | | |
       
   634   | | *  changeset:   15:48b0f803817a
       
   635   | | |  user:        test
       
   636   | | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   637   | | |  instability: orphan, content-divergent
       
   638   | | |  summary:     added c
       
   639   | | |
       
   640   | | x  changeset:   14:2a955e808c53
       
   641   | | |  parent:      10:c04ff147ef79
       
   642   | | |  user:        test
       
   643   | | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   644   | | |  obsolete:    rebased using evolve as 22:a93be2347074
       
   645   | | |  summary:     added b
       
   646   | | |
       
   647   +---x  changeset:   10:c04ff147ef79
       
   648   | |    user:        test
       
   649   | |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   650   | |    obsolete:    rewritten using evolve as 21:74fbf3e6a0b6
       
   651   | |    summary:     added a
       
   652   | |
       
   653   o |  changeset:   9:2228e3b74514
       
   654   | |  parent:      0:8fa14d15e168
       
   655   | |  user:        test
       
   656   | |  date:        Thu Jan 01 00:00:00 1970 +0000
       
   657   | |  summary:     add newfile
       
   658   | |
       
   659   | x  changeset:   5:8e222f257bbf
       
   660   |/   parent:      0:8fa14d15e168
       
   661   |    user:        test
       
   662   |    date:        Thu Jan 01 00:00:00 1970 +0000
       
   663   |    obsolete:    rebased using evolve as 21:74fbf3e6a0b6
       
   664   |    summary:     watbar to a
       
   665   |
       
   666   o  changeset:   0:8fa14d15e168
       
   667      user:        test
       
   668      date:        Thu Jan 01 00:00:00 1970 +0000
       
   669      summary:     added hgignore
       
   670   
       
   671   $ hg obslog -r 'desc("watbar to a")' --all
       
   672   o    74fbf3e6a0b6 (21) watbar to a
       
   673   |\
       
   674   x |  186bdc2cdfa2 (20) watbar to a
       
   675   | |    rewritten as 74fbf3e6a0b6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   676   | |
       
   677   | x  c04ff147ef79 (10) added a
       
   678   | |    rewritten(description, content) as 74fbf3e6a0b6 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   679   | |
       
   680   x |  8e222f257bbf (5) watbar to a
       
   681   |/     rewritten(parent) as 186bdc2cdfa2 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   682   |
       
   683   x  c7586e2a9264 (1) added a
       
   684        rewritten(description, content) as 8e222f257bbf using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   685        rewritten(parent) as c04ff147ef79 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   686   
       
   687   $ hg obslog -r 'desc("added b")' --all
       
   688   @  509103439e5e (17) added b
       
   689   |
       
   690   | *  a93be2347074 (22) added b
       
   691   | |
       
   692   | x  2a955e808c53 (14) added b
       
   693   | |    rewritten(parent) as a93be2347074 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   694   | |
       
   695   x |  d5f148423c16 (6) added b
       
   696   | |    rewritten(content) as 509103439e5e using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   697   | |
       
   698   | x  6eb54b5af3fb (11) added b
       
   699   |/     rewritten(content) as 2a955e808c53 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
       
   700   |
       
   701   x  b1661037fa25 (2) added b
       
   702        rewritten(parent) as 6eb54b5af3fb using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
       
   703        rewritten(parent) as d5f148423c16 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
       
   704   
       
   705 
       
   706 Again, let's evolve the stack
       
   707   $ hg evolve --content-divergent
       
   708   skipping 48b0f803817a: have a different parent than eaf34afe4df3 (not handled yet)
       
   709   | 48b0f803817a, eaf34afe4df3 are not based on the same changeset.
       
   710   | With the current state of its implementation, 
       
   711   | evolve does not work in that case.
       
   712   | rebase one of them next to the other and run 
       
   713   | this command again.
       
   714   | - either: hg rebase --dest 'p1(48b0f803817a)' -r eaf34afe4df3
       
   715   | - or:     hg rebase --dest 'p1(eaf34afe4df3)' -r 48b0f803817a
       
   716   merge:[22] added b
       
   717   with: [17] added b
       
   718   base: [2] added b
       
   719   rebasing "other" content-divergent changeset 509103439e5e on 74fbf3e6a0b6
       
   720   merging b
       
   721   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
       
   722   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
       
   723   unresolved merge conflicts
       
   724   (see 'hg help evolve.interrupted')
       
   725   [1]
       
   726 
   526   $ echo foo > b
   727   $ echo foo > b
   527   $ hg res -m
   728   $ hg res -m
   528   (no more unresolved files)
   729   (no more unresolved files)
   529   continue: hg evolve --continue
   730   continue: hg evolve --continue
   530   $ hg evolve --continue
   731   $ hg evolve --continue
   531   merge:[15] added c
   732   skipping 91c8ccb9c241: have a different parent than c351be27f199 (not handled yet)
   532   with: [18] added c
   733   | 91c8ccb9c241, c351be27f199 are not based on the same changeset.
   533   base: [3] added c
   734   | With the current state of its implementation, 
   534   rebasing "divergent" content-divergent changeset 48b0f803817a on 4e29776e83a5
   735   | evolve does not work in that case.
   535   rebasing "other" content-divergent changeset eaf34afe4df3 on 4e29776e83a5
   736   | rebase one of them next to the other and run 
   536   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   737   | this command again.
   537   merge:[16] added d
   738   | - either: hg rebase --dest 'p1(91c8ccb9c241)' -r c351be27f199
   538   with: [19] added d
   739   | - or:     hg rebase --dest 'p1(c351be27f199)' -r 91c8ccb9c241
   539   base: [4] added d
       
   540   rebasing "divergent" content-divergent changeset 91c8ccb9c241 on 77126af93a25
       
   541   rebasing "other" content-divergent changeset c351be27f199 on 77126af93a25
       
   542   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   543   working directory is now at 4e29776e83a5
   740   working directory is now at 4e29776e83a5
   544 
   741 
   545   $ hg evolve -l
   742   $ hg evolve -l
       
   743   48b0f803817a: added c
       
   744     orphan: 2a955e808c53 (obsolete parent)
       
   745     content-divergent: eaf34afe4df3 (draft) (precursor ca1b80f7960a)
       
   746   
       
   747   91c8ccb9c241: added d
       
   748     orphan: 48b0f803817a (orphan parent)
       
   749     content-divergent: c351be27f199 (draft) (precursor c41c793e0ef1)
       
   750   
       
   751   eaf34afe4df3: added c
       
   752     orphan: 509103439e5e (obsolete parent)
       
   753     content-divergent: 48b0f803817a (draft) (precursor ca1b80f7960a)
       
   754   
       
   755   c351be27f199: added d
       
   756     orphan: eaf34afe4df3 (orphan parent)
       
   757     content-divergent: 91c8ccb9c241 (draft) (precursor c41c793e0ef1)
       
   758   
   546 
   759 
   547   $ cd ..
   760   $ cd ..
   548 
   761 
   549 Make sure that content-divergent resolution doesn't undo a change (issue6203)
   762 Make sure that content-divergent resolution doesn't undo a change (issue6203)
   550 -----------------------------------------------------------------------------
   763 -----------------------------------------------------------------------------