tests/test-rebase-obsolete4.t
changeset 46864 6b42343f3cb6
parent 46829 13b200ffe8eb
child 48687 f8f2ecdde4b5
equal deleted inserted replaced
46863:d9601243b73c 46864:6b42343f3cb6
    21 Test that bookmark is moved and working dir is updated when all changesets have
    21 Test that bookmark is moved and working dir is updated when all changesets have
    22 equivalents in destination
    22 equivalents in destination
    23   $ hg init rbsrepo && cd rbsrepo
    23   $ hg init rbsrepo && cd rbsrepo
    24   $ echo "[experimental]" > .hg/hgrc
    24   $ echo "[experimental]" > .hg/hgrc
    25   $ echo "evolution=true" >> .hg/hgrc
    25   $ echo "evolution=true" >> .hg/hgrc
    26   $ echo "rebaseskipobsolete=on" >> .hg/hgrc
       
    27   $ echo root > root && hg ci -Am root
    26   $ echo root > root && hg ci -Am root
    28   adding root
    27   adding root
    29   $ echo a > a && hg ci -Am a
    28   $ echo a > a && hg ci -Am a
    30   adding a
    29   adding a
    31   $ hg up 0
    30   $ hg up 0
   122   | |
   121   | |
   123   o |  1:96cc3511f894 C
   122   o |  1:96cc3511f894 C
   124    /
   123    /
   125   o  0:426bada5c675 A
   124   o  0:426bada5c675 A
   126   
   125   
   127 For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.),
   126 For some reasons (--hidden, directaccess, etc.),
   128 rebasestate may contain hidden hashes. "rebase --abort" should work regardless.
   127 rebasestate may contain hidden hashes. "rebase --abort" should work regardless.
   129 
   128 
   130   $ hg init $TESTTMP/hidden-state1
   129   $ hg init $TESTTMP/hidden-state1
   131   $ cd $TESTTMP/hidden-state1
   130   $ cd $TESTTMP/hidden-state1
   132   $ cat >> .hg/hgrc <<EOF
       
   133   > [experimental]
       
   134   > rebaseskipobsolete=0
       
   135   > EOF
       
   136 
   131 
   137   $ hg debugdrawdag <<'EOS'
   132   $ hg debugdrawdag <<'EOS'
   138   >    C
   133   >    C
   139   >    |
   134   >    |
   140   >  D B # prune: B, C
   135   >  D B # B/D=B
   141   >  |/  # B/D=B
   136   >  |/  
   142   >  A
   137   >  A
   143   > EOS
   138   > EOS
   144 
   139 
   145   $ eval `hg tags -T '{tag}={node}\n'`
   140   $ eval `hg tags -T '{tag}={node}\n'`
   146   $ rm .hg/localtags
   141   $ rm .hg/localtags
   147 
   142 
   148   $ hg update -q $C --hidden
   143   $ hg update -q $C
   149   updated to hidden changeset 7829726be4dc
       
   150   (hidden revision '7829726be4dc' is pruned)
       
   151   $ hg rebase -s $B -d $D
   144   $ hg rebase -s $B -d $D
   152   rebasing 1:2ec65233581b "B"
   145   rebasing 1:2ec65233581b "B"
   153   merging D
   146   merging D
   154   warning: conflicts while merging D! (edit, then use 'hg resolve --mark')
   147   warning: conflicts while merging D! (edit, then use 'hg resolve --mark')
   155   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   148   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   156   [240]
   149   [240]
   157 
   150 
       
   151   $ hg debugobsolete $B
       
   152   1 new obsolescence markers
       
   153   obsoleted 1 changesets
       
   154   1 new orphan changesets
       
   155   $ hg debugobsolete $C
       
   156   1 new obsolescence markers
       
   157   obsoleted 1 changesets
   158   $ cp -R . $TESTTMP/hidden-state2
   158   $ cp -R . $TESTTMP/hidden-state2
   159 
   159 
   160   $ hg log -G
   160   $ hg log -G
   161   @  2:b18e25de2cf5 D
   161   @  2:b18e25de2cf5 D
   162   |
   162   |
   163   | %  1:2ec65233581b B (pruned using prune)
   163   | %  1:2ec65233581b B (pruned)
   164   |/
   164   |/
   165   o  0:426bada5c675 A
   165   o  0:426bada5c675 A
   166   
   166   
   167   $ hg summary
   167   $ hg summary
   168   parent: 2:b18e25de2cf5 tip
   168   parent: 2:b18e25de2cf5 tip
   181   $ cd $TESTTMP/hidden-state2
   181   $ cd $TESTTMP/hidden-state2
   182   $ hg resolve -m
   182   $ hg resolve -m
   183   (no more unresolved files)
   183   (no more unresolved files)
   184   continue: hg rebase --continue
   184   continue: hg rebase --continue
   185   $ hg rebase --continue
   185   $ hg rebase --continue
   186   rebasing 1:2ec65233581b "B"
   186   note: not rebasing 1:2ec65233581b "B", it has no successor
   187   rebasing 3:7829726be4dc tip "C"
   187   note: not rebasing 3:7829726be4dc tip "C", it has no successor
   188   $ hg log -G
   188   $ hg log -G
   189   @  5:1964d5d5b547 C
   189   @  2:b18e25de2cf5 D
   190   |
       
   191   o  4:68deb90c12a2 B
       
   192   |
       
   193   o  2:b18e25de2cf5 D
       
   194   |
   190   |
   195   o  0:426bada5c675 A
   191   o  0:426bada5c675 A
   196   
   192   
   197 ====================
   193 ====================
   198 Test --stop option |
   194 Test --stop option |