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

Re: [Fwd: Re: incorrect result of merge]

From: Michael Colefax <MichaelCo_at_resmed.com.au>
Date: 2005-12-20 06:23:56 CET

> Simon Large wrote:
> I think this may be closely related to issue 1736. Slightly different

Yes, it looks related - if I can, I will update that issue with a link to
this thread/scenario (not sure if I have permissions)...

> Peter McNab wrote:
> Has anyone reproduced this with stock Subversion?

I tried it both ways (with Subversion and with Tortoise)

> However, frustratingly the transcript is not a true transcript,

Sorry for that. Here is more detail. Note I use 'touch' to simply create
empty text files:

## set up the repository
    cd c:
    mkdir svn
    cd svn
    mkdir repo
    mkdir template
    mkdir template/main
    mkdir template/branch
    svnadmin create repo
    svn import template file:///c:/svn/repo -m"import template"
    svn co file:///c:/svn/repo work1

## 1. create a branch and switch to it
    svn copy file:///c:/svn/repo/main file:///c:/svn/repo/branch/b -m"create
work branch"
    svn switch file:///c:/svn/repo/branch/b work1

## 2. create a folder, add a file in the folder, and commit to the branch
    mkdir work1/folder
    touch work1/folder/file1.cpp
    svn add work1/folder
    svn ci work1 -m"add a folder and a file"

## 3. create another file not in the folder and commit to the branch
    touch work1/file2.cpp
    svn add work1/file2.cpp
    svn ci work1 -m"add another file"

## 4. move the file created in step(2) to the parent directory, and commit
to the branch
    svn move work1/folder/file1.cpp work1/file1.cpp
    svn ci work1 -m"moved file from folder"

## 5. switch to the main trunk
    svn switch file:///c:/svn/repo/main work1

## 6. merge in the changes made on the branch in step 2
    svn merge -r2:3 file:///c:/svn/repo/branch/b work1

## 7. merge in the changes made on the branch in revision 4
    svn merge -r4:5 file:///c:/svn/repo/branch/b work1

## 8. commit the merges to the main trunk
    svn ci work1 -m"merge in changes from the branch"

## now to see the problem:
    svn co file:///c:/svn/repo/main work2
    svn log -v file:///c:/svn/repo/main

The file moved in step(4) appears in both locations! (ie work2/file1.cpp and
work2/folder/file1.cpp). But the log for the main trunk doesnt show this -
although the output during the commit in step(8) did!

Kind regards,
Michael Colefax

Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.
This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 9886 5000 Sydney, Australia.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 20 06:25:53 2005

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.