I have a project say Project
in my eclipse workspace
which I commit on an svn repository. When I make some changes in my local copy, I can easily integrate those changes with the project
-> right click
-> team
-> synchronize with the repository
option. But in case I have another project name Project
(same name for both projects) in another workspace say workspace2
which is not connected to svn
and I want to synchronize it with the same project on svn
repository How should I do it? Because the only choice in this case is project
-> right click
-> team
-> share project
or apply patch
. To share this project I will have to commit
it but in this case the contents of the project already available on svn
repository will be lost. I want to merge
the two projects such that the useful content of both is merged and the merged copy is available on the svn
repository. Any help will be highly appreciated. Thanks in advance.
SVN can't automatically merge a SVN project with one that wasn't originally checked out from SVN. To merge two branches of a project, SVN needs to know which branch each change was made on. Otherwise it will just see the differences between the two sides, but won't have any way to know which side to keep. It can only do this if it has the history of each side's changes, which in this case you don't have.
What I would do is just diff the two projects, look at each change yourself, and decide whether to copy it into the SVN project. Start by backing up the non-SVN project, and committing any changes to the SVN project, so you have a clean place to revert to if you mess up. Then select both projects and do Compare With > Each Other. It will show you all the files that are different. Double-click each file to see the differences within the file, and copy them to the SVN side if you want to keep them. Then if everything looks good, you can commit it, and get rid of the non-SVN version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.