On Wed, 6 Apr 2011 10:47:13 +0200
martin f krafft <madd...@madduck.net> wrote:
> also sprach Erich Heine <sophac...@gmail.com> [2011.03.13.1710 +0100]:
> > I'm not sure how to get around this just yet, other than suggest
> > not using this system for configuring programs that modify the rcs
> > internally. Although now that I think about it, a read could
> > trigger a hook, calling a per config file script which would know
> > how to parse the config and possibly decompose it to the
> > appropriate templates.
> You could write a diff of the file as written by the programme
> against the file as would be generated from the templates. Existence
> of a diff would trigger warnings to the user whenever possible to
> reintegrate the diff into the templates. I use this system for my
> SSH known_hosts management: new hosts are added to a temporary file,
> and SSH (wrapped by a zsh function) warns me of its existence,
> meaning that I have to integrate new hosts.
well, in my experience, many of the apps who like to
modify the rc/config files themselves, do it quite frequently.
Thinks like "last window position" or "last open folder [in the app]"
can get updated a few to tens of times per day. I wouldn't like to
reintegrate all that myself manually.
I've been thinking about this problem before (more in the context of
manually version controlling everything). I've then pondered things
such as "selective ignores" (a vcs could ignore changes to files on a
granular level: i.e. not per-file, but by checking if changes match a
pattern or not), if git would support this for example, irrelevant
changes could then be made not to show up in `git status` or `git
diff`, already greatly reducing any manual interventions.
I think Eric's idea of "parse the new config and adapt the templates
automatically" would be too complex to implement/maintain. The scripts
would also be very application-specific.
vcs-home mailing list