[Tails-dev] Automatically resolving merge conflicts in confi…

Delete this message

Reply to this message
Autor: intrigeri
Data:  
A: The Tails public development discussion list
Assumptes vells: Re: [Tails-dev] Automated builds specification
Assumpte: [Tails-dev] Automatically resolving merge conflicts in config/APT_suites etc. [Was: Automated builds specification]
Hi,

bertagaz wrote (26 Feb 2015 19:46:17 GMT) :
> It seems that this kind of easy merges could be resolved by configuring
> .gitattributes to use the union merge for config/APT_suites.


> https://code.google.com/p/endgame-singularity/source/browse/.gitattributes


> I'm not sure how it handles corner cases though, it might deserve some
> tests to see how it fits. Otherwise intrigeri was mentionning another
> possibility in Git.


I'll test this while working on #8654. I'll try to have this stuff do
the right thing by default for the main cases, so that Jenkins can do
its job properly (and also, so that review'n'merge process is not too
error-prone).

However, there's one problem with the "union merge" approach: if the
base branch's APT suite is encoded in config/APT_suites, then we'll
get >1 base branch's APT suites in that file in various cases, e.g.
when merging a base branch into another one. It seems obvious to me
that we should avoid that, since it would make all this pretty hard to
reason about.

That's why I'm currently thinking that the base branch's APT suite
should *not* be encoded in config/APT_suites, but instead derived at
build time from another file where the base branch is encoded, e.g.
config/base_branch. This way, we can use different per-file merge
settings for different purposes. In this case, to ensure that after
a merge, config/base_branch always has the base branch one merges
*into*, and nothing else. Hopefully I'll manage to find something that
makes reviewers' and RM's life easy. For example:

Scenario: merging a base branch into another one
Given the stable branch has "stable" in config/base_branch
And the testing branch has "testing" in config/base_branch
When I merge stable into testing
Then the testing branch has "testing" in config/base_branch

Scenario: merging a topic branch based on branch S into a non-S base branch
Given the bugfix/foo branch has "stable" in config/base_branch
And the testing branch has "testing" in config/base_branch
When I merge bugfix/foo into testing
Then the testing branch has "testing" in config/base_branch

Cheers,
--
intrigeri