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

replace conflict permutations

From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Sun, 23 Aug 2009 01:17:22 +0200

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 |
             |--------------|
             | rwf | - | - |
             | rwd | h | m |
             | | | p |
             | | | mp |

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

legend:
  action = the incoming action that the repos suggests during merge
  reason = the local change that conflicts with the incoming action
  incoming replace action type:
    f = "file"
    w = "with"
    d = "dir"
    m = "content changes" (with dir: added/modified files inside)
    p = "property changes"
    h = "replaced with history"
  local reasons:
    d = "deleted"
    m = "content changed"
    p = "property changed"
    c = "committed local changes"
    rw(d|f)[h] = "locally replaced with dir | file, [with history]"
  e.g.:
    fwf-dc = "incoming action: replace file with file,
              local reason: file is deleted, and the delete is committed."
    fwd-p = "incoming action: replace file with dir,
              local reason: uncommitted property change on file."
    dwdp-rwd = "incoming action: replace dir with dir and change props,
                locally replaced with a dir, which is uncommitted."

]]]
(These are *only* the conflict cases with an incoming replace during merge!
Also counting 'update', we'd add half that number, since 'update' never has
a local commit, making 2478 permutations of TC with incoming replace.)

I guess it isn't exactly a priority to cover all of these as actual cmdline
tests, is it. Any opinion on which we should definitely test for? Here is a
suggestion:

[[[
actions | reasons
--------|---------
fwf | - | d
dwd | p | m
fwd | | p
dwf | | rwf
        | rwd

4*2*5 = 40 permutations
]]]

Times two if we do that for both 'merge' and 'update'.

"actions":
- leave out replace-with-history, hoping that it doesn't make a difference.

- leave out incoming content changes -- a replace-with-file should have
different content, a replace-with-dir should create a dir (with a file in it??).

- don't leave out incoming prop changes, make sure prop conflicts don't
interfere.

"reasons":
- leave out local commit. That falls under 'compare directories before
deleting' a.k.a. arbitrary diff, still missing.

- leave out combined content and prop changes, testing separately should do.

- don't permutate rwf and rwd. No specific reason except the big number of
permutations.

It still remains to be a lot of work, even with cmdline-factory.
I'm quite unsure. Help appreciated.

~Neels

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386396

Received on 2009-08-23 01:20:12 CEST

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