What is the best way to replace a folder in svn using Eclipse subversive plug-in?
I want to replace a folder in my project locally which is checked out from the SVN server using subversive plug-in in Eclipse. In the meantime, I want to keep the revision history of all the changes made in that folder prior to this change.
For example I have a folder called JDK, which contains JDK 1.5 folders, but I want to replace it with JDK 1.6 folders and files. Many of the foldernames remain unchanged but the contents are different.
I have tried to delete everything inside JDK folder and put the JDK 1.6 folders and files into the JDK folder but subversive asked me whether I wa开发者_C百科nt to overwrite everything inside JDK folder or not. I am worrying if I overwrite the folders and files the history of that folder will be lost. My question is, what is the best way to replace the old JDK folder and keep the history, using Eclipse?
- Outside of eclipse, try to remove the content of jdk 1.5 folder. (inside eclipse SVN would treat the missing content as missing files, a revert on the jdk folder would bring all files back)
- Outside of eclipse, copy JDK 1.6 content into the old jdk 1.5 folder.
- Compile your code and see if JDK 1.6 works
Check your commit file properties. Within Eclipse, do an SVN->Commit. Three things could happen (a) if the new files have the same name as the old one, then SVN treats as an update,
(b) if the file is new, then you should add it to the repository, SVN treat it as new.
(c) if the file old file has no new replacement, then delete the file in the repository. SVN will remove it from repository.
Note: SVN may not allow you to commit without SVN->update, because the .svn folder may have removed. Yet if you update it, then all the (c) files above will come back. You may need to take notes on all those file that are not applicable to JDK 1.6, and remove them manually.
精彩评论