Reverting tagged version back to trunk in subversion using Eclipse (Subclipse) tools 15649 6401

Reverting tagged version back to trunk in subversion using Eclipse (Subclipse)

Yesterday I was given a new assignment. Of a certain system all development was stopped a month ago. The latest version, deployed and tested on the test environment, will not continue to be deployed on the production environment. The current version running on production is almost a year old. All new functionality developed after this version will be withdrawn, except for two changes. The assignment is to implement only these two changes on the version current running in production.


All the Java code is nicely stored in subversion. There is a tag of the version current running on the production environment, as well as several tags of later versions which has not been deployed to production, only to the test environment. And the trunk is the latest developemnt code, as it should be. How are we going to this, so the trunk can be used in future to contitue development?


My first thought was to create a branch and continue development with this branch. But this leaves us with a trunk that will not be used any more. Not nice and quite confusing for further development and maintenance. For a nice situation we have to move the trunk back to a tagged version or to a branch.


Searching with Google, all I could find was information to merge a branch with the trunk. But that would result in lots of merging conflicts, because lots of changes were made after the tagged ‘production’ version. A path I didn’t want to go to. There must be an easier way.


The available tools are also a part of the problem. I can only use the subversion plug-in in Eclipse, Subclipse, because it’s not allowed to install software on your own (policy by the company where I was hired). So no Tortoise :-(.


The solution I’ve finally chosen is to go to the subversion perspective in Eclipse and to retrieve the history of the tagged version which is currently in production. Then note the revision number of the latest code change of this tag (excluding the revision of the tagging itself).


Then in the normal Java perspective checkout the trunk of the project in your workspace and retrieve the history of the trunk. You might need to press the "Get All" button to retrieve the full history. Find the revision number you noted and select all later revisions (select the revision right after your noted revision -one above- and while shift-pressed select the latest revision -the first one on top of the list).


With the alternate menu (right mouse click on the selection) you select option "Revert Changes from Revision x to Revision y". The reversion will only be applied to your local workspace.


By comparing your local workspace with the tagged version (right mouse click on the project – Compare With – Branch/Tag – select tagged version from repository), you can verify if the reversion was successful.


Finally Synchronise and commit all changes.


Now I am still wondering…. Is there an easier way to do it?
(also solutions using Tortoise are welcome)




  1. Alastair McDonald November 23, 2011
  2. Emiel Paasschens February 18, 2009
  3. Hakan Dahl February 17, 2009
  4. Klaas Eikelboom February 17, 2009
  5. Emiel Paasschens January 21, 2009