Re: Issue with merge/integration algorithm?

2012-07-27 Thread Arunmozhi

I am resending the initial mail as the mail format other than text is not 
supported.

I feel that the SVN branching and merging/integration algorithm is 
flawed. However I am not sure if this is a known limitation of SVN. I 
did 2 tests to compare SVN against Perforce/git. The intention of the test 
is to see if a change done by a user at some point in time and taken to 
multiple branches comes back to the main branch duplicated multiple 
times without indicating a conflict.

Please look into the attached tests.txt. Each column shows the contents of a 
file as we
do successive changes to the file.  Also please refer below the explanatory 
steps.

I use tortoisesvn 1.7.5 as the user interface and hence I can just list 

the menu commands corresponding to each step and not the exact SVN 
commands (I am not used to the command line). The following are the 
steps I executed for Test 1.

(1) Create a file myfile.txt with following contents and add it to the 
repository (TortoiseSVN -> Add, SVN Commit).
a
b
c
z

(2) Branch the file myfile.txt to a new location (TortoiseSVN -> Branch/Tag 
(From:myfile.txt To:branch1/myfile.txt), SVN update). Now the contents 
of branch1/myfile.txt is
a
b
c
z

(3) Edit the branch1/myfile.txt by inserting a line 'd' as follows and then 
commit the changes (SVN Commit). Now the contents of branch1/myfile.txt is
a
b
c
d
z

(4) Now branch the file branch1/myfile.txt to branch2/myfile.txt (TortoiseSVN 
-> Branch/Tag (From:branch1/myfile.txt To:branch2/myfile.txt), SVN update). Now 
the contents of branch2/myfile.txt is
a
b
c
d
z

(5) Now edit the file branch2/myfile.txt by changing the 'c' to 'x' and 
then commit the changes (SVN commit). Now the contents of branch2/myfile.txt is
a
b
x
d
z

(6) Now integrate the branch1/myfile.txt back to myfile.txt (TortoiseSVN 
-> Merge (Reintegrate a branch From:branch1/myfile.txt To working 
copy:myfile.txt), SVN commit). Now the contents of myfile.txt is
a
b
c
d
z

(7) Now integrate the branch2/myfile.txt back to myfile.txt (TortoiseSVN -> 
Merge (Reintegrate a branch From:branch2/myfile.txt To working 
copy:myfile.txt), SVN commit). Now the contents of myfile.txt is
a
b
x
d
d
z

You can see that the line 'd' appears twice in the integrated file. 'd' is 
inserted only once in the revision history. The expected output 
(verified in perforce and git) is
a
b
x
d
z




The second test shown in the attached tests.txt is similar, but shows 
another clear problem of the line 'd' appearing twice in the integrated 
file.

Upto step 4, it is same as for test 1

(5) Edit branch2/myfile.txt and delete 'b' and 'c' and then commit changes
a
dz

(6) Edit branch2/myfile.txt and add 'b' and 'c' below 'd' and then commit 
changes
a
d
b
c
z

(7) Reintegrate branch1/myfile.txt to myfile.txt
a
b
c
d
z

(8) Reintegrate branch2/myfile.txt to myfile.txt. The final integrated file is 
shown below.


a
d
b
c
d
z

The expected output for the second test as verified in perforce and git is

a
d
b
c
z

Hope now it clarifies the problem.


- Original Message -
From: Stefan Sperling 
To: Arunmozhi 
Cc: "users@subversion.apache.org" 
Sent: Friday, 27 July 2012 7:06 PM
Subject: Re: Issue with merge/integration algorithm?

On Fri, Jul 27, 2012 at 06:11:34AM -0700, Arunmozhi wrote:
> 
> 
> I feel that the SVN branching and merging/integration algorithm is 
> flawed. However I am not sure if this is a known limitation of SVN. I 
> did 2 tests to compare SVN against Perforce/git. The intention of the test 
> is to see if a change done by a user at some point in time and taken to 
> multiple branches comes back to the main branch duplicated multiple 
> times without indicating a conflict.

I'm afraid it's hard to help you based on the information you've given.

You're not showing any svn commands you're running.
You're not showing the results you got from svn.

Without that information it's impossible to tell what you were
really doing.
Test 1:
---

   Integrate B1 back to main
 +---+
 |   V
Main -> Branch1 -> Branch2  Main Main
a   aa aaaa
b   bb bbbb
c   cc cxcx
z   zd dddd
 z zzzd
| z
| ^
+-+
Integrate B2 back to main

In Perforce the result is (without conflict)
a
b
x
d
z

Test 2:
---

   Integrate B1 back to main
 ++
 |V
Main -> Branch1 -> Branch2   Main Main
a   aa a  a  aaa
b   bb b  d  dbd
c   cc c  z  bcb
z   z  

Re: Issue with merge/integration algorithm?

2012-07-27 Thread Arunmozhi
Please look into the attached tests.txt file attached in the initial mail for 
the input and the result. Each column shows the contents of a file as we do 
successive changes to the file.


I use tortoisesvn 1.7.5 as the user interface and hence I can just list the 
menu commands corresponding to each step and not the exact SVN commands (I am 
not used to the command line). The following are the steps I executed for Test 
1.

(1) Create a file myfile.txt with following contents and add it to the 
repository (TortoiseSVN -> Add, SVN Commit).
a
b
c
z

(2) Branch the file myfile.txt to a new location (TortoiseSVN -> Branch/Tag 
(From:myfile.txt To:branch1/myfile.txt), SVN update). Now the contents of 
branch1/myfile.txt is
a
b
c
z

(3) Edit the branch1/myfile.txt by inserting a line 'd' as follows and then 
commit the changes (SVN Commit). Now the contents of branch1/myfile.txt is
a
b
c
d
z

(4) Now branch the file branch1/myfile.txt to branch2/myfile.txt (TortoiseSVN 
-> Branch/Tag (From:branch1/myfile.txt To:branch2/myfile.txt), SVN update). Now 
the contents of branch2/myfile.txt is
a
b
c
d
z

(5) Now edit the file branch2/myfile.txt by changing the 'c' to 'x' and then 
commit the changes (SVN commit). Now the contents of branch2/myfile.txt is
a
b
x
d
z

(6) Now integrate the branch1/myfile.txt back to myfile.txt (TortoiseSVN -> 
Merge (Reintegrate a branch From:branch1/myfile.txt To working 
copy:myfile.txt), SVN commit). Now the contents of myfile.txt is
a
b
c
d
z

(7) Now integrate the branch2/myfile.txt back to myfile.txt (TortoiseSVN -> 
Merge (Reintegrate a branch From:branch2/myfile.txt To working 
copy:myfile.txt), SVN commit). Now the contents of myfile.txt is
a
b
x
d
d
z

You can see that the line 'd' appears twice in the integrated file. 'd' is 
inserted only once in the revision history. The expected output (verified in 
perforce and git) is
a
b
x
d
z




The second test shown in the attached tests.txt is similar, but shows another 
clear problem of the line 'd' appearing twice in the integrated file. Final 
integrated file is shown below.


a
d
b
c
d
z


The expected output for the second test as verified in perforce and git is

a
d
b
c
z


Hope now it clarifies the problem.




 From: Stefan Sperling 
To: Arunmozhi  
Cc: "users@subversion.apache.org"  
Sent: Friday, 27 July 2012 7:06 PM
Subject: Re: Issue with merge/integration algorithm?
 
On Fri, Jul 27, 2012 at 06:11:34AM -0700, Arunmozhi wrote:
> 
> 
> I feel that the SVN branching and merging/integration algorithm is 
> flawed. However I am not sure if this is a known limitation of SVN. I 
> did 2 tests to compare SVN against Perforce/git. The intention of the test 
> is to see if a change done by a user at some point in time and taken to 
> multiple branches comes back to the main branch duplicated multiple 
> times without indicating a conflict.

I'm afraid it's hard to help you based on the information you've given.

You're not showing any svn commands you're running.
You're not showing the results you got from svn.

Without that information it's impossible to tell what you were
really doing.

Issue with merge/integration algorithm?

2012-07-27 Thread Arunmozhi


I feel that the SVN branching and merging/integration algorithm is 
flawed. However I am not sure if this is a known limitation of SVN. I 
did 2 tests to compare SVN against Perforce/git. The intention of the test 
is to see if a change done by a user at some point in time and taken to 
multiple branches comes back to the main branch duplicated multiple 
times without indicating a conflict.

(Look at the attached tests.txt if the following looks misaligned)


Test 1:
---

   Integrate B1 back to main
 +---+
 |   V
Main -> Branch1 -> Branch2  Main Main
a   a    a a    a    a    a
b   b    b b    b    b    b
c   c    c c    x    c    x
z   z    d d    d    d    d
 z z    z    z    d
    | z
    | ^
    +-+
    Integrate B2 back to main

In Perforce/git the result is (without conflict)
a
b
x
d
z

Test 2:
---

   Integrate B1 back to main
 ++
 |    V
Main -> Branch1 -> Branch2   Main Main
a   a    a a  a  a    a    a
b   b    b b  d  d    b    d
c   c    c c  z  b    c    b
z   z    d d c    d    c
 z z z    z    d
 | z
 | ^
 +-+
    Integrate B2 back to main

In Perforce/git the result is (without conflict)
a
d
b
c
z

Any thoughts?
Test 1:
---

   Integrate B1 back to main
 +---+
 |   V
Main -> Branch1 -> Branch2  Main Main
a   aa aaaa
b   bb bbbb
c   cc cxcx
z   zd dddd
 z zzzd
| z
| ^
+-+
Integrate B2 back to main

In Perforce the result is (without conflict)
a
b
x
d
z

Test 2:
---

   Integrate B1 back to main
 ++
 |V
Main -> Branch1 -> Branch2   Main Main
a   aa a  a  aaa
b   bb b  d  dbd
c   cc c  z  bcb
z   zd d cdc
 z z zzd
 | z
 | ^
 +-+
Integrate B2 back to main

In Perforce the result is (without conflict)
a
d
b
c
z