annotate tests/test-namespaces.t @ 6880:906b5af0b2a6

topic: use FQBN for displaying topic name when it grows multiple changesets
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 17 Sep 2024 21:17:56 +0400
parents f8ea46c21b56
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6236
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
1 https://www.mercurial-scm.org/wiki/TopicPlan#sub_branches.2C_namespacing_and_representation
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
2
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
3 $ . "$TESTDIR/testlib/topic_setup.sh"
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
4
6238
6bbd16579f0f topic: list namespaces with debug-namespaces
Anton Shestakov <av6@dwimlabs.net>
parents: 6237
diff changeset
5 $ hg init repo
6bbd16579f0f topic: list namespaces with debug-namespaces
Anton Shestakov <av6@dwimlabs.net>
parents: 6237
diff changeset
6 $ cd repo
6bbd16579f0f topic: list namespaces with debug-namespaces
Anton Shestakov <av6@dwimlabs.net>
parents: 6237
diff changeset
7
6552
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
8 Setting a topic namespace alone doesn't affect wdir()
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
9
6239
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
10 $ hg debug-topic-namespace space-name
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
11 marked working directory as topic namespace: space-name
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
12 $ hg debug-topic-namespaces
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
13 space-name
6661
b33bf56ce558 tests: show .hg/topic-namespace in a couple of places in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6660
diff changeset
14 $ cat .hg/topic-namespace
6825
ba7ede61f6d4 topic: implement dirstate.topic() and dirstate.tns()
Anton Shestakov <av6@dwimlabs.net>
parents: 6775
diff changeset
15 space-name
6239
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
16
6241
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
17 $ hg log -r 'wdir()' -T '{topic_namespace}\n'
6552
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
18 none
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
19
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
20 $ hg log -r 'wdir()' -T '{fqbn}\n'
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
21 default
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
22
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
23 But after setting a topic the already-set namespace is visible on wdir()
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
24
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
25 $ hg topic feature
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
26 marked working directory as topic: feature
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
27 $ hg topics
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
28 * feature (0 changesets)
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
29
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
30 $ hg log -r 'wdir()' -T '{topic_namespace}\n'
6241
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
31 space-name
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
32
6243
91d9a279b84a topic: fqbn template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6241
diff changeset
33 $ hg log -r 'wdir()' -T '{fqbn}\n'
6552
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
34 default//space-name/feature
6243
91d9a279b84a topic: fqbn template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6241
diff changeset
35
6828
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
36 $ hg branch
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
37 default//space-name/feature
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
38
6610
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
39 Non-ascii topic namespace name
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
40
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
41 $ hg debug-topic-namespace --clear
6661
b33bf56ce558 tests: show .hg/topic-namespace in a couple of places in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6660
diff changeset
42 $ test -f .hg/topic-namespace
b33bf56ce558 tests: show .hg/topic-namespace in a couple of places in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6660
diff changeset
43 [1]
6610
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
44 $ hg --encoding utf-8 debug-topic-namespace æ
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
45 marked working directory as topic namespace: \xc3\xa6 (esc)
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
46 $ hg --encoding utf-8 debug-topic-namespaces
6826
72d311b8258d tests: remove (esc) when it's not needed in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6825
diff changeset
47 æ
6610
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
48 $ hg --encoding ascii debug-topic-namespaces
6826
72d311b8258d tests: remove (esc) when it's not needed in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6825
diff changeset
49 ?
6610
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
50 $ hg --encoding latin1 debug-topic-namespaces
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
51 \xe6 (esc)
6661
b33bf56ce558 tests: show .hg/topic-namespace in a couple of places in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6660
diff changeset
52 $ cat .hg/topic-namespace
6825
ba7ede61f6d4 topic: implement dirstate.topic() and dirstate.tns()
Anton Shestakov <av6@dwimlabs.net>
parents: 6775
diff changeset
53 \xc3\xa6 (esc)
6610
ae7c75c43f92 topic: properly decode topic and topic namespace after reading from disk
Anton Shestakov <av6@dwimlabs.net>
parents: 6552
diff changeset
54
6829
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
55 $ hg --encoding utf-8 branch
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
56 default//æ/feature
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
57 $ hg --encoding ascii branch
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
58 default//?/feature
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
59 $ hg --encoding latin1 branch
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
60 default//\xe6/feature (esc)
3977624060dc tests: add another test case for FQBN in hg branch, with non-ASCII characters
Anton Shestakov <av6@dwimlabs.net>
parents: 6828
diff changeset
61
6612
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
62 $ hg --encoding utf-8 debug-topic-namespace ©
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
63 abort: invalid topic namespace name: '\xc2\xa9' (esc)
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
64 (topic namespace names can only consist of alphanumeric, '-', '_' and '.' characters)
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
65 [10]
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
66
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
67 $ hg --encoding latin1 debug-topic-namespace æ
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
68 abort: invalid topic namespace name: '\xc3\xa6' (esc)
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
69 (topic namespace names can only consist of alphanumeric, '-', '_' and '.' characters)
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
70 [10]
94bf2f307b75 topic: check that topic namespace names are human-readable like topics
Anton Shestakov <av6@dwimlabs.net>
parents: 6610
diff changeset
71
6239
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
72 $ hg branches
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
73
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
74 $ hg debug-topic-namespace --clear
6238
6bbd16579f0f topic: list namespaces with debug-namespaces
Anton Shestakov <av6@dwimlabs.net>
parents: 6237
diff changeset
75 $ hg debug-topic-namespaces
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
76
6552
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
77 $ hg topic --clear
81e89d943a4e topic: pretend changeset has no topic namespace if it doesn't have a topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6551
diff changeset
78 clearing empty topic "feature"
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
79 $ hg topics
6238
6bbd16579f0f topic: list namespaces with debug-namespaces
Anton Shestakov <av6@dwimlabs.net>
parents: 6237
diff changeset
80
6239
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
81 $ hg debugtopicnamespace --clear nonsense
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
82 abort: cannot use --clear when setting a topic namespace
6615
9e442e116621 topic: use InputError instead of simple Abort for topic namespaces checks
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
83 [10]
6239
8861e33f3bb2 topic: setting current repo namespace with debug-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6238
diff changeset
84
6240
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
85 $ hg branch stable
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
86 marked working directory as branch stable
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
87 (branches are permanent and global, did you want a bookmark?)
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
88 $ hg debug-topic-namespace alice
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
89 marked working directory as topic namespace: alice
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
90 $ hg topic feature
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
91 marked working directory as topic: feature
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
92 $ echo a > a
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
93 $ hg ci -qAm a
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
94
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
95 $ hg debug-topic-namespaces
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
96 alice
2686ecc90791 topic: store topic namespace in commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6239
diff changeset
97
6241
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
98 $ hg log -r . -T '{rev}: {branch} {topic_namespace} {topic}\n'
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
99 0: stable alice feature
85abf58c3d8c topic: namespace template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6240
diff changeset
100
6243
91d9a279b84a topic: fqbn template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6241
diff changeset
101 $ hg log -r . -T '{rev}: {fqbn}\n'
91d9a279b84a topic: fqbn template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6241
diff changeset
102 0: stable//alice/feature
91d9a279b84a topic: fqbn template keyword
Anton Shestakov <av6@dwimlabs.net>
parents: 6241
diff changeset
103
6660
5e6fa2dd796a tests: show commit extras in a couple more places in test-namespaces*.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6657
diff changeset
104 $ hg log -r . -T '{rev}: {join(extras, " ")}\n'
5e6fa2dd796a tests: show commit extras in a couple more places in test-namespaces*.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6657
diff changeset
105 0: branch=stable topic=feature topic-namespace=alice
5e6fa2dd796a tests: show commit extras in a couple more places in test-namespaces*.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6657
diff changeset
106
6828
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
107 $ hg branch
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
108 stable//alice/feature
6271
caf302fb8f4d topic: use branch//namespace/topic format everywhere except exchange
Anton Shestakov <av6@dwimlabs.net>
parents: 6267
diff changeset
109 $ hg branches
caf302fb8f4d topic: use branch//namespace/topic format everywhere except exchange
Anton Shestakov <av6@dwimlabs.net>
parents: 6267
diff changeset
110 stable//alice/feature 0:69c7dbf6acd1
caf302fb8f4d topic: use branch//namespace/topic format everywhere except exchange
Anton Shestakov <av6@dwimlabs.net>
parents: 6267
diff changeset
111
6657
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
112 Removing topic namespace file if it contains the default value
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
113
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
114 The default value changed from b'default' to b'none' in 11.1.0, this is a
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
115 safeguard against accidentally putting the new default tns value into commit
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
116 extras with an old version of topic extension
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
117
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
118 $ printf 'none' > .hg/topic-namespace
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
119 $ test -f .hg/topic-namespace
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
120 $ hg ci -m ''
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
121 nothing changed
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
122 [1]
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
123 $ test -f .hg/topic-namespace
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
124 [1]
1c998ed77597 topic: remove .hg/topic-namespace file if it has the default value
Anton Shestakov <av6@dwimlabs.net>
parents: 6656
diff changeset
125
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
126 Updating to a revision with a namespace should activate it
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
127
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
128 $ hg up null
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
129 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6828
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
130 $ hg log -r 'wdir()' -T '{fqbn}\n'
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
131 default
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
132 $ hg branch
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
133 default
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
134 $ hg debug-topic-namespace
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
135 none
6656
d3668c704d40 topic: use the appropriate functions to change topic and tns on wdir update
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
136 $ test -f .hg/topic-namespace
d3668c704d40 topic: use the appropriate functions to change topic and tns on wdir update
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
137 [1]
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
138 $ hg topics
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
139 feature (1 changesets)
6656
d3668c704d40 topic: use the appropriate functions to change topic and tns on wdir update
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
140 $ test -f .hg/topic
d3668c704d40 topic: use the appropriate functions to change topic and tns on wdir update
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
141 [1]
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
142 $ hg up 0
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
143 switching to topic-namespace alice
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
144 switching to topic feature
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
145 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6828
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
146 $ hg log -r 'wdir()' -T '{fqbn}\n'
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
147 stable//alice/feature
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
148 $ hg branch
90f867d5be22 topic: make hg branch command output FQBN
Anton Shestakov <av6@dwimlabs.net>
parents: 6827
diff changeset
149 stable//alice/feature
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
150 $ hg debug-topic-namespace
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
151 alice
6661
b33bf56ce558 tests: show .hg/topic-namespace in a couple of places in test-namespaces.t
Anton Shestakov <av6@dwimlabs.net>
parents: 6660
diff changeset
152 $ cat .hg/topic-namespace
6825
ba7ede61f6d4 topic: implement dirstate.topic() and dirstate.tns()
Anton Shestakov <av6@dwimlabs.net>
parents: 6775
diff changeset
153 alice
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
154 $ hg topics
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
155 * feature (1 changesets)
6656
d3668c704d40 topic: use the appropriate functions to change topic and tns on wdir update
Anton Shestakov <av6@dwimlabs.net>
parents: 6612
diff changeset
156 $ cat .hg/topic
6825
ba7ede61f6d4 topic: implement dirstate.topic() and dirstate.tns()
Anton Shestakov <av6@dwimlabs.net>
parents: 6775
diff changeset
157 feature
6245
a54db3e55c88 topic: switch to namespace when updating to a commit, similar to topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6243
diff changeset
158
6310
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
159 Updating to a topic namespace is not supported
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
160
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
161 $ hg up alice
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
162 abort: unknown revision 'alice'
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
163 [10]
43166bd57d6c tests: addressing topic namespaces by name alone is not supported
Anton Shestakov <av6@dwimlabs.net>
parents: 6271
diff changeset
164
6536
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
165 Export/import of topic namespaces
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
166
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
167 $ hg export
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
168 # HG changeset patch
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
169 # User test
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
170 # Date 0 0
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
171 # Thu Jan 01 00:00:00 1970 +0000
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
172 # Branch stable
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
173 # Node ID 69c7dbf6acd180eeec055dd67933badd3601d45f
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
174 # Parent 0000000000000000000000000000000000000000
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
175 # EXP-Topic-Namespace alice
6536
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
176 # EXP-Topic feature
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
177 a
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
178
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
179 diff -r 000000000000 -r 69c7dbf6acd1 a
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
180 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
181 +++ b/a Thu Jan 01 00:00:00 1970 +0000
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
182 @@ -0,0 +1,1 @@
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
183 +a
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
184
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
185 $ hg import - << EOF
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
186 > # HG changeset patch
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
187 > # User test
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
188 > # Date 0 0
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
189 > # Thu Jan 01 00:00:00 1970 +0000
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
190 > # Branch another-branch
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
191 > # Node ID 1111111111111111111111111111111111111111
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
192 > # Parent 2222222222222222222222222222222222222222
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
193 > # EXP-Topic-Namespace mynamespace
6536
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
194 > # EXP-Topic mytopic
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
195 > added z
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
196 >
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
197 > diff --git a/z b/z
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
198 > new file mode 100644
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
199 > --- /dev/null
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
200 > +++ b/z
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
201 > @@ -0,0 +1,1 @@
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
202 > +z
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
203 > EOF
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
204 applying patch from stdin
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
205
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
206 $ hg log -r tip -T '{rev}: {branch} {topic_namespace} {topic}\n'
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
207 1: stable mynamespace mytopic
6536
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
208
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
209 $ hg log -r tip -T '{rev}: {fqbn}\n'
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
210 1: stable//mynamespace/mytopic
6536
90b631fde2d7 topic: only set topic on workingcommitctx if it doesn't already have one
Anton Shestakov <av6@dwimlabs.net>
parents: 6310
diff changeset
211
6550
fa14b9fc953d tests: show extras after importing a patch with topic and namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6543
diff changeset
212 $ hg log -r tip -T '{rev}: {join(extras, " ")}\n'
fa14b9fc953d tests: show extras after importing a patch with topic and namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6543
diff changeset
213 1: branch=stable topic=mytopic topic-namespace=mynamespace
fa14b9fc953d tests: show extras after importing a patch with topic and namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6543
diff changeset
214
6543
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
215 Importing a patch with default namespace and topic values
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
216
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
217 $ hg import - << EOF
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
218 > # HG changeset patch
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
219 > # User test
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
220 > # Date 0 0
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
221 > # Thu Jan 01 00:00:00 1970 +0000
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
222 > # Branch stable
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
223 > # Node ID 1111111111111111111111111111111111111111
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
224 > # Parent 2222222222222222222222222222222222222222
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
225 > # EXP-Topic-Namespace none
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
226 > # EXP-Topic
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
227 > more z
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
228 >
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
229 > diff --git a/z b/z
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
230 > --- a/z
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
231 > +++ b/z
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
232 > @@ -1,1 +1,1 @@
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
233 > -z
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
234 > +zebra
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
235 > EOF
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
236 applying patch from stdin
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
237
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
238 $ hg log -r tip -T '{rev}: {branch} {topic_namespace} {topic}\n'
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
239 2: stable none
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
240
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
241 $ hg log -r tip -T '{rev}: {fqbn}\n'
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
242 2: stable
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
243
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
244 $ hg log -r tip -T '{rev}: {join(extras, " ")}\n'
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
245 2: branch=stable
b0cbad4d841f tests: importing with default topic&namespace values doesn't add extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6542
diff changeset
246
6551
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
247 Importing a patch with topic namespace set and topic unset
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
248
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
249 $ hg import - << EOF
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
250 > # HG changeset patch
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
251 > # User test
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
252 > # Date 0 0
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
253 > # Thu Jan 01 00:00:00 1970 +0000
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
254 > # Branch stable
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
255 > # Node ID 1111111111111111111111111111111111111111
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
256 > # Parent 2222222222222222222222222222222222222222
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
257 > # EXP-Topic-Namespace mynamespace
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
258 > # EXP-Topic
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
259 > more z
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
260 >
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
261 > diff --git a/z b/z
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
262 > --- a/z
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
263 > +++ b/z
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
264 > @@ -1,1 +1,1 @@
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
265 > -zebra
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
266 > +z
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
267 > EOF
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
268 applying patch from stdin
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
269
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
270 $ hg log -r tip -T '{rev}: {branch} {topic_namespace} {topic}\n'
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
271 3: stable none
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
272
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
273 $ hg log -r tip -T '{rev}: {fqbn}\n'
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
274 3: stable
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
275
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
276 $ hg log -r tip -T '{rev}: {join(extras, " ")}\n'
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
277 3: branch=stable
198b87917ba8 tests: import a patch with topic namespace, but without topic
Anton Shestakov <av6@dwimlabs.net>
parents: 6550
diff changeset
278
6261
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
279 Revsets
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
280
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
281 $ nslog() {
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
282 > hg log -T '{rev}: {topic_namespace}\n' -r "$1"
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
283 > }
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
284
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
285 $ nslog 'topicnamespace()'
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
286 0: alice
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
287 1: mynamespace
6261
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
288 $ nslog 'topicnamespace(:)'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
289 0: alice
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
290 1: mynamespace
6261
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
291 $ nslog 'topicnamespace(all())'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
292 0: alice
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
293 1: mynamespace
6261
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
294 $ nslog 'topicnamespace(topicnamespace("alice"))'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
295 0: alice
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
296 $ nslog 'topicnamespace(wdir())'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
297 0: alice
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
298 $ nslog 'topicnamespace("re:ice$")'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
299 0: alice
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
300 $ nslog 'topicnamespace(nonsense)'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
301 abort: unknown revision 'nonsense'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
302 [10]
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
303
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
304 $ nslog 'topicnamespace("re:nonsense")'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
305 $ nslog 'topicnamespace("literal:nonsense")'
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
306 abort: topic namespace 'nonsense' does not exist
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
307 [10]
a2491c578d2b topic: namespace revset predicate
Anton Shestakov <av6@dwimlabs.net>
parents: 6245
diff changeset
308
6738
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
309 Debug command related to the default/empty topic namespace
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
310
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
311 $ hg debug-topic-namespace --clear
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
312
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
313 $ echo none > none
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
314 $ hg ci -qAm 'tns=none' \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
315 > --config extensions.topic=! \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
316 > --config extensions.commitextras= \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
317 > --extra topic-namespace=none
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
318
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
319
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
320 $ echo default > default
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
321 $ hg ci -qAm 'tns=default' \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
322 > --config extensions.topic=! \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
323 > --config extensions.commitextras= \
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
324 > --extra topic-namespace=default
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
325
6739
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
326 $ hg debug-default-topic-namespace \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
327 > --debug \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
328 > | grep extra
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
329 extra: branch=stable
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
330 extra: topic-namespace=none
6738
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
331
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
332 $ hg debug-default-topic-namespace \
6739
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
333 > --no-none \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
334 > --default \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
335 > --debug \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
336 > | grep extra
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
337 extra: branch=stable
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
338 extra: topic-namespace=default
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
339
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
340 $ hg debug-default-topic-namespace \
c94690f59bea topic: allow selecting a specific tns value in debug-default-topic-namespace
Anton Shestakov <av6@dwimlabs.net>
parents: 6738
diff changeset
341 > --default \
6738
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
342 > -T '{rev}:{node|short} {join(extras, " ")}\n'
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
343 4:29a2d0acd473 branch=stable topic-namespace=none
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
344 5:16d6061fce0c branch=stable topic-namespace=default
cf37748874f4 topic: add a simple debug command to list changesets with problematic tns
Anton Shestakov <av6@dwimlabs.net>
parents: 6661
diff changeset
345
6740
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
346 $ hg debug-default-topic-namespace --none --default --clear
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
347
6741
cd22d260d8cc tests: run debug-default-topic-namespace after --clear, but before evolve
Anton Shestakov <av6@dwimlabs.net>
parents: 6740
diff changeset
348 $ hg debug-default-topic-namespace --none --default
cd22d260d8cc tests: run debug-default-topic-namespace after --clear, but before evolve
Anton Shestakov <av6@dwimlabs.net>
parents: 6740
diff changeset
349
6749
107c5af631a7 topic: make debug-default-topic-namespace --clear slightly smarter
Anton Shestakov <av6@dwimlabs.net>
parents: 6741
diff changeset
350 $ hg evolve --config extensions.evolve= --list
107c5af631a7 topic: make debug-default-topic-namespace --clear slightly smarter
Anton Shestakov <av6@dwimlabs.net>
parents: 6741
diff changeset
351
6740
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
352 $ hg evolve --config extensions.evolve= --any
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
353 update:[7] tns=default
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
354 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6749
107c5af631a7 topic: make debug-default-topic-namespace --clear slightly smarter
Anton Shestakov <av6@dwimlabs.net>
parents: 6741
diff changeset
355 working directory is now at 38c9ea9d27a7
6740
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
356
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
357 $ hg debug-default-topic-namespace --none --default
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
358
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
359 $ hg verify --quiet
d959abd665fd topic: teach debug-default-topic-namespace how to clean commit extras
Anton Shestakov <av6@dwimlabs.net>
parents: 6739
diff changeset
360
6827
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
361 Using fully qualified branch names
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
362
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
363 $ hg branches
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
364 stable 7:38c9ea9d27a7
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
365 stable//mynamespace/mytopic 1:aa564142ac0b (inactive)
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
366 stable//alice/feature 0:69c7dbf6acd1 (inactive)
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
367
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
368 $ hg up stable//mynamespace/mytopic
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
369 switching to topic-namespace mynamespace
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
370 switching to topic mytopic
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
371 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
372 $ hg up stable
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
373 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
374 $ hg up stable//alice/feature
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
375 switching to topic-namespace alice
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
376 switching to topic feature
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
377 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
eb8a648d90de tests: demonstrate that using FQBN sometimes works with hg up
Anton Shestakov <av6@dwimlabs.net>
parents: 6826
diff changeset
378
6236
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
379 Parsing
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
380
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
381 $ hg debugparsefqbn foo/bar//user26/feature -T '[{branch}] <{topic_namespace}> ({topic})\n'
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
382 [foo/bar] <user26> (feature)
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
383
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
384 no double slashes means it's a named branch
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
385 $ hg debug-parse-fqbn foo/bar
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
386 branch: foo/bar
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
387 namespace: none
6236
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
388 topic:
6237
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
389
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
390 Formatting
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
391
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
392 $ hg debugformatfqbn -b branch -n namespace -t topic
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
393 branch//namespace/topic
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
394
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
395 $ hg debug-format-fqbn -n namespace
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
396 //namespace/
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
397
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
398 $ hg debug-format-fqbn -b foo/bar -n user26 -t feature
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
399 foo/bar//user26/feature
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
400
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
401 default values
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
402
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
403 $ hg debug-format-fqbn -b default -n none -t '' --length=full
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
404 default//none/
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
405 $ hg debug-format-fqbn -b default -n none -t '' --length=normal
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
406 default
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
407 $ hg debug-format-fqbn -b default -n none -t '' --length=short
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
408 default
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
409
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
410 $ hg debug-format-fqbn -b default -n namespace -t '' --length=full
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
411 default//namespace/
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
412 $ hg debug-format-fqbn -b default -n namespace -t '' --length=normal
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
413 default//namespace/
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
414 $ hg debug-format-fqbn -b default -n namespace -t '' --length=short
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
415 //namespace/
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
416
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
417 $ hg debug-format-fqbn -b default -n none -t topic --length=full
6542
ca1c219bd59f branching: merge with stable
Anton Shestakov <av6@dwimlabs.net>
parents: 6536
diff changeset
418 default//none/topic
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
419 $ hg debug-format-fqbn -b default -n none -t topic --length=normal
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
420 default//topic
6877
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
421 $ hg debug-format-fqbn -b default -n none -t topic --length=short
f8ea46c21b56 topic: make formatfqbn() able to produce FQBN of 3 different lengths
Anton Shestakov <av6@dwimlabs.net>
parents: 6829
diff changeset
422 //topic
6266
213db29a19e9 topic: ability to shorten branch//namespace/topic strings when possible
Anton Shestakov <av6@dwimlabs.net>
parents: 6261
diff changeset
423
6237
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
424 $ cd ..