# HG changeset patch # User Pierre-Yves David # Date 1535987256 -7200 # Node ID fb4801478d5d7efd72fc61b01a0f4c6cd13502f7 # Parent 1aa5f851d2c082115e2b193953b81a24b4bfff72 stack: display 's#' instead of 't#' and 'b#' If we want people to use it, we should display it. diff -r 1aa5f851d2c0 -r fb4801478d5d hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Mon Sep 03 16:41:32 2018 +0200 +++ b/hgext3rd/topic/stack.py Mon Sep 03 17:07:36 2018 +0200 @@ -239,11 +239,11 @@ msg %= (branch, topic) raise error.ProgrammingError(msg) elif topic is not None: - prefix = 't' + prefix = 's' if topic not in repo.topics: raise error.Abort(_('cannot resolve "%s": no such topic found') % topic) elif branch is not None: - prefix = 'b' + prefix = 's' else: raise error.ProgrammingError('neither branch and topic specified (not defined yet)') diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-evolve-topic.t --- a/tests/test-evolve-topic.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-evolve-topic.t Mon Sep 03 17:07:36 2018 +0200 @@ -80,11 +80,11 @@ ### topic: foo (?) ### branch: default (?) ### target: default (branch) - t4@ add fff (current) - t3: add eee - t2: add ddd - t1: add ccc - t0^ add bbb (base) + s4@ add fff (current) + s3: add eee + s2: add ddd + s1: add ccc + s0^ add bbb (base) $ hg up 'desc(ddd)' 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ echo ddd >> ddd @@ -260,12 +260,12 @@ $ hg stack ### topic: bar ### target: default (branch) - t5$ add jjj (unstable) - t4$ add iii (unstable) - t3$ add hhh (unstable) - t2$ add ggg (current unstable) - t1: add fff - t0^ add eee (base) + s5$ add jjj (unstable) + s4$ add iii (unstable) + s3$ add hhh (unstable) + s2$ add ggg (current unstable) + s1: add fff + s0^ add eee (base) $ hg prev 0 files updated, 0 files merged, 1 files removed, 0 files unresolved diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-stack-branch.t --- a/tests/test-stack-branch.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-stack-branch.t Mon Sep 03 17:07:36 2018 +0200 @@ -56,8 +56,8 @@ 0 files updated, 0 files merged, 4 files removed, 0 files unresolved $ hg stack ### target: other (branch) - b2@ c_b (current) - b1: c_a + s2@ c_b (current) + s1: c_a $ hg phase --public 'branch("other")' $ hg up foo 4 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -71,18 +71,18 @@ foo $ hg stack ### target: foo (branch) - b4@ c_f (current) - b3: c_e - b2: c_d - b1: c_c - b0^ c_b (base) + s4@ c_f (current) + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) $ hg stack -v ### target: foo (branch) - b4(913c298d8b0a)@ c_f (current) - b3(4f2a69f6d380): c_e - b2(f61adbacd17a): c_d - b1(3e9313bc4b71): c_c - b0(4a04f1104a27)^ c_b (base) + s4(913c298d8b0a)@ c_f (current) + s3(4f2a69f6d380): c_e + s2(f61adbacd17a): c_d + s1(3e9313bc4b71): c_c + s0(4a04f1104a27)^ c_b (base) Test "t#" reference ------------------- @@ -127,20 +127,20 @@ $ hg stack ### target: foo (branch) - b4$ c_f (unstable) - b3$ c_e (unstable) - b2@ c_d (current) - b1: c_c - b0^ c_b (base) + s4$ c_f (unstable) + s3$ c_e (unstable) + s2@ c_d (current) + s1: c_c + s0^ c_b (base) $ hg up b3 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg stack ### target: foo (branch) - b4$ c_f (unstable) - b3$ c_e (current unstable) - b2: c_d - b1: c_c - b0^ c_b (base) + s4$ c_f (unstable) + s3$ c_e (current unstable) + s2: c_d + s1: c_c + s0^ c_b (base) $ hg up b2 1 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -208,14 +208,14 @@ $ hg stack ### target: foo (branch) (2 heads) - b6@ c_h (current) - b5: c_g - b2^ c_d (base) - b4: c_f - b3: c_e - b2: c_d - b1: c_c - b0^ c_b (base) + s6@ c_h (current) + s5: c_g + s2^ c_d (base) + s4: c_f + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) Case with multiple heads on the topic with unstability involved --------------------------------------------------------------- @@ -252,14 +252,14 @@ $ hg stack ### target: foo (branch) (2 heads) - b6: c_h - b5: c_g - b2^ c_D (base current) - b4$ c_f (unstable) - b3$ c_e (unstable) - b2@ c_D (current) - b1: c_c - b0^ c_b (base) + s6: c_h + s5: c_g + s2^ c_D (base current) + s4$ c_f (unstable) + s3$ c_e (unstable) + s2@ c_D (current) + s1: c_c + s0^ c_b (base) Check that stack doesn't show draft changesets on a branch ---------------------------------------------------------- @@ -286,24 +286,24 @@ $ hg stack ### target: foo (branch) (2 heads) - b6: c_h - b5: c_g - b2^ c_D (base current) - b4$ c_f (unstable) - b3$ c_e (unstable) - b2@ c_D (current) - b1: c_c - b0^ c_b (base) + s6: c_h + s5: c_g + s2^ c_D (base current) + s4$ c_f (unstable) + s3$ c_e (unstable) + s2@ c_D (current) + s1: c_c + s0^ c_b (base) $ hg phase --public b1 $ hg stack ### target: foo (branch) (2 heads) - b5: c_h - b4: c_g - b1^ c_D (base current) - b3$ c_f (unstable) - b2$ c_e (unstable) - b1@ c_D (current) - b0^ c_c (base) + s5: c_h + s4: c_g + s1^ c_D (base current) + s3$ c_f (unstable) + s2$ c_e (unstable) + s1@ c_D (current) + s0^ c_c (base) Check that stack doesn't show changeset with a topic ---------------------------------------------------- @@ -312,7 +312,7 @@ changed topic on 2 changes $ hg stack ### target: foo (branch) - b3$ c_f (unstable) - b2$ c_e (unstable) - b1@ c_D (current) - b0^ c_c (base) + s3$ c_f (unstable) + s2$ c_e (unstable) + s1@ c_D (current) + s0^ c_c (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-fold.t --- a/tests/test-topic-fold.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-fold.t Mon Sep 03 17:07:36 2018 +0200 @@ -55,8 +55,8 @@ $ hg stack ### topic: myfeature ### target: default (branch) - t1@ folded (current) - t0^ add ROOT (base) + s1@ folded (current) + s0^ add ROOT (base) $ logtopic @ 3:4fd43e5bdc443dc8489edffac19bd8f93ccf1a5c | topics: myfeature diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-rebase.t --- a/tests/test-topic-rebase.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-rebase.t Mon Sep 03 17:07:36 2018 +0200 @@ -47,8 +47,8 @@ $ hg stack ### topic: myfeature ### target: default (branch) - t1@ add feature1 (current) - t0^ add ROOT (base) + s1@ add feature1 (current) + s0^ add ROOT (base) $ logtopic @ 1:39e7a938055e87615edf675c24a10997ff05bb06 | topics: myfeature @@ -77,8 +77,8 @@ $ hg stack ### topic: myfeature ### target: default (branch) - t1@ add feature1 (current) - t0^ add default (base) + s1@ add feature1 (current) + s0^ add default (base) $ logtopic @ 3:fc6593661cf3256ba165cbccd6019ead17cc3726 | topics: myfeature @@ -91,8 +91,8 @@ $ hg stack ### topic: myfeature ### target: default (branch) - t1@ add feature1 (current) - t0^ add default (base) + s1@ add feature1 (current) + s0^ add default (base) Check that rebase keep the topic in case of merge conflict ---------------------------------------------------------- @@ -157,12 +157,12 @@ $ hg stack ### topic: myotherfeature ### target: default (branch) - t1@ myotherfeature1 (current) - t0^ default3 (base) + s1@ myotherfeature1 (current) + s0^ default3 (base) $ hg update --rev 7 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg stack ### topic: myotherfeature ### target: default (branch) - t1@ myotherfeature1 (current) - t0^ default3 (base) + s1@ myotherfeature1 (current) + s0^ default3 (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-shelve.t --- a/tests/test-topic-shelve.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-shelve.t Mon Sep 03 17:07:36 2018 +0200 @@ -26,7 +26,7 @@ $ hg stack ### topic: testing-shelve ### target: default (branch) - t1@ First commit (current) + s1@ First commit (current) shelve test ----------- @@ -39,7 +39,7 @@ $ hg stack ### topic: testing-shelve ### target: default (branch) - t1@ First commit (current) + s1@ First commit (current) unshelve test ------------- @@ -50,4 +50,4 @@ $ hg stack ### topic: testing-shelve ### target: default (branch) - t1@ First commit (current) + s1@ First commit (current) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-stack-complex.t --- a/tests/test-topic-stack-complex.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-stack-complex.t Mon Sep 03 17:07:36 2018 +0200 @@ -42,10 +42,10 @@ $ hg stack ### topic: foo ### target: default (branch) - t3@ Added e and f (current) - t2: Added c and d - t1: Added a and b - t0^ Added foo (base) + s3@ Added e and f (current) + s2: Added c and d + s1: Added a and b + s0^ Added foo (base) $ hg prev 0 files updated, 0 files merged, 2 files removed, 0 files unresolved [2] Added c and d @@ -86,11 +86,11 @@ $ hg stack ### topic: foo ### target: default (branch) - t4$ Added e and f (unstable) - t3@ split2 (current) - t2: split1 - t1: Added a and b - t0^ Added foo (base) + s4$ Added e and f (unstable) + s3@ split2 (current) + s2: split1 + s1: Added a and b + s0^ Added foo (base) $ hg show work @ 5cce (foo) split2 @@ -129,8 +129,8 @@ $ hg stack ### topic: foo (2 heads) ### target: default (branch), 2 behind - t4$ Added e and f (unstable) - t3$ split2 (unstable) - t2@ split1 (current) - t1: Added a and b - t0^ Added foo (base) + s4$ Added e and f (unstable) + s3$ split2 (unstable) + s2@ split1 (current) + s1: Added a and b + s0^ Added foo (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-stack-data.t --- a/tests/test-topic-stack-data.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-stack-data.t Mon Sep 03 17:07:36 2018 +0200 @@ -264,39 +264,39 @@ $ hg stack bar ### topic: bar (2 heads) ### target: default (branch) - t5: add bar_c - t2^ add bar_b (base) - t4$ add bar_e (unstable) - t3: bar1_d - t2: add bar_b - t1: add bar_a - t0^ add base_e (base) + s5: add bar_c + s2^ add bar_b (base) + s4$ add bar_e (unstable) + s3: bar1_d + s2: add bar_b + s1: add bar_a + s0^ add base_e (base) $ hg stack bar -v ### topic: bar (2 heads) ### target: default (branch) - t5(9cbadf11b44d): add bar_c - t2(e555c7e8c767)^ add bar_b (base) - t4(a920412b5a05)$ add bar_e (unstable) - t3(6915989374b1): bar1_d - t2(e555c7e8c767): add bar_b - t1(a5c2b4e00bbf): add bar_a - t0(92f489a6251f)^ add base_e (base) + s5(9cbadf11b44d): add bar_c + s2(e555c7e8c767)^ add bar_b (base) + s4(a920412b5a05)$ add bar_e (unstable) + s3(6915989374b1): bar1_d + s2(e555c7e8c767): add bar_b + s1(a5c2b4e00bbf): add bar_a + s0(92f489a6251f)^ add base_e (base) $ hg stack baz ### topic: baz ### target: default (branch), 2 behind - t2: add baz_b - t1: add baz_a - t0^ add base_c (base) + s2: add baz_b + s1: add baz_a + s0^ add base_c (base) $ hg stack foo ### topic: foo ### target: lake (branch), ambiguous rebase destination - branch 'lake' has 2 heads - t2@ add foo_b (current) - t1: add foo_a - t0^ add lake_a (base) + s2@ add foo_b (current) + s1: add foo_a + s0^ add lake_a (base) $ hg stack fuz ### topic: fuz ### target: default (branch), 1 behind - t3$ add fuz_c (unstable) - t2$ add fuz_b (unstable) - t1: fuz1_a - t0^ add base_d (base) + s3$ add fuz_c (unstable) + s2$ add fuz_b (unstable) + s1: fuz1_a + s0^ add base_d (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-stack.t --- a/tests/test-topic-stack.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-stack.t Mon Sep 03 17:07:36 2018 +0200 @@ -60,8 +60,8 @@ $ hg topic --list ### topic: other ### target: default (branch) - t2@ c_b (current) - t1: c_a + s2@ c_b (current) + s1: c_a $ hg phase --public 'topic("other")' active topic 'other' is now empty (use 'hg topic --clear' to clear it if needed) @@ -75,7 +75,7 @@ ### topic: other ### target: default (branch) (stack is empty) - t0^ c_b (base current) + s0^ c_b (base current) $ hg up foo switching to topic foo @@ -91,19 +91,19 @@ $ hg stack ### topic: foo ### target: default (branch) - t4@ c_f (current) - t3: c_e - t2: c_d - t1: c_c - t0^ c_b (base) + s4@ c_f (current) + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) $ hg stack -v ### topic: foo ### target: default (branch) - t4(6559e6d93aea)@ c_f (current) - t3(0f9ac936c87d): c_e - t2(e629654d7050): c_d - t1(8522f9e3fee9): c_c - t0(ea705abc4f51)^ c_b (base) + s4(6559e6d93aea)@ c_f (current) + s3(0f9ac936c87d): c_e + s2(e629654d7050): c_d + s1(8522f9e3fee9): c_c + s0(ea705abc4f51)^ c_b (base) $ hg stack -Tjson | python -m json.tool [ { @@ -213,21 +213,21 @@ $ hg stack ### topic: foo ### target: default (branch) - t4@ c_f (current) - t3: c_e - t2: c_d - t1: c_c - t0^ c_b (base) + s4@ c_f (current) + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) $ hg topics --config ui.strict=true * foo (4 changesets) $ hg stack --config ui.strict=true ### topic: foo ### target: default (branch) - t4@ c_f (current) - t3: c_e - t2: c_d - t1: c_c - t0^ c_b (base) + s4@ c_f (current) + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) error case, nothing to list @@ -235,7 +235,7 @@ $ hg stack ### target: default (branch) (stack is empty) - b0^ c_f (base current) + s0^ c_f (base current) Test "t#" reference ------------------- @@ -287,29 +287,29 @@ $ hg topic --list ### topic: foo ### target: default (branch) - t4$ c_f (unstable) - t3$ c_e (unstable) - t2@ c_d (current) - t1: c_c - t0^ c_b (base) + s4$ c_f (unstable) + s3$ c_e (unstable) + s2@ c_d (current) + s1: c_c + s0^ c_b (base) $ hg up s3 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg topic --list ### topic: foo ### target: default (branch) - t4$ c_f (unstable) - t3$ c_e (current unstable) - t2: c_d - t1: c_c - t0^ c_b (base) + s4$ c_f (unstable) + s3$ c_e (current unstable) + s2: c_d + s1: c_c + s0^ c_b (base) $ hg topic --list --color=debug [topic.stack.summary.topic|### topic: [topic.active|foo]] [topic.stack.summary.branches|### target: default (branch)] - [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)] - [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.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)] + [topic.stack.index topic.stack.index.unstable|s4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)] + [topic.stack.index topic.stack.index.current topic.stack.index.unstable|s3][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|s2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d] + [topic.stack.index topic.stack.index.clean|s1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c] + [topic.stack.index topic.stack.index.base|s0][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 s2 1 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -385,14 +385,14 @@ $ hg top -l ### topic: foo (2 heads) ### target: default (branch) - t6@ c_h (current) - t5: c_g - t2^ c_d (base) - t4: c_f - t3: c_e - t2: c_d - t1: c_c - t0^ c_b (base) + s6@ c_h (current) + s5: c_g + s2^ c_d (base) + s4: c_f + s3: c_e + s2: c_d + s1: c_c + s0^ c_b (base) Case with multiple heads on the topic with unstability involved --------------------------------------------------------------- @@ -430,14 +430,14 @@ $ hg topic --list ### topic: foo (2 heads) ### target: default (branch) - t6: c_h - t5: c_g - t2^ c_D (base current) - t4$ c_f (unstable) - t3$ c_e (unstable) - t2@ c_D (current) - t1: c_c - t0^ c_b (base) + s6: c_h + s5: c_g + s2^ c_D (base current) + s4$ c_f (unstable) + s3$ c_e (unstable) + s2@ c_D (current) + s1: c_c + s0^ c_b (base) Trying to list non existing topic $ hg stack thisdoesnotexist @@ -556,21 +556,21 @@ $ hg stack ### topic: foobar ### target: default (branch), 3 behind - t2@ c_e (current) + s2@ c_e (current) ^ c_h - t1: c_D - t0^ c_c (base) + s1: c_D + s0^ c_c (base) $ hg stack foo ### topic: foo ### target: default (branch), ambiguous rebase destination - topic 'foo' has 3 heads - t4: c_f + s4: c_f ^ c_e - t3: c_h - t2: c_g + s3: c_h + s2: c_g ^ c_D - t1: c_c - t0^ c_b (base) + s1: c_c + s0^ c_b (base) case involving a merge ---------------------- @@ -646,24 +646,24 @@ $ hg stack red ### topic: red ### target: default (branch), 6 behind - t5: c_H + s5: c_H ^ c_G ^ c_D - t4: c_C - t1^ c_B (base) - t3: c_F - t2: c_E - t1: c_B - t0^ c_A (base) + s4: c_C + s1^ c_B (base) + s3: c_F + s2: c_E + s1: c_B + s0^ c_A (base) $ hg stack blue ### topic: blue ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads - t3@ c_I (current) + s3@ c_I (current) ^ c_H - t2: c_D + s2: c_D ^ c_C - t1: c_G - t0^ c_F (base) + s1: c_G + s0^ c_F (base) Even with some obsolete and orphan changesets @@ -712,24 +712,24 @@ $ hg stack red ### topic: red ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads - t5$ c_H (unstable) + s5$ c_H (unstable) ^ c_G ^ c_D - t4$ c_C (unstable) - t1^ c_B (base) - t3$ c_F (unstable) - t2$ c_E (unstable) - t1: c_B - t0^ c_A (base) + s4$ c_C (unstable) + s1^ c_B (base) + s3$ c_F (unstable) + s2$ c_E (unstable) + s1: c_B + s0^ c_A (base) $ hg stack blue ### topic: blue ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads - t3$ c_I (unstable) + s3$ c_I (unstable) ^ c_H - t2$ c_G (unstable) + s2$ c_G (unstable) ^ c_F - t1$ c_D (current unstable) - t0^ c_C (base unstable) + s1$ c_D (current unstable) + s0^ c_C (base unstable) more obsolescence @@ -786,24 +786,24 @@ $ hg stack red ### topic: red ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads - t5$ c_H (unstable) + s5$ c_H (unstable) ^ c_G ^ c_D - t4$ c_F (unstable) - t3$ c_E (unstable) - t1^ c_B (base) - t2$ c_C (unstable) - t1: c_B - t0^ c_A (base) + s4$ c_F (unstable) + s3$ c_E (unstable) + s1^ c_B (base) + s2$ c_C (unstable) + s1: c_B + s0^ c_A (base) $ hg stack blue ### topic: blue ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads - t3$ c_I (unstable) + s3$ c_I (unstable) ^ c_H - t2$ c_G (unstable) + s2$ c_G (unstable) ^ c_F - t1$ c_D (current unstable) - t0^ c_C (base unstable) + s1$ c_D (current unstable) + s0^ c_C (base unstable) Test stack behavior with a split -------------------------------- @@ -820,10 +820,10 @@ $ hg stack ### topic: blue ### target: default (branch) - t3: c_I - t2: c_G - t1@ c_D (current) - t0^ c_A (base) + s3: c_I + s2: c_G + s1@ c_D (current) + s0^ c_A (base) making a split (first get something to split) @@ -842,10 +842,10 @@ $ hg stack ### topic: blue ### target: default (branch) - t3$ c_I (unstable) - t2@ c_G (current) - t1: c_D - t0^ c_A (base) + s3$ c_I (unstable) + s2@ c_G (current) + s1: c_D + s0^ c_A (base) $ hg --config extensions.evolve= --config ui.interactive=yes split << EOF > y > y @@ -922,8 +922,8 @@ $ hg stack ### topic: blue ### target: default (branch) - t4$ c_I (unstable) - t3@ c_G (current) - t2: c_G - t1: c_D - t0^ c_A (base) + s4$ c_I (unstable) + s3@ c_G (current) + s2: c_G + s1: c_D + s0^ c_A (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic-tutorial.t --- a/tests/test-topic-tutorial.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic-tutorial.t Mon Sep 03 17:07:36 2018 +0200 @@ -252,9 +252,9 @@ $ hg stack ### topic: food ### target: default (branch) - t2@ adding fruits (current) - t1: adding condiments - t0^ Shopping list (base) + s2@ adding fruits (current) + s1: adding condiments + s0^ Shopping list (base) The topic deactivates when we update away from it: @@ -614,7 +614,7 @@ ### topic: food ### target: default (branch) (stack is empty) - t0^ adding fruits (base current) + s0^ adding fruits (base current) $ hg log --graph @ changeset: 5:2d50db8b5b4c @@ -791,9 +791,9 @@ $ hg stack ### topic: drinks ### target: default (branch) - t2@ Adding orange juice (current) - t1: Adding apple juice - t0^ adding fruits (base) + s2@ Adding orange juice (current) + s1: Adding apple juice + s0^ adding fruits (base) $ hg update tools switching to topic tools @@ -802,10 +802,10 @@ $ hg stack ### topic: tools ### target: default (branch) - t3@ Adding drill (current) - t2: Adding saw - t1: Adding hammer - t0^ adding fruits (base) + s3@ Adding drill (current) + s2: Adding saw + s1: Adding hammer + s0^ adding fruits (base) They are seen as independent branches by Mercurial. No rebase or merge between them will be attempted by default: @@ -1121,10 +1121,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3@ Adding drill (current) - t2: Adding saw - t1: Adding hammer - t0^ add a pair of shoes (base) + s3@ Adding drill (current) + s2: Adding saw + s1: Adding hammer + s0^ add a pair of shoes (base) Working Within Your Stack =========================== @@ -1140,10 +1140,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3@ Adding drill (current) - t2: Adding saw - t1: Adding hammer - t0^ add a pair of shoes (base) + s3@ Adding drill (current) + s2: Adding saw + s1: Adding hammer + s0^ add a pair of shoes (base) You can navigate in your current stack with `previous` and `next`. @@ -1156,10 +1156,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3: Adding drill - t2@ Adding saw (current) - t1: Adding hammer - t0^ add a pair of shoes (base) + s3: Adding drill + s2@ Adding saw (current) + s1: Adding hammer + s0^ add a pair of shoes (base) `next` will move you forward to the topic head. @@ -1170,10 +1170,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3@ Adding drill (current) - t2: Adding saw - t1: Adding hammer - t0^ add a pair of shoes (base) + s3@ Adding drill (current) + s2: Adding saw + s1: Adding hammer + s0^ add a pair of shoes (base) You can also directly jump to a changeset within your stack with the revset `t#`. @@ -1183,10 +1183,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3: Adding drill - t2: Adding saw - t1@ Adding hammer (current) - t0^ add a pair of shoes (base) + s3: Adding drill + s2: Adding saw + s1@ Adding hammer (current) + s0^ add a pair of shoes (base) Editing your work mid-stack --------------------------- @@ -1196,10 +1196,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3: Adding drill - t2: Adding saw - t1@ Adding hammer (current) - t0^ add a pair of shoes (base) + s3: Adding drill + s2: Adding saw + s1@ Adding hammer (current) + s0^ add a pair of shoes (base) $ hg amend -m "Adding hammer to the shopping list" 2 new orphan changesets @@ -1358,10 +1358,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3$ Adding drill (unstable) - t2$ Adding saw (unstable) - t1@ Adding hammer to the shopping list (current) - t0^ add a pair of shoes (base) + s3$ Adding drill (unstable) + s2$ Adding saw (unstable) + s1@ Adding hammer to the shopping list (current) + s0^ add a pair of shoes (base) It's easy to stabilize the situation, `next` has an `--evolve` option. It will do the necessary relocation of `s2` and `s3` over the new `s1` without having @@ -1375,10 +1375,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3$ Adding drill (unstable) - t2@ Adding saw (current) - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s3$ Adding drill (unstable) + s2@ Adding saw (current) + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) One more to go: @@ -1390,10 +1390,10 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t3@ Adding drill (current) - t2: Adding saw - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s3@ Adding drill (current) + s2: Adding saw + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) Let's take a look at `hg log` once again: @@ -1533,12 +1533,12 @@ $ hg stack ### topic: tools (2 heads) ### target: default (branch), 2 behind - t4: Adding drill - t3: Adding saw - t1^ Adding hammer to the shopping list (base) - t2@ Adding nails (current) - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s4: Adding drill + s3: Adding saw + s1^ Adding hammer to the shopping list (base) + s2@ Adding nails (current) + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) Solving this situation is easy with a topic: use merge or rebase. Merge within a multi-headed stack will use the other topic head as @@ -1783,11 +1783,11 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t4@ Adding drill (current) - t3: Adding saw - t2: Adding nails - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s4@ Adding drill (current) + s3: Adding saw + s2: Adding nails + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) Collaborating through a non-publishing server ============================================= @@ -1858,11 +1858,11 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t4@ Adding drill (current) - t3: Adding saw - t2: Adding nails - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s4@ Adding drill (current) + s3: Adding saw + s2: Adding nails + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) We can also add new changesets and share them: @@ -1898,9 +1898,9 @@ $ hg stack ### topic: tools ### target: default (branch), 2 behind - t5@ Adding screws (current) - t4: Adding drill - t3: Adding saw - t2: Adding nails - t1: Adding hammer to the shopping list - t0^ add a pair of shoes (base) + s5@ Adding screws (current) + s4: Adding drill + s3: Adding saw + s2: Adding nails + s1: Adding hammer to the shopping list + s0^ add a pair of shoes (base) diff -r 1aa5f851d2c0 -r fb4801478d5d tests/test-topic.t --- a/tests/test-topic.t Mon Sep 03 16:41:32 2018 +0200 +++ b/tests/test-topic.t Mon Sep 03 17:07:36 2018 +0200 @@ -273,7 +273,7 @@ ### topic: narf ### target: default (branch) (stack is empty) - t0^ Add file delta (base current) + s0^ Add file delta (base current) Add commits to topic @@ -802,8 +802,8 @@ $ hg stack ### topic: fran ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads - t1@ start on fran (current) - t0^ Add file delta (base) + s1@ start on fran (current) + s0^ Add file delta (base) $ hg up s0 preserving the current topic 'fran' @@ -814,8 +814,8 @@ $ hg stack ### topic: fran ### target: default (branch), ambiguous rebase destination - branch 'default' has 2 heads - t1: start on fran - t0^ Add file delta (base current) + s1: start on fran + s0^ Add file delta (base current) $ hg topics --age * fran (1970-01-01 by test)