annotate tests/test-namespaces.t @ 6237:0b9042408809

topic: formatting branch, namespace and topic into fully qualified branch name
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 03 May 2022 21:46:23 +0400
parents 7ad8107d953a
children 6bbd16579f0f
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
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
5 Parsing
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
6
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
7 $ 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
8 [foo/bar] <user26> (feature)
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
9
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
10 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
11 $ hg debug-parse-fqbn foo/bar
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
12 branch: foo/bar
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
13 namespace: default
7ad8107d953a topic: introduce topic namespaces concept starting with simple parsing
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
14 topic:
6237
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
15
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
16 Formatting
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
17
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
18 $ 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
19 branch//namespace/topic
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
20
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
21 $ 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
22 //namespace/
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
23
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
24 $ 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
25 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
26
0b9042408809 topic: formatting branch, namespace and topic into fully qualified branch name
Anton Shestakov <av6@dwimlabs.net>
parents: 6236
diff changeset
27 $ cd ..