tests/test-topic.t
branchstable
changeset 3763 6f56ff701746
parent 3667 a346b1641dfa
child 3764 f0f9139016d8
--- a/tests/test-topic.t	Tue May 15 22:17:27 2018 -0700
+++ b/tests/test-topic.t	Wed May 23 11:09:37 2018 +0200
@@ -12,6 +12,103 @@
   > graphstyle.missing = |
   > EOF
 
+  $ hg help -e topic
+  topic extension - support for topic branches
+  
+  Topic branches are lightweight branches which disappear when changes are
+  finalized (move to the public phase).
+  
+  Compared to bookmark, topic is reference carried by each changesets of the
+  series instead of just the single head revision.  Topic are quite similar to
+  the way named branch work, except they eventually fade away when the changeset
+  becomes part of the immutable history. Changeset can belong to both a topic
+  and a named branch, but as long as it is mutable, its topic identity will
+  prevail. As a result, default destination for 'update', 'merge', etc...  will
+  take topic into account. When a topic is active these operations will only
+  consider other changesets on that topic (and, in some occurrence, bare
+  changeset on same branch).  When no topic is active, changeset with topic will
+  be ignored and only bare one on the same branch will be taken in account.
+  
+  There is currently two commands to be used with that extension: 'topics' and
+  'stack'.
+  
+  The 'hg topics' command is used to set the current topic, change and list
+  existing one. 'hg topics --verbose' will list various information related to
+  each topic.
+  
+  The 'stack' will show you information about the stack of commit belonging to
+  your current topic.
+  
+  Topic is offering you aliases reference to changeset in your current topic
+  stack as 't#'. For example, 't1' refers to the root of your stack, 't2' to the
+  second commits, etc. The 'hg stack' command show these number.
+  
+  Push behavior will change a bit with topic. When pushing to a publishing
+  repository the changesets will turn public and the topic data on them will
+  fade away. The logic regarding pushing new heads will behave has before,
+  ignore any topic related data. When pushing to a non-publishing repository
+  (supporting topic), the head checking will be done taking topic data into
+  account. Push will complain about multiple heads on a branch if you push
+  multiple heads with no topic information on them (or multiple public heads).
+  But pushing a new topic will not requires any specific flag. However, pushing
+  multiple heads on a topic will be met with the usual warning.
+  
+  The 'evolve' extension takes 'topic' into account. 'hg evolve --all' will
+  evolve all changesets in the active topic. In addition, by default. 'hg next'
+  and 'hg prev' will stick to the current topic.
+  
+  Be aware that this extension is still an experiment, commands and other
+  features are likely to be change/adjusted/dropped over time as we refine the
+  concept.
+  
+  topic-mode
+  ==========
+  
+  The topic extension can be configured to ensure the user do not forget to add
+  a topic when committing a new topic:
+  
+    [experimental]
+    # behavior when commit is made without an active topic
+    topic-mode = ignore # do nothing special (default)
+    topic-mode = warning # print a warning
+    topic-mode = enforce # abort the commit (except for merge)
+    topic-mode = enforce-all # abort the commit (even for merge)
+    topic-mode = random # use a randomized generated topic (except for merge)
+    topic-mode = random-all # use a randomized generated topic (even for merge)
+  
+  Single head enforcing
+  =====================
+  
+  The extensions come with an option to enforce that there is only one heads for
+  each name in the repository at any time.
+  
+      [experimental] enforce-single-head = yes
+  
+  Publishing behavior
+  ===================
+  
+  Topic vanish when changeset move to the public phases. Moving to the public
+  phase usually happens on push, but it is possible to update that behavior. The
+  server needs to have specific config for this.
+  
+      # everything pushed become public (the default) [phase] publish = yes
+  
+      # nothing push turned public [phase] publish = no
+  
+      # topic branches are not published, changeset without topic are [phase]
+      publish = no [experimental] topic.publish-bare-branch = yes
+  
+  In addition, the topic extension adds a "--publish" flag on 'hg push'. When
+  used, the pushed revisions are published if the push succeeds. It also applies
+  to common revisions selected by the push.
+  
+  list of commands:
+  
+   stack         list all changesets in a topic and other information
+   topics        View current topic, set current topic, change topic for a set
+                 of revisions, or see all topics.
+  
+  (use 'hg help -v topic' to show built-in aliases and global options)
   $ hg help topics
   hg topics [TOPIC]