incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Bauer <Mathias_Ba...@gmx.net>
Subject Re: [Code] strategy for "child works spaces"
Date Mon, 21 Nov 2011 22:42:42 GMT
On 20.11.2011 12:22, Christian Lohmaier wrote:
> Hi Eric, *,
>
> On Sun, Nov 20, 2011 at 10:12 AM, eric b<eric.bachard@free.fr>  wrote:
>> Le 19 nov. 11 à 22:55, Mathias Bauer a écrit :
>>> Am 19.11.2011 15:22, schrieb Pedro Giffuni:
>>
>>> I still prefer the conversion of a cws in single diffs, each one
>>> representing a single commit.
>>
>> Me too.  That's the most efficient way to integrate a cws.
>
> No, it is not. A cws can be long lived, could have underwent multiple
> rebases with the current tree, so there are lots of commits that refer
> to a old version of the code and thus won't apply anymore.
> Unless you want to do lots of detecitve work and redo all the merging
> work that the author of the cws did do already over the course of
> time, trying to apply a cws by its individual commits is a waste of
> time, not to mention that it is
>
> The version to apply a cws to a different version-control system is to
> create a diff agains the current milestone the cws is based on and try
> to apply that one. (feel free to create a diff for each module). This
> will give way less conflicts and is much faster. You loose history,
> but that was your decision when converting the repo to begin with.

As I tried both methods on some cws already, I don't recommend the "one
cws diff" method, except in one single case (see below).

You will get merge conflicts in both ways, but by turning a cws into
single diffs you will get smaller merges, and especially you will get
many merges that someone already did. Looking on the merge commits in
Mercurial will help you with the conflict resolution.

Applying huge diffs in code you don't know perfectly is hard. Applying
diffs that each represent a single change with better defined meaning
and intent should be easier and less error-prone. It might take a little
bit longer, but the result will be better and the developers carrying
out the integration can learn something about the code.

Of course, if a cws isn't well organized with commits of manageable size
and at least somewhat helpful comments, working with single commit
diffs would suffer from its disadvantages without the advantages - so
applying a single diff and trying hard might be more efficient. But you
will lose the cws history then and I still think we should preserve it
when possible (it wasn't for the stuff already integrated,
unfortunately, but that's no reason to lose everything else too).

Regards,
Mathias

Mime
View raw message