tests/test-topic-stack.t
changeset 1895 c8e4c6e03957
child 1896 4ae421cbb07c
equal deleted inserted replaced
1894:f8ee36489d3c 1895:c8e4c6e03957
       
     1   $ . "$TESTDIR/testlib"
       
     2 
       
     3 Initial setup
       
     4 
       
     5 
       
     6   $ cat << EOF >> $HGRCPATH
       
     7   > [ui]
       
     8   > logtemplate = {rev} {branch} \{{get(namespaces, "topics")}} {phase} {desc|firstline}\n
       
     9   > EOF
       
    10 
       
    11 (new head warning seems buggy)
       
    12   $ hg init main
       
    13   $ cd main
       
    14   $ echo aaa > aaa
       
    15   $ hg add aaa
       
    16   $ hg commit -m c_a
       
    17   $ echo aaa > bbb
       
    18   $ hg add bbb
       
    19   $ hg commit -m c_b
       
    20   $ hg topic foo
       
    21   $ echo aaa > ccc
       
    22   $ hg add ccc
       
    23   $ hg commit -m c_c
       
    24   $ echo aaa > ddd
       
    25   $ hg add ddd
       
    26   $ hg commit -m c_d
       
    27   created new head
       
    28   $ echo aaa > eee
       
    29   $ hg add eee
       
    30   $ hg commit -m c_e
       
    31   created new head
       
    32   $ echo aaa > fff
       
    33   $ hg add fff
       
    34   $ hg commit -m c_f
       
    35   created new head
       
    36   $ hg log -G
       
    37   @  5 default {foo} draft c_f
       
    38   |
       
    39   o  4 default {foo} draft c_e
       
    40   |
       
    41   o  3 default {foo} draft c_d
       
    42   |
       
    43   o  2 default {foo} draft c_c
       
    44   |
       
    45   o  1 default {} draft c_b
       
    46   |
       
    47   o  0 default {} draft c_a
       
    48   
       
    49 
       
    50 Simple test
       
    51 -----------
       
    52 
       
    53 hg topic -l list all changeset in the topic
       
    54 
       
    55   $ hg topic
       
    56    * foo
       
    57   $ hg topic --list
       
    58   c_c
       
    59   c_d
       
    60   c_e
       
    61   c_f
       
    62 
       
    63 error case, nothing to list
       
    64 
       
    65   $ hg topic --clear
       
    66   $ hg topic --list
       
    67   abort: no active topic to list
       
    68   [255]