Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: replace conflict permutations

subversion
Discussion topic

Back to topic list

Re: replace conflict permutations

Author neels
Full name Neels Janosch Hofmeyr
Date 2009-08-25 06:11:35 PDT
Message Julian Foad wrote:
> Neels Janosch Hofmeyr wrote:
>> Hi TC folks,
>>
>> after being disappointed in svn's current awareness/handling of
>> tree-conflicts during incoming replace, I felt the desire to have a set of
>> tests that cover all the possible cases. But I find 1652 of them :o
>>
>> [[[
>> REPLACE CASES DURING MERGE:
>>
>> actions | reasons
>> -------------|------​------------
>> fwf | - | - | d | -
>> dwd | m | h | m | c
>> fwd | p | | p |
>> dwf | mp | | mp |
>
> Hi Neels.
>
> When "action" is changing the node kind, it doesn't make sense to talk
> of whether it's also "modified". Similarly for "reason" when reason is a
> replacement. So:

Right, for dwf, I can't think of any content modifications.

But it might make a difference whether the added directory is empty or
whether it has more content inside (e.g. missing or stray 'Skipping...'
messages?).

And the property mods are still possible. I am thinking 'replaced and set a
property' vs. 'replaced and didn't set a property', to prove that
tree-conflicts and property additions don't interfere with each other.

In a particular case, when the incoming replace set a property with the same
name as a local property addition, it is treated as a separate conflict from
the tree-conflict, and that's bad. See attached script.

But you're right, should be ok to test that separately. It still gives me a
sense of uncertainty. To be sure, we should actually test every single
variant on its own. But we won't since it's not practical. Fine.

>
> | actions | ...
> |--------------| ...
> | fwf | - | -
> | dwd | m | h
> | | p |
> | | mp |
> |----------|
> | fwd |
> | dwf |
> |--------------
>
> Next, don't try to test all different kinds of modification in all these
> combinations. Just have "different" versus "identical" in this batch of
> tests. Have a separate set of tests just for testing that different
> actions are correctly detected:
>
> | actions | reasons
> |--------------|----​--------------
> | fwf | - | - | (just pick one reason)
> | dwd | m | h |
> | | p | |
> | | mp | |
>
> and another set for testing that all different reasons are correctly
> detected (just pick one action).
>
> Another thought. When "action" is replacing with a node of the same
> kind, we might assume that the replacement node should differ from the
> ancestor/base node. (If it is identical, we might want to treat it
> specially as it's close to a no-op, but I don't think we have discussed
> doing that.) It is more interesting to ask whether it is identical to or
> different from the target node that it clashes with on the receiving
> ("local") side.

Yes, good point.

>
>
>> 4*4*2*(4 + 2*2*4)*2 = 1652 permutations
>
> (I make that 1280 but who cares?)

Maybe it's a good number to impress raging users with... I didn't realize
myself that there are over a thousand variants in which replace conflicts
can manifest. I was thinking more like six. :P

BTW, in attached script, see how the reason is 'local add', even though it
was a local prop, and the action is 'incoming add', even though it was a
replace. (Probably a lot of such cases still hidden in the bushes.)

~Neels
Attachments

« Previous message in topic | 3 of 5 | Next message in topic »

Messages

Show all messages in topic

replace conflict permutations neels Neels Janosch Hofmeyr 2009-08-22 16:19:38 PDT
     Re: replace conflict permutations julianfoad Julian Foad 2009-08-24 10:41:38 PDT
         Re: replace conflict permutations neels Neels Janosch Hofmeyr 2009-08-25 06:11:35 PDT
             Re: replace conflict permutations julianfoad Julian Foad 2009-08-25 06:38:33 PDT
                 Re: replace conflict permutations neels Neels Janosch Hofmeyr 2009-08-25 10:10:28 PDT
Messages per page: