view 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
line wrap: on
line source

https://www.mercurial-scm.org/wiki/TopicPlan#sub_branches.2C_namespacing_and_representation

  $ . "$TESTDIR/testlib/topic_setup.sh"

Parsing

  $ hg debugparsefqbn foo/bar//user26/feature -T '[{branch}] <{topic_namespace}> ({topic})\n'
  [foo/bar] <user26> (feature)

no double slashes means it's a named branch
  $ hg debug-parse-fqbn foo/bar
  branch:    foo/bar
  namespace: default
  topic:     

Formatting

  $ hg debugformatfqbn -b branch -n namespace -t topic
  branch//namespace/topic

  $ hg debug-format-fqbn -n namespace
  //namespace/

  $ hg debug-format-fqbn -b foo/bar -n user26 -t feature
  foo/bar//user26/feature

  $ cd ..