Mercurial > evolve
comparison tests/test-namespaces.t @ 6825:ba7ede61f6d4
topic: implement dirstate.topic() and dirstate.tns()
The implementations closely follow the implementation of dirstate.branch(),
including dirstate.setbranch(), from before a6e0b7d4ae9d. So far in this patch
we don't write topics or topic namespaces in a transaction. But we do have `tr`
argument in settopic() and settns() because it's easier to introduce it now
(even though it's simply ignored).
Also because of the branch implementation in core, topic and tns values on disk
now have a '\n' character at the end.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 09 Dec 2023 15:26:35 -0300 |
parents | 6adcc5c7c1f1 |
children | 72d311b8258d |
comparison
equal
deleted
inserted
replaced
6824:417f775d3eee | 6825:ba7ede61f6d4 |
---|---|
10 $ hg debug-topic-namespace space-name | 10 $ hg debug-topic-namespace space-name |
11 marked working directory as topic namespace: space-name | 11 marked working directory as topic namespace: space-name |
12 $ hg debug-topic-namespaces | 12 $ hg debug-topic-namespaces |
13 space-name | 13 space-name |
14 $ cat .hg/topic-namespace | 14 $ cat .hg/topic-namespace |
15 space-name (no-eol) | 15 space-name |
16 | 16 |
17 $ hg log -r 'wdir()' -T '{topic_namespace}\n' | 17 $ hg log -r 'wdir()' -T '{topic_namespace}\n' |
18 none | 18 none |
19 | 19 |
20 $ hg log -r 'wdir()' -T '{fqbn}\n' | 20 $ hg log -r 'wdir()' -T '{fqbn}\n' |
45 $ hg --encoding ascii debug-topic-namespaces | 45 $ hg --encoding ascii debug-topic-namespaces |
46 ? (esc) | 46 ? (esc) |
47 $ hg --encoding latin1 debug-topic-namespaces | 47 $ hg --encoding latin1 debug-topic-namespaces |
48 \xe6 (esc) | 48 \xe6 (esc) |
49 $ cat .hg/topic-namespace | 49 $ cat .hg/topic-namespace |
50 \xc3\xa6 (no-eol) (esc) | 50 \xc3\xa6 (esc) |
51 | 51 |
52 $ hg --encoding utf-8 debug-topic-namespace © | 52 $ hg --encoding utf-8 debug-topic-namespace © |
53 abort: invalid topic namespace name: '\xc2\xa9' (esc) | 53 abort: invalid topic namespace name: '\xc2\xa9' (esc) |
54 (topic namespace names can only consist of alphanumeric, '-', '_' and '.' characters) | 54 (topic namespace names can only consist of alphanumeric, '-', '_' and '.' characters) |
55 [10] | 55 [10] |
128 switching to topic feature | 128 switching to topic feature |
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
130 $ hg debug-topic-namespace | 130 $ hg debug-topic-namespace |
131 alice | 131 alice |
132 $ cat .hg/topic-namespace | 132 $ cat .hg/topic-namespace |
133 alice (no-eol) | 133 alice |
134 $ hg topics | 134 $ hg topics |
135 * feature (1 changesets) | 135 * feature (1 changesets) |
136 $ cat .hg/topic | 136 $ cat .hg/topic |
137 feature (no-eol) | 137 feature |
138 | 138 |
139 Updating to a topic namespace is not supported | 139 Updating to a topic namespace is not supported |
140 | 140 |
141 $ hg up alice | 141 $ hg up alice |
142 abort: unknown revision 'alice' | 142 abort: unknown revision 'alice' |