you have two choices to do this.
the quick and dirty is selecting your files (using ctrl) in project explorer view, right-click them, choose
replace with... and then you choose the best option for you, from
latest from repository, or some
branch version. after getting those files you modify them (with a space, or fix something, your call and commit them to create a newer revision.
a more clean way is choosing
merge at team menu and navigate through the wizard that will help you to recovery the old version in the actual revision.
both commands have their command-line equivalents:
svn revert and
i have same problem but cleanup eclipse option doesn't work for me.
1) install tortoisesvn
2) go to windows explorer and right click on your project directory
3 choice cleanup option (by checking break lock option)
hope this helps someone.
the svnbook has a section on how subversion allows you to revert the changes from a particular revision without affecting the changes that occured in subsequent revisions:
i don't use eclipse much, but in tortoisesvn you can do this from the from the log dialogue; simply right-click on the revision you want to revert and select "revert changes from this revision".
in the case that the files for which you want to revert "bad changes" had "good changes" in subsequent revisions, then the process is the same. the changes from the "bad" revision will be reverted leaving the changes from "good" revisions untouched, however you might get conflicts.
i have written a couple of blog posts on this subject. one that is subclipse centric: http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html and one that is command-line centric: http://blogs.collab.net/subversion/2007/07/second-chances/
in eclipse using subversive:
right click your project > team > merge
in the merge window, select the revisions you want to revert as normally but also enable checkbox "reversed merge".
merge as normally.
if you want to do 1 file at a time you can go to the history view for the file assuming you have an eclipse svn plugin installed. "team->show history"
in the history view, find the last good version of that file, right click and choose "get contents". this will replace your current version with that version's contents. then you can commit the changes when you've fixed it all up.
in eclipse ganymede (subclipse)
select project/file that contains bad change, and from pop-up menu choose:
team -> show history
revisions related to that project/file will be shown in history tab.
find revision where "bad changes" were committed and from pop-up menu choose:
revert changes from revision x
this will merge changes in file(s) modified within bad revision, with revision prior to bad revision.
there are two scenarios from here:
if you committed no changes for that file (bad revision is last revision for that file), it will simply remove changes made in bad revision. those changes are merged to your working copy so you have to commit them.
if you committed some changes for that file (bad revision is not last revision for that file), you will have to manually resolve conflict. let say that you have file readme.txt with, and bad revision number is 33. also, you've made another commit for that file in revision 34. after you choose revert changes from revision 33 you will have following in your working copy:
readme.txt.merge-left.r33 - bad revision
readme.txt.merge-right.r32 - before bad revision
readme.txt.working - working copy version (same as in r34 if you don't have any uncommitted changes)
original readme.txt will be marked conflicted, and will contain merged version (where changes from bad revision are removed) with some markers (<<<<<<< .working etc). if you just want to remove changes from bad revision and keep changes made after that, then all you have to do is remove markers. otherwise, you can copy contents from one of 3 files mentioned above to original file. whatever you choose, when you are done, mark conflict resolved by
team - mark resolved
temporary files will be removed and your file will be marked changed. as in 1, you have to commit changes.
note that this does not remove revision from revision history in svn repository. you simply made new revision where changes from bad revision are removed.
- Rolling back bad changes with svn in Eclipse
- Associating existing Eclipse project with existing SVN repository
- Checkout SVN svn+ssh repo with subversive in Eclipse Helios
- Reconnect Eclipse Project to SVN with Subclipse
- SVN error on connecting with eclipse
- SVN Switch with relocate in Eclipse
- How do I get Eclipse to switch to SVN view on synchronize with repository?
- How do I use Eclipse Refactoring Tools and stay in sync with SVN through Subclipse?
- Setup a GWT Project correctly with SVN and Eclipse
- why eclipse doesn't come with bundled svn client
- SVN error on eclipse with Delete operation (aparently)
- List of SVN changes in working copy in Eclipse
- Eclipse not synchronized with file system changes made by ant's build.xml
- How can I get Eclipse work with Maven and SVN correctly?
- Eclipse + GAE: Properties changes and therefor problems with deploy
- Can not share new project with Subversive SVN in Eclipse Neon
- Error while creating branches and tags with SVN from Eclipse
- Prevent commiting files to SVN with warnings using eclipse
- How to use SVN 1.8 with Eclipse under Ubuntu?
- Is it possible to use SVN and CVS simultaneously with Eclipse
- Cant see changes in .java file when running Junit with Eclipse before mvn install
- Can't create a subversion repository with Eclipse 3.4.0, svn 1.5.1
- Automatic Maven project changes resolution with Eclipse
- SVN Showing question Mark(?) With each file in eclipse
- Eclipse Mars crashes when entering SVN settings with JavaHL library added
- Eclipse sync with svn repo is not available for Maven import project
- Slow SVN synchronization in Eclipse with a multi-module Maven project
- Eclipse Luna : losing hotkeys and getting back with focus change
- Compatibility of Eclipse Luna with SVN 1.6
- SVN with Eclipse (subclipse) command line works, subclipse doesn't (Network connection closed unexpectedly)
More Query from same tag
- Getting error while running cordova build android phonegap
- Custom keyboard writting on a sequential text using buttons
- Configuring Helios WTP utility project's build path with EAR Libraries
- Proper workflow for newbie to SVN-IDE environment
- Trying to get the Hello Android tutorial to work on Mac OS X Leopard
- How to add a reference in Eclipse
- How to move a mouse smoothly throughout the screen by using java?
- Strange class files appearing in my bin folder
- Create a star rating system using swt components in Eclipse
- How to clear a console in java
- Adding to Eclipse's console view pop-up menu
- Using playframework with the scala worksheet plugin for eclipse
- Stopping Eclipse from opening tabs in other perspectives
- Error generating projects in Eclipse
- How to find the minimum width to display the window title completely
- My Enemy wont draw
- mathml xsd schema to java classes using xjc MiOrMoOrMn <jaxb:property> error
- Permission denied while connecting to the repository using subeclipse
- How to get a view which is inside a complex ListView row view?
- Eclipse for C++ asks for Java Runtime Environment (JRE) or Java Development Kit (JDK)
- StreamSupport collector and java 7
- Java 14 text block leading \r\n inserted when used in Eclipse 4.15.0
- Thread.exit line: not available. Source not found. Edit source look-up path...?
- Exception occurred during code generation for the WSDL : java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/utils/NamespacePrefixList
- Having multiple perspectives open at the same time in Eclipse
- Eclipse taking lot of time to build Android project
- Eclipse Git : auto-synchronising 2 branches
- PHP IDE with Spell Check
- Eclipse Error: The refactoring does not change any source code
- Hello World project will not compile