I’m currently working on IsiSetup, a tool to manage your configuration files using revision control. IsiSetup started using Darcs as the underlying SCM. I had to switch to Git not least because Darcs didn’t provided adequate merging capabilities.
Merging gets the better the more context is known to the merge system. This is true for both humans and computers working in the merger business. In an ideal world there would be a merging tool which is aware of things like
- variable assignements,
- variable groups,
And this in many configuration formats…
Conf4GNU & Co
Configuration frameworks like Config4GNU and UniConf may could help. They provide translation layers between configuration formats. It may be thus possible to select a format for which efficient mergers are available. This might be XML, INI-style, ISC-style etc.
The control flow in a merger would be something like:
- Translate current configs into mergeable format
- Translate new configs into mergeable format
- Merge current and new config
- Translate result back into native formats
Sounds easy, might be hell to implement…