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

Re: tree-conflicts with 'add'

From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Mon, 09 Nov 2009 15:49:36 +0100

Julian Foad wrote:
> Neels J Hofmeyr wrote:
>> Hi tree-conflicts folks,
>>
>> I'm intrigued by the tree-conflicts code in update_editor.c that checks for
>> TCs involving add. Using 'update' and 'switch', I can't find any way to
>> produce a tree-conflict.
>>
>> No-one asked for tests about it, so we don't have any.

Sorry, I only looked in update_tests.py and switch_tests.py; thanks for this
hint:

>
> Tests exist:
>
> tree_conflict_tests.py 4 8 12 16

But I see now that although these are successful, we still don't have tests
for the simple cases.

Add-vs.-add during update/switch only become tree-conflicts when the local
add is an add-with-history. My tests with *simple* adds produce no
tree-conflicts, nor where the *incoming* add is with-history.

Did we at some point decide to not flag simple local adds as tree-conflicts?

> Add vs. add: should be a tree conflict.
>
> (Future enhancements: Implement an option to silently merge the two
> things if they are identical, and probably make that the default mode of
> operation.)

(agreed)

~Neels

P.S.: A permutation map of my tests, if you're interested.

So we currently only flag an add-vs.-add in 6 out of these 18 cases that I
tested:

permutations:
kinds (local vs. incoming) | | operation | | add-with-history?
---------------------------| |-----------| |-------------------
 file vs. file | | update | | none
 dir vs. dir | * | switch | * | local node (1)
 file vs. dir | | incoming node

    3 * 2 * 3 == 18

(1): only the permutations with local node added with history are detected
as tree-conflicts (3 * 2 * 1 = 6).

(dir vs. file, i.e. local dir & incoming file, still untested, I assume is
same as file vs. dir)
(*both* local and incoming with history still untested, I assume is same as
only local with history)
(With these assumptions, we actually catch 16 out of 32 cases)

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

Received on 2009-11-09 15:50:37 CET

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.