emilly
emilly

Reputation: 10530

File is shown as deleted while merging branch to trunk

i am merging branch to trunk using tortoise svn option Merging Two Different Trees

I have file i.e file1 under trunk but not on branch

I have checked out trunk to my local .then did Right- click > Merge > Merging Two Different Trees > mentioned from as trunk url and to as branch url > Test merge

Now file1 is shown as deleted under Test merge results but why ? Ideally it should ask me that this file does not exist under branch but exist on trunk. Do you want to keep it or not ? Is there an option of doing it ?

UPDATE :-

on 1st june i created the branch from trunk. on 5th june i added the file1 under trunk. Now when when i am trying to merge branch to trunk, should it be displayed as deleted ?

Upvotes: 3

Views: 3135

Answers (2)

Sergey Azarkevich
Sergey Azarkevich

Reputation: 2671

If you follow instruction if TSVN help for reintegrate via 'Merging Two Different Trees' than it can be easily explained. You ask apply difference between trunk - branch to working copy.

File exists in trunk but absent in branch, then difference - 'delete file'

This difference applied to working copy and silently (no conflicts here) delete file.

Also you can check that after merge your working copy should look exacly as branch. This is what reintegrate merge doing - make destination branch ('trunk' in your case) equal to source barnch.

If you still want perfrom reintegration merge via 'Merging Two Different Trees', then first perfrom sync merge trunk -> branch. In this case branch will contains both trunk and branch changes and reintegrate will look like copy branch changes into trunk (but again, actually it is made trunk equal to branch)

Upvotes: 1

Veselin Davidov
Veselin Davidov

Reputation: 7081

If you created the branch from trunk and then deleted the file in the branch it is counted as change after the branching date. So like the other changes that you want to merge you merge this one too (deleting the file).

If the file is deleted in separate commit you can merge without this revision (you specify which revisions to merge in turtoise).

Also you merge locally and then you commit the merged version. So the deleted file is deleted only in your local computer. When you commit the merge to the repository you can uncheck the deleting of the file or revert the deleting of the file. This way the trunk will still have the file.

Upvotes: 1

Related Questions