tests/test-topic-stack.t
changeset 4065 fbc51e98cf13
parent 3770 eb928f5728c4
child 4066 1aa5f851d2c0
equal deleted inserted replaced
4064:a2c0133006c6 4065:fbc51e98cf13
   239 
   239 
   240 Test "t#" reference
   240 Test "t#" reference
   241 -------------------
   241 -------------------
   242 
   242 
   243 
   243 
   244   $ hg up t2
   244   $ hg up s2
   245   abort: cannot resolve "t2": no active topic
   245   abort: cannot resolve "s2": branch "default" has only 0 changesets
   246   [255]
   246   [255]
   247   $ hg topic foo
   247   $ hg topic foo
   248   marked working directory as topic: foo
   248   marked working directory as topic: foo
   249   $ hg up t42
   249   $ hg up t42
   250   abort: cannot resolve "t42": topic "foo" has only 4 changesets
   250   abort: cannot resolve "t42": topic "foo" has only 4 changesets
   251   [255]
   251   [255]
   252   $ hg up t2
   252   $ hg up s42
       
   253   abort: cannot resolve "s42": topic "foo" has only 4 changesets
       
   254   [255]
       
   255   $ hg up s2
   253   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   256   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
   254   $ hg summary
   257   $ hg summary
   255   parent: 3:e629654d7050 
   258   parent: 3:e629654d7050 
   256    c_d
   259    c_d
   257   branch: default
   260   branch: default
   287   t4$ c_f (unstable)
   290   t4$ c_f (unstable)
   288   t3$ c_e (unstable)
   291   t3$ c_e (unstable)
   289   t2@ c_d (current)
   292   t2@ c_d (current)
   290   t1: c_c
   293   t1: c_c
   291   t0^ c_b (base)
   294   t0^ c_b (base)
   292   $ hg up t3
   295   $ hg up s3
   293   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   296   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   294   $ hg topic --list
   297   $ hg topic --list
   295   ### topic: foo
   298   ### topic: foo
   296   ### target: default (branch)
   299   ### target: default (branch)
   297   t4$ c_f (unstable)
   300   t4$ c_f (unstable)
   305   [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)]
   308   [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)]
   306   [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)]
   309   [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)]
   307   [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
   310   [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
   308   [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
   311   [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
   309   [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)]
   312   [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)]
   310   $ hg up t2
   313   $ hg up s2
   311   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   314   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   312 
   315 
   313 Also test the revset:
   316 Also test the revset:
   314 
   317 
   315   $ hg log -r 'stack()'
   318   $ hg log -r 'stack()'
   805 Test stack behavior with a split
   808 Test stack behavior with a split
   806 --------------------------------
   809 --------------------------------
   807 
   810 
   808 get things linear again
   811 get things linear again
   809 
   812 
   810   $ hg rebase -r t1 -d default
   813   $ hg rebase -r s1 -d default
   811   rebasing 16:1d84ec948370 "c_D" (tip blue)
   814   rebasing 16:1d84ec948370 "c_D" (tip blue)
   812   switching to topic blue
   815   switching to topic blue
   813   $ hg rebase -r t2 -d t1
   816   $ hg rebase -r s2 -d s1
   814   rebasing 13:3ab2eedae500 "c_G" (blue)
   817   rebasing 13:3ab2eedae500 "c_G" (blue)
   815   $ hg rebase -r t3 -d t2
   818   $ hg rebase -r s3 -d s2
   816   rebasing 8:3bfe800e0486 "c_I" (blue)
   819   rebasing 8:3bfe800e0486 "c_I" (blue)
   817   $ hg stack
   820   $ hg stack
   818   ### topic: blue
   821   ### topic: blue
   819   ### target: default (branch)
   822   ### target: default (branch)
   820   t3: c_I
   823   t3: c_I
   823   t0^ c_A (base)
   826   t0^ c_A (base)
   824 
   827 
   825 making a split
   828 making a split
   826 (first get something to split)
   829 (first get something to split)
   827 
   830 
   828   $ hg up t2
   831   $ hg up s2
   829   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   832   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   830   $ hg status --change .
   833   $ hg status --change .
   831   A ggg
   834   A ggg
   832   $ echo zzz > Z
   835   $ echo zzz > Z
   833   $ hg add Z
   836   $ hg add Z