tests/test-topic-stack.t
changeset 2712 f19b314d8475
parent 2684 90e11985d0cc
child 2750 bd3824d1b795
equal deleted inserted replaced
2711:8c938e9af113 2712:f19b314d8475
    74   ### branch: default
    74   ### branch: default
    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   t0^ c_b (base)
    80   $ hg stack -Tjson | python -m json.tool
    80   $ hg stack -Tjson | python -m json.tool
    81   [
    81   [
    82       {
    82       {
    83           "isentry": true,
    83           "isentry": true,
    84           "topic.stack.desc": "c_f",
    84           "topic.stack.desc": "c_f",
   116           "topic.stack.state.symbol": ":"
   116           "topic.stack.state.symbol": ":"
   117       },
   117       },
   118       {
   118       {
   119           "isentry": false,
   119           "isentry": false,
   120           "topic.stack.desc": "c_b",
   120           "topic.stack.desc": "c_b",
       
   121           "topic.stack.index": 0,
   121           "topic.stack.state": [
   122           "topic.stack.state": [
   122               "base"
   123               "base"
   123           ],
   124           ],
   124           "topic.stack.state.symbol": "^"
   125           "topic.stack.state.symbol": "^"
   125       }
   126       }
   178   ### branch: default
   179   ### branch: default
   179   t4$ c_f (unstable)
   180   t4$ c_f (unstable)
   180   t3$ c_e (unstable)
   181   t3$ c_e (unstable)
   181   t2@ c_d (current)
   182   t2@ c_d (current)
   182   t1: c_c
   183   t1: c_c
   183     ^ c_b
   184   t0^ c_b (base)
   184   $ hg up t3
   185   $ hg up t3
   185   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   186   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   186   $ hg topic --list
   187   $ hg topic --list
   187   ### topic: foo
   188   ### topic: foo
   188   ### branch: default
   189   ### branch: default
   189   t4$ c_f (unstable)
   190   t4$ c_f (unstable)
   190   t3$ c_e (current unstable)
   191   t3$ c_e (current unstable)
   191   t2: c_d
   192   t2: c_d
   192   t1: c_c
   193   t1: c_c
   193     ^ c_b
   194   t0^ c_b (base)
   194   $ hg topic --list --color=debug
   195   $ hg topic --list --color=debug
   195   [topic.stack.summary.topic|### topic: [topic.active|foo]]
   196   [topic.stack.summary.topic|### topic: [topic.active|foo]]
   196   [topic.stack.summary.branches|### branch: default]
   197   [topic.stack.summary.branches|### branch: default]
   197   [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)]
   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)]
   198   [topic.stack.index topic.stack.index.current topic.stack.index.unstable|t3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)]
   199   [topic.stack.index topic.stack.index.current topic.stack.index.unstable|t3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)]
   199   [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
   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]
   200   [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
   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]
   201     [topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b]
   202   [topic.stack.index topic.stack.index.base|t0][topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b][topic.stack.state topic.stack.state.base| (base)]
   202   $ hg up t2
   203   $ hg up t2
   203   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   204   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   204 
   205 
   205 Also test the revset:
   206 Also test the revset:
   206 
   207 
   279   t2^ c_d (base)
   280   t2^ c_d (base)
   280   t4@ c_h (current)
   281   t4@ c_h (current)
   281   t3: c_g
   282   t3: c_g
   282   t2: c_d
   283   t2: c_d
   283   t1: c_c
   284   t1: c_c
   284     ^ c_b
   285   t0^ c_b (base)
   285 
   286 
   286 Case with multiple heads on the topic with unstability involved
   287 Case with multiple heads on the topic with unstability involved
   287 ---------------------------------------------------------------
   288 ---------------------------------------------------------------
   288 
   289 
   289 We amend the message to make sure the display base pick the right changeset
   290 We amend the message to make sure the display base pick the right changeset
   323   t2^ c_D (base)
   324   t2^ c_D (base)
   324   t4: c_h
   325   t4: c_h
   325   t3: c_g
   326   t3: c_g
   326   t2@ c_D (current)
   327   t2@ c_D (current)
   327   t1: c_c
   328   t1: c_c
   328     ^ c_b
   329   t0^ c_b (base)
   329 
   330 
   330 Trying to list non existing topic
   331 Trying to list non existing topic
   331   $ hg stack thisdoesnotexist
   332   $ hg stack thisdoesnotexist
   332   abort: cannot resolve "thisdoesnotexist": no such topic found
   333   abort: cannot resolve "thisdoesnotexist": no such topic found
   333   [255]
   334   [255]