# HG changeset patch # User Pierre-Yves David # Date 1508504163 -7200 # Node ID 3eca2cbdc4985b641ce190d636f6afab23f8def7 # Parent 144989dabe93ff24f13ec9bd320baeff3ce099cd stack: order the adjective of changeset The new order give more interesting result: * base current * base unstable * current unstable It seems more harmonious this way. Base seems the most core and immutable adjective describing the element. Then current is a volatile but important one. Finally, unstable is less information than current, so it goes last. diff -r 144989dabe93 -r 3eca2cbdc498 hgext3rd/topic/stack.py --- a/hgext3rd/topic/stack.py Sun Oct 15 00:03:59 2017 +0530 +++ b/hgext3rd/topic/stack.py Fri Oct 20 14:56:03 2017 +0200 @@ -296,6 +296,9 @@ if not symbol: symbol = ':' states.append('clean') + + states.sort() + fm.startitem() fm.data(isentry=isentry) diff -r 144989dabe93 -r 3eca2cbdc498 tests/test-stack-branch.t --- a/tests/test-stack-branch.t Sun Oct 15 00:03:59 2017 +0530 +++ b/tests/test-stack-branch.t Fri Oct 20 14:56:03 2017 +0200 @@ -251,7 +251,7 @@ ### target: foo (branch) (2 heads) b6: c_h b5: c_g - b2^ c_D (base) + b2^ c_D (base current) b4$ c_f (unstable) b3$ c_e (unstable) b2@ c_D (current) @@ -285,7 +285,7 @@ ### target: foo (branch) (2 heads) b6: c_h b5: c_g - b2^ c_D (base) + b2^ c_D (base current) b4$ c_f (unstable) b3$ c_e (unstable) b2@ c_D (current) @@ -296,7 +296,7 @@ ### target: foo (branch) (2 heads) b5: c_h b4: c_g - b1^ c_D (base) + b1^ c_D (base current) b3$ c_f (unstable) b2$ c_e (unstable) b1@ c_D (current) diff -r 144989dabe93 -r 3eca2cbdc498 tests/test-topic-stack.t --- a/tests/test-topic-stack.t Sun Oct 15 00:03:59 2017 +0530 +++ b/tests/test-topic-stack.t Fri Oct 20 14:56:03 2017 +0200 @@ -72,7 +72,7 @@ ### topic: other ### target: default (branch) (stack is empty) - t0^ c_b (current base) + t0^ c_b (base current) $ hg up foo switching to topic foo @@ -232,7 +232,7 @@ $ hg stack ### target: default (branch) (stack is empty) - b0^ c_f (current base) + b0^ c_f (base current) Test "t#" reference ------------------- @@ -424,7 +424,7 @@ ### target: default (branch) t6: c_h t5: c_g - t2^ c_D (current base) + t2^ c_D (base current) t4$ c_f (unstable) t3$ c_e (unstable) t2@ c_D (current) @@ -716,7 +716,7 @@ t2$ c_G (unstable) ^ c_F t1$ c_D (current unstable) - t0^ c_C (unstable base) + t0^ c_C (base unstable) more obsolescence @@ -790,7 +790,7 @@ t2$ c_G (unstable) ^ c_F t1$ c_D (current unstable) - t0^ c_C (unstable base) + t0^ c_C (base unstable) Test stack behavior with a split -------------------------------- diff -r 144989dabe93 -r 3eca2cbdc498 tests/test-topic-tutorial.t --- a/tests/test-topic-tutorial.t Sun Oct 15 00:03:59 2017 +0530 +++ b/tests/test-topic-tutorial.t Fri Oct 20 14:56:03 2017 +0200 @@ -598,7 +598,7 @@ ### topic: food ### target: default (branch) (stack is empty) - t0^ adding fruits (current base) + t0^ adding fruits (base current) $ hg log --graph @ changeset: 5:2d50db8b5b4c diff -r 144989dabe93 -r 3eca2cbdc498 tests/test-topic.t --- a/tests/test-topic.t Sun Oct 15 00:03:59 2017 +0530 +++ b/tests/test-topic.t Fri Oct 20 14:56:03 2017 +0200 @@ -145,7 +145,7 @@ ### topic: narf ### target: default (branch) (stack is empty) - t0^ Add file delta (current base) + t0^ Add file delta (base current) Add commits to topic @@ -652,7 +652,7 @@ ### topic: fran ### target: default (branch), ambigious rebase destination - branch 'default' has 2 heads t1: start on fran - t0^ Add file delta (current base) + t0^ Add file delta (base current) $ hg topics --age * fran (1970-01-01 by test)