Requirements and pre-analysis for a cross desktop configuration infrastructure
Avery Pennarun
apenwarr at nit.ca
Mon Mar 21 18:06:54 EET 2005
On Mon, Mar 21, 2005 at 04:31:11PM +0100, Philip Van Hoof wrote:
> The backup-format shouldn't only be XML. XML isn't a very good format
> for source-control. An example backup-format that is suitable for
> source-control are ini-files or ini-file style backups. Since binary
> data isn't going to be supported, it's doable to use that.
Again, ini-style files aren't the best choice if you really want this.
Imagine this situation:
[stuff]
a = 1
b = 2
c = 3
[fluff]
a = 1
b = 2
c = 3
[guff]
a = 4
b = 5
c = 6
Now imagine we have one patch (patch-1), that changes "c = 3" to "c = 4" in
[fluff]. Imagine we have another patch (patch-2), that drops the [fluff]
section completely.
If we apply patch-1 on top of patch-2, we will accidentally change "c = 3"
to "c = 4" in the [stuff] section instead of the (now deleted) [fluff]
section!
If you're really serious about using a special format for change control,
don't make that mistake. Include the full key on each line:
stuff/a = 1
stuff/b = 2
stuff/c = 3
fluff/a = 1
fluff/b = 2
fluff/c = 3
guff/a = 4
guff/b = 5
guff/c = 6
Or use three separate files, stuff, fluff, and guff... but that's not very
convenient.
Have fun,
Avery
More information about the xdg
mailing list