tests/test-topic-stack.t
changeset 2372 a0099d568ef8
parent 2348 5737e0680f10
child 2431 0405bbda7402
child 2626 bc36a608e9e4
equal deleted inserted replaced
2371:48e879b3f5b6 2372:a0099d568ef8
    75   t4@ c_f (current)
    75   t4@ c_f (current)
    76   t3: c_e
    76   t3: c_e
    77   t2: c_d
    77   t2: c_d
    78   t1: c_c
    78   t1: c_c
    79     ^ c_b
    79     ^ c_b
       
    80   $ hg stack -Tjson | python -m json.tool
       
    81   [
       
    82       {
       
    83           "isentry": true,
       
    84           "topic.stack.desc": "c_f",
       
    85           "topic.stack.index": 4,
       
    86           "topic.stack.state": [
       
    87               "current"
       
    88           ],
       
    89           "topic.stack.state.symbol": "@"
       
    90       },
       
    91       {
       
    92           "isentry": true,
       
    93           "topic.stack.desc": "c_e",
       
    94           "topic.stack.index": 3,
       
    95           "topic.stack.state": [
       
    96               "clean"
       
    97           ],
       
    98           "topic.stack.state.symbol": ":"
       
    99       },
       
   100       {
       
   101           "isentry": true,
       
   102           "topic.stack.desc": "c_d",
       
   103           "topic.stack.index": 2,
       
   104           "topic.stack.state": [
       
   105               "clean"
       
   106           ],
       
   107           "topic.stack.state.symbol": ":"
       
   108       },
       
   109       {
       
   110           "isentry": true,
       
   111           "topic.stack.desc": "c_c",
       
   112           "topic.stack.index": 1,
       
   113           "topic.stack.state": [
       
   114               "clean"
       
   115           ],
       
   116           "topic.stack.state.symbol": ":"
       
   117       },
       
   118       {
       
   119           "isentry": false,
       
   120           "topic.stack.desc": "c_b",
       
   121           "topic.stack.state": [
       
   122               "base"
       
   123           ],
       
   124           "topic.stack.state.symbol": "^"
       
   125       }
       
   126   ]
    80 
   127 
    81 error case, nothing to list
   128 error case, nothing to list
    82 
   129 
    83   $ hg topic --clear
   130   $ hg topic --clear
    84   $ hg stack
   131   $ hg stack
   133   t4$ c_f (unstable)
   180   t4$ c_f (unstable)
   134   t3$ c_e (unstable)
   181   t3$ c_e (unstable)
   135   t2@ c_d (current)
   182   t2@ c_d (current)
   136   t1: c_c
   183   t1: c_c
   137     ^ c_b
   184     ^ c_b
       
   185   $ hg up t3
       
   186   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   187   $ hg topic --list
       
   188   ### topic: foo
       
   189   ### branch: default
       
   190   t4$ c_f (unstable)
       
   191   t3@ c_e (current)
       
   192   t2: c_d
       
   193   t1: c_c
       
   194     ^ c_b
       
   195   $ hg topic --list --color=debug
       
   196   [topic.stack.summary.topic|### topic: [topic.active|foo]]
       
   197   [topic.stack.summary.branches|### branch: default]
       
   198   [topic.stack.index topic.stack.index.unstable|t4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)]
       
   199   [topic.stack.index topic.stack.index.current|t3][topic.stack.state topic.stack.state.current|@] [topic.stack.desc topic.stack.desc.current|c_e][topic.stack.state topic.stack.state.current| (current)]
       
   200   [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
       
   201   [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
       
   202     [topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b]
       
   203   $ hg up t2
       
   204   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   138 
   205 
   139 Also test the revset:
   206 Also test the revset:
   140 
   207 
   141   $ hg log -r 'stack()'
   208   $ hg log -r 'stack()'
   142   2 default {foo} draft c_c
   209   2 default {foo} draft c_c