Configuration versioning

Dmitriy Morozov morozov at cs.duke.edu
Thu Jun 22 16:50:39 CDT 2006


Thanks a lot for your suggestion. I like it a lot. The only thing I
would like to do differently is that I would prefer to specify the
list of non-mergeable files in a separate file (e.g., .hgnonmergeable
to mimick .hgignore). I assume I can modify hgmerge to do this as well
(I will look into it over the weekend). 

As far as ensuring local change for each config file that may not be
necessary (at least in my setting), since if a config file got
modified upstream, and I didn't need to customize it locally, chances
are I can just use the updated config file (maybe extra variables got
defined). Of course, it also asy to think of a setting where this
would be undesirable.

In general, it seems to me that having such a list of non-mergeable
files is a common setting (for me it happens on two unrelated
projects). Maybe it is worth considering adding it to Mercurial as an
explicit feature?

Thanks again.
Dmitriy

On Thu, Jun 22, 2006 at 10:57:39AM +0200, Christian Boos wrote:
>>Is it possibile to do such (per-file) non-distributable version
>>control? 
>
>The trick would be to ensure that there's a local change for each of
>that kind of "config" file in each repository.
>That way, when you merge from the other repository, the merge program [1]
>will be invoked, and this could be the place to implement the behavior
>you're looking after.
>
>Example: you could add the following first line to each file that should
>never be modified when merging:
>
># hg-merge: local
>
>Then, you could adapt the merge program to react appropriately
>if this indicator is found:
>
>head -1 $LOCAL | grep -e '^# hg-merge: local' && success
>
>
>-- Christian
>
>[1] http://www.selenic.com/mercurial/wiki/index.cgi/MergeProgram


More information about the Mercurial mailing list