Accepted answer

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 svn merge.


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)

it's works.

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: and one that is command-line centric:


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:

  1. 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.

  2. 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.

Related Query

More Query from same tag