Mercurial > evolve
diff tests/test-topic-stack.t @ 2712:f19b314d8475
topics: add t0 and b0 to the stack
t0 or b0 will be the base of the stack and it's the parent of t1 or b1. The cool
thing about this is that if you update to t0 using `hg up t0` or do `hg prev` on
t1, you will be updated to t0 with the current topic preserved.
This patch adds t0 to stack and implement the preserving topic case for t0 while
using `hg update`.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 04 Jul 2017 01:30:14 +0530 |
parents | 90e11985d0cc |
children | bd3824d1b795 |
line wrap: on
line diff
--- a/tests/test-topic-stack.t Tue Jul 04 00:15:36 2017 +0530 +++ b/tests/test-topic-stack.t Tue Jul 04 01:30:14 2017 +0530 @@ -76,7 +76,7 @@ t3: c_e t2: c_d t1: c_c - ^ c_b + t0^ c_b (base) $ hg stack -Tjson | python -m json.tool [ { @@ -118,6 +118,7 @@ { "isentry": false, "topic.stack.desc": "c_b", + "topic.stack.index": 0, "topic.stack.state": [ "base" ], @@ -180,7 +181,7 @@ t3$ c_e (unstable) t2@ c_d (current) t1: c_c - ^ c_b + t0^ c_b (base) $ hg up t3 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg topic --list @@ -190,7 +191,7 @@ t3$ c_e (current unstable) t2: c_d t1: c_c - ^ c_b + t0^ c_b (base) $ hg topic --list --color=debug [topic.stack.summary.topic|### topic: [topic.active|foo]] [topic.stack.summary.branches|### branch: default] @@ -198,7 +199,7 @@ [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)] [topic.stack.index topic.stack.index.clean|t2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d] [topic.stack.index topic.stack.index.clean|t1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c] - [topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b] + [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)] $ hg up t2 1 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -281,7 +282,7 @@ t3: c_g t2: c_d t1: c_c - ^ c_b + t0^ c_b (base) Case with multiple heads on the topic with unstability involved --------------------------------------------------------------- @@ -325,7 +326,7 @@ t3: c_g t2@ c_D (current) t1: c_c - ^ c_b + t0^ c_b (base) Trying to list non existing topic $ hg stack thisdoesnotexist