tests/test-topic-stack.t
branchstable
changeset 3183 884a3b8aadd6
parent 2750 bd3824d1b795
child 2799 1627153804dc
child 2805 a789b9d5b60c
equal deleted inserted replaced
2722:44a6e6fbf80b 3183:884a3b8aadd6
    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 -v
       
    81   ### topic: foo
       
    82   ### branch: default
       
    83   t4(6559e6d93aea)@ c_f (current)
       
    84   t3(0f9ac936c87d): c_e
       
    85   t2(e629654d7050): c_d
       
    86   t1(8522f9e3fee9): c_c
       
    87   t0(ea705abc4f51)^ c_b (base)
    80   $ hg stack -Tjson | python -m json.tool
    88   $ hg stack -Tjson | python -m json.tool
    81   [
    89   [
    82       {
    90       {
    83           "isentry": true,
    91           "isentry": true,
    84           "topic.stack.desc": "c_f",
    92           "topic.stack.desc": "c_f",
   116           "topic.stack.state.symbol": ":"
   124           "topic.stack.state.symbol": ":"
   117       },
   125       },
   118       {
   126       {
   119           "isentry": false,
   127           "isentry": false,
   120           "topic.stack.desc": "c_b",
   128           "topic.stack.desc": "c_b",
       
   129           "topic.stack.index": 0,
       
   130           "topic.stack.state": [
       
   131               "base"
       
   132           ],
       
   133           "topic.stack.state.symbol": "^"
       
   134       }
       
   135   ]
       
   136   $ hg stack -v -Tjson | python -m json.tool
       
   137   [
       
   138       {
       
   139           "isentry": true,
       
   140           "topic.stack.desc": "c_f",
       
   141           "topic.stack.index": 4,
       
   142           "topic.stack.shortnode": "6559e6d93aea",
       
   143           "topic.stack.state": [
       
   144               "current"
       
   145           ],
       
   146           "topic.stack.state.symbol": "@"
       
   147       },
       
   148       {
       
   149           "isentry": true,
       
   150           "topic.stack.desc": "c_e",
       
   151           "topic.stack.index": 3,
       
   152           "topic.stack.shortnode": "0f9ac936c87d",
       
   153           "topic.stack.state": [
       
   154               "clean"
       
   155           ],
       
   156           "topic.stack.state.symbol": ":"
       
   157       },
       
   158       {
       
   159           "isentry": true,
       
   160           "topic.stack.desc": "c_d",
       
   161           "topic.stack.index": 2,
       
   162           "topic.stack.shortnode": "e629654d7050",
       
   163           "topic.stack.state": [
       
   164               "clean"
       
   165           ],
       
   166           "topic.stack.state.symbol": ":"
       
   167       },
       
   168       {
       
   169           "isentry": true,
       
   170           "topic.stack.desc": "c_c",
       
   171           "topic.stack.index": 1,
       
   172           "topic.stack.shortnode": "8522f9e3fee9",
       
   173           "topic.stack.state": [
       
   174               "clean"
       
   175           ],
       
   176           "topic.stack.state.symbol": ":"
       
   177       },
       
   178       {
       
   179           "isentry": false,
       
   180           "topic.stack.desc": "c_b",
       
   181           "topic.stack.index": 0,
       
   182           "topic.stack.shortnode": "ea705abc4f51",
   121           "topic.stack.state": [
   183           "topic.stack.state": [
   122               "base"
   184               "base"
   123           ],
   185           ],
   124           "topic.stack.state.symbol": "^"
   186           "topic.stack.state.symbol": "^"
   125       }
   187       }
   178   ### branch: default
   240   ### branch: default
   179   t4$ c_f (unstable)
   241   t4$ c_f (unstable)
   180   t3$ c_e (unstable)
   242   t3$ c_e (unstable)
   181   t2@ c_d (current)
   243   t2@ c_d (current)
   182   t1: c_c
   244   t1: c_c
   183     ^ c_b
   245   t0^ c_b (base)
   184   $ hg up t3
   246   $ hg up t3
   185   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   247   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   186   $ hg topic --list
   248   $ hg topic --list
   187   ### topic: foo
   249   ### topic: foo
   188   ### branch: default
   250   ### branch: default
   189   t4$ c_f (unstable)
   251   t4$ c_f (unstable)
   190   t3$ c_e (current unstable)
   252   t3$ c_e (current unstable)
   191   t2: c_d
   253   t2: c_d
   192   t1: c_c
   254   t1: c_c
   193     ^ c_b
   255   t0^ c_b (base)
   194   $ hg topic --list --color=debug
   256   $ hg topic --list --color=debug
   195   [topic.stack.summary.topic|### topic: [topic.active|foo]]
   257   [topic.stack.summary.topic|### topic: [topic.active|foo]]
   196   [topic.stack.summary.branches|### branch: default]
   258   [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)]
   259   [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)]
   260   [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]
   261   [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]
   262   [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]
   263   [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
   264   $ hg up t2
   203   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   265   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   204 
   266 
   205 Also test the revset:
   267 Also test the revset:
   206 
   268 
   279   t2^ c_d (base)
   341   t2^ c_d (base)
   280   t4@ c_h (current)
   342   t4@ c_h (current)
   281   t3: c_g
   343   t3: c_g
   282   t2: c_d
   344   t2: c_d
   283   t1: c_c
   345   t1: c_c
   284     ^ c_b
   346   t0^ c_b (base)
   285 
   347 
   286 Case with multiple heads on the topic with unstability involved
   348 Case with multiple heads on the topic with unstability involved
   287 ---------------------------------------------------------------
   349 ---------------------------------------------------------------
   288 
   350 
   289 We amend the message to make sure the display base pick the right changeset
   351 We amend the message to make sure the display base pick the right changeset
   323   t2^ c_D (base)
   385   t2^ c_D (base)
   324   t4: c_h
   386   t4: c_h
   325   t3: c_g
   387   t3: c_g
   326   t2@ c_D (current)
   388   t2@ c_D (current)
   327   t1: c_c
   389   t1: c_c
   328     ^ c_b
   390   t0^ c_b (base)
   329 
   391 
   330 Trying to list non existing topic
   392 Trying to list non existing topic
   331   $ hg stack thisdoesnotexist
   393   $ hg stack thisdoesnotexist
   332   abort: cannot resolve "thisdoesnotexist": no such topic found
   394   abort: cannot resolve "thisdoesnotexist": no such topic found
   333   [255]
   395   [255]