Package: hg-confman
Confman mercurial extensionConfman provides simple means to specify and recordconfiguration
histories. The configurations that are entirely made of tags are
calledbaselines.The point ofbaseline maintenanceis the ability toreproduce
deliverable states.By also accepting arbitrary changesets, one can record the
construction history of a baseline and exchange intermediate steps.Once you are done reading this overview, you might want to read thetutorial.Requirementsmercurialgit (optional, for managed git repositories)requests python library (optional, to use .tgz or .zip files as repositories)Baseline definitionA confman specification is all contained within the.hgconffile.Example.hgconffile with two managed repositories:[yams]
pulluri = http://hg.logilab.org/yams
layout = yams
track = yams-version-0.34.0

[logilab.common]
pulluri = http://hg.logilab.org/logilab/common
layout = logilab/common
track = stable
hgrc.paths.review = ssh://hg.logilab.org/review/logilab/commonThe optionaltrackattribute can point to abranch name,tag name,changeset idor a to arevset. This is how the baseline is declared.Updating the baseline (i.e. providing new values to thetrackattribute if present) can be performed automatically with thehg cfbaselinecommand.Global settings (hgrc)The following option can be defined in the[confman]section:hggit(defaultTrue): If set toFalse, the default behavior of
cfensureconf will be NOT to use hggit to clone git repositories.Commands overviewCore commandscfsummary     print a summary of the managed repositories

cfensure      clone, pull and update the managed repositories (according
              to their track value)

cfbaseline    update any track attribute with a tag (if possible)
              or a changeset idIf the track attribute is missing or contains a branch name or a revset,cfbaselinedoes nothing.If the track attribute contains a branch name or a revset,cfensurewill
always pull.Utility commandscfbroadcast   send a shell command to any managed repository

cfpull        pull repositories

cfpush        push repositories up to their current track

cffiles       list tracked files of the managed repositories whose name
              in the working directory matches the given patternsChaining configurationsAn application configuration includes the entries of some of its
dependencies, for instance a web framework.Rather than copy-and-pasting configuration entries in each app that
depends on the framework, we can build a configuration for the
framework and reuse it from the application's configurations.Hence we haveshareableandreusableconfigurations.Let's do with a small example:[conf.cubicweb]
pulluri = http://hg.logilab.org/grshells/grshell-cubicweb
layout = conf.cubicweb
track = cubicweb-3.19.2
expand.whitelist = cubicweb rql yams logilab-common logilab-database
                   logilab-mtconverter logilab-common

[cube.timeseries]
pulluri = http://hg.logilab.org/cubes/timeseries
layout = cubes/timeseries
track = cubicweb-timeseries-version-1.10.1

[cube.weathermap]
pulluri = http://bitbucket.org/auc/weathermap
layout = cubes/weathermap
track = 0.2.0In this, we build a configuration for a weather forecasting app using:the cubicweb configuration maintained by the CubicWeb maintainers,thetimeseriescube (a CubicWeb component or plugin),theweathermapfinal component.Theexpand=orexpand.whitelist=<...>or lastlyexpand.blacklist=<...>notations indicate a repository that contain
a configuration and should be used byconfmanas such.It is also possible to useexpand.nestedto use the layout of the other project as
the place to put the expanded elements. This can be combined with white and black list,.nestedjust needs to be put before them.Here's a real-life configuration tree:Tarball supportConfman can manage a tarball (.tar.gzor.tar.bz2) as a managed repository.Note that only basic feature is supported for now: the tarball is downloaded and
uncompressed automatically if the correspondinglayoutis missing.Git supportConfman has experimental git support. Top-level configurations must reside in a mercurial repository.Guestrepo supportTheguestrepomercurial extension was born at the same time asconfmanand both provide roughly the same basic services (though,
e.g.guestrepodoes not handle well recursive configurations).confmancan read and writeguestrepoconfiguration repositories as
well as its own.Additionally, it is possible toexpandaguestrepoconfiguration,
as examplified above (the cubicweb configuration is currently
maintained withguestrepoand its file format).When working on aguestrepoconfiguration, it is possible to use thehg cfbaseline --force-hgconfcommand to generate a valid confman.hgconffile.