tests/test-topic-stack.t
changeset 1960 a9a1abc7dd75
parent 1959 6789d5d9f2b0
child 1961 d9c7fced94fc
equal deleted inserted replaced
1959:6789d5d9f2b0 1960:a9a1abc7dd75
    10   > evolution=createmarkers,exchange,allowunstable
    10   > evolution=createmarkers,exchange,allowunstable
    11   > EOF
    11   > EOF
    12 
    12 
    13   $ hg init main
    13   $ hg init main
    14   $ cd main
    14   $ cd main
       
    15   $ hg topic other
    15   $ echo aaa > aaa
    16   $ echo aaa > aaa
    16   $ hg add aaa
    17   $ hg add aaa
    17   $ hg commit -m c_a
    18   $ hg commit -m c_a
    18   $ echo aaa > bbb
    19   $ echo aaa > bbb
    19   $ hg add bbb
    20   $ hg add bbb
    38   |
    39   |
    39   o  3 default {foo} draft c_d
    40   o  3 default {foo} draft c_d
    40   |
    41   |
    41   o  2 default {foo} draft c_c
    42   o  2 default {foo} draft c_c
    42   |
    43   |
    43   o  1 default {} draft c_b
    44   o  1 default {other} draft c_b
    44   |
    45   |
    45   o  0 default {} draft c_a
    46   o  0 default {other} draft c_a
    46   
    47   
       
    48 
       
    49   $ hg phase --public 'topic("other")'
    47 
    50 
    48 Simple test
    51 Simple test
    49 -----------
    52 -----------
    50 
    53 
    51 hg topic -l list all changeset in the topic
    54 hg topic -l list all changeset in the topic
    78   abort: cannot resolve "t42": topic "foo" has only 4 changesets
    81   abort: cannot resolve "t42": topic "foo" has only 4 changesets
    79   [255]
    82   [255]
    80   $ hg up t2
    83   $ hg up t2
    81   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    84   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
    82   $ hg summary
    85   $ hg summary
    83   parent: 3:f9c59b863cdb 
    86   parent: 3:e629654d7050 
    84    c_d
    87    c_d
    85   branch: default
    88   branch: default
    86   commit: (clean)
    89   commit: (clean)
    87   update: (current)
    90   update: (current)
    88   phases: 6 draft
    91   phases: 4 draft
    89   topic:  foo
    92   topic:  foo
    90 
    93 
    91 Case with some of the topic unstable
    94 Case with some of the topic unstable
    92 ------------------------------------
    95 ------------------------------------
    93 
    96 
   102   | |
   105   | |
   103   | x  3 default {foo} draft c_d
   106   | x  3 default {foo} draft c_d
   104   |/
   107   |/
   105   o  2 default {foo} draft c_c
   108   o  2 default {foo} draft c_c
   106   |
   109   |
   107   o  1 default {} draft c_b
   110   o  1 default {} public c_b
   108   |
   111   |
   109   o  0 default {} draft c_a
   112   o  0 default {} public c_a
   110   
   113   
   111   $ hg topic --list
   114   $ hg topic --list
   112   t4$ c_f (unstable)
   115   t4$ c_f (unstable)
   113   t3$ c_e (unstable)
   116   t3$ c_e (unstable)
   114   t2@ c_d (current)
   117   t2@ c_d (current)
   127 -------------------------------------
   130 -------------------------------------
   128 
   131 
   129 Make things linear again
   132 Make things linear again
   130 
   133 
   131   $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
   134   $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
   132   rebasing 4:91fa8808d101 "c_e"
   135   rebasing 4:0f9ac936c87d "c_e"
   133   rebasing 5:4ec5094907b7 "c_f"
   136   rebasing 5:6559e6d93aea "c_f"
   134   $ hg log -G
   137   $ hg log -G
   135   o  9 default {foo} draft c_f
   138   o  9 default {foo} draft c_f
   136   |
   139   |
   137   o  8 default {foo} draft c_e
   140   o  8 default {foo} draft c_e
   138   |
   141   |
   139   @  7 default {foo} draft c_d
   142   @  7 default {foo} draft c_d
   140   |
   143   |
   141   o  2 default {foo} draft c_c
   144   o  2 default {foo} draft c_c
   142   |
   145   |
   143   o  1 default {} draft c_b
   146   o  1 default {} public c_b
   144   |
   147   |
   145   o  0 default {} draft c_a
   148   o  0 default {} public c_a
   146   
   149   
   147 
   150 
   148 
   151 
   149 Create the second branch
   152 Create the second branch
   150 
   153 
   167   |/
   170   |/
   168   o  7 default {foo} draft c_d
   171   o  7 default {foo} draft c_d
   169   |
   172   |
   170   o  2 default {foo} draft c_c
   173   o  2 default {foo} draft c_c
   171   |
   174   |
   172   o  1 default {} draft c_b
   175   o  1 default {} public c_b
   173   |
   176   |
   174   o  0 default {} draft c_a
   177   o  0 default {} public c_a
   175   
   178   
   176 
   179 
   177 Test output
   180 Test output
   178 
   181 
   179   $ hg top -l
   182   $ hg top -l
   194   $ hg up 'desc(c_d)'
   197   $ hg up 'desc(c_d)'
   195   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   198   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   196   $ echo ccc > ddd
   199   $ echo ccc > ddd
   197   $ hg commit --amend -m 'c_D' 
   200   $ hg commit --amend -m 'c_D' 
   198   $ hg rebase -d . -s 'desc(c_g)'
   201   $ hg rebase -d . -s 'desc(c_g)'
   199   rebasing 10:11286b4fcb3d "c_g"
   202   rebasing 10:81264ae8a36a "c_g"
   200   rebasing 11:3ad57527186d "c_h"
   203   rebasing 11:fde5f5941642 "c_h"
   201   $ hg log -G
   204   $ hg log -G
   202   o  15 default {foo} draft c_h
   205   o  15 default {foo} draft c_h
   203   |
   206   |
   204   o  14 default {foo} draft c_g
   207   o  14 default {foo} draft c_g
   205   |
   208   |
   211   | |
   214   | |
   212   | x  7 default {foo} draft c_d
   215   | x  7 default {foo} draft c_d
   213   |/
   216   |/
   214   o  2 default {foo} draft c_c
   217   o  2 default {foo} draft c_c
   215   |
   218   |
   216   o  1 default {} draft c_b
   219   o  1 default {} public c_b
   217   |
   220   |
   218   o  0 default {} draft c_a
   221   o  0 default {} public c_a
   219   
   222   
   220 
   223 
   221   $ hg topic --list
   224   $ hg topic --list
   222   t6$ c_f (unstable)
   225   t6$ c_f (unstable)
   223   t5$ c_e (unstable)
   226   t5$ c_e (unstable)