changeset 11221:e655b378ce73 stable

doc: clarify that sections can be split
author Angel Ezquerra
date Tue, 25 May 2010 18:19:40 +0200
parents 157f9de9ad2a
children e7adcef1504b 054549ccb680
files doc/hgrc.5.txt
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hgrc.5.txt	Tue May 25 18:19:16 2010 +0200
+++ b/doc/hgrc.5.txt	Tue May 25 18:19:40 2010 +0200
@@ -113,6 +113,35 @@
 
 This would set the configuration key named ``eggs`` to ``small``.
 
+It is also possible to define a section multiple times. A section can
+be redefined on the same and/or on different hgrc files. For example::
+
+    [foo]
+    eggs=large
+    ham=serrano
+    eggs=small
+
+    [bar]
+    eggs=ham
+    green=
+       eggs
+
+    [foo]
+    ham=prosciutto
+    eggs=medium
+    bread=toasted
+
+This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
+of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
+respectively. As you can see there only thing that matters is the last
+value that was set for each of the configuration keys.
+
+If a configuration key is set multiple times in different
+configuration files the final value will depend on the order in which
+the different configuration files are read, with settings from earlier
+paths overriding later ones as described on the ``Files`` section
+above.
+
 A line of the form ``%include file`` will include ``file`` into the
 current configuration file. The inclusion is recursive, which means
 that included files can include other files. Filenames are relative to