[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: replace conflict permutations

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 24 Aug 2009 18:41:31 +0100

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:

| 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.

> 4*4*2*(4 + 2*2*4)*2 = 1652 permutations

(I make that 1280 but who cares?)

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386798
Received on 2009-08-24 19:41:57 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.