开发者

What is the best way to replace a folder in svn using Eclipse subversive plug-in?

开发者 https://www.devze.com 2023-02-23 20:41 出处:网络
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 m

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?


  1. 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)
  2. Outside of eclipse, copy JDK 1.6 content into the old jdk 1.5 folder.
  3. Compile your code and see if JDK 1.6 works
  4. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号