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)
- JDeveloper code templates
- Running Oracle Designer Generation from Ant and Hudson
- OTN Yathra 2013 – Spreading the story of Oracle across India – (Half time)
- Dear Java/JEE developer – why should you care about ADF?
- OOW 2012: The yearly AMIS Review from Oracle Open World and JavaOne – slides available
- Kom kennismaken met AMIS en doe mee met uitdagende projecten
- JavaOne 2012: The Big Stories
- JavaOne 2012: Thinking Through Java Enterprise Performance (BOF 4712)
- Uitnodiging: Kom kennismaken met AMIS
- Dinsdag 18 september: Oracle Open World & JavaOne 2012 Preview mini-conferenties – 12 presentaties op 1 avond