The example setup
The following test repository was created and used in the following examples.
|
|
|
|
Rollback with subversion
To me a rollback is when you want to undo one or more commited changes. Subversion does not let you delete repository revisions so instead you need to appened a new revision at the end of the trunk/branch.
This can be achieved by manually editing all files (removing any files/directories that might have been added) and then check in the result. Another and quicker way to do it is to do a “reversed merge”, that is to merge the newer (faulty) version with the older.
|
|
Updated third party software imported into your subversion repository
When you version control a third party software it is sometimes necessary to upgrade this to a later release.
Since you often only get a tar file containing the new release it might not be trivial to find out which files that was changed, new or even deleted compared to the old release. A simple way to do it is just to unpack the new release into your workspace and ‘‘svn status’’ will tell you which files are new or changed. But what about the deleted/obsolete files ?
Step 1: Remove all files from your workspace
Remove all files but keep the .svn directories using the following command.
|
|
Step 2: Unpack the new release
|
|
Step 3: Find out which files that have been deleted
First list any files that has been removed in this release of the software.
|
|
Look through the list, there might be some files that you’ve added to the repository that is not part of the third party vendors release. If so use ‘‘svn revert’’ to recreate them.
When your happy with the result remove the remaining deleted files from version control.
|
|
Step 4: Add any new files
Add any new files that isn’t under version control already.
|
|
Step 5: Verify and check in
Verify that the new release builds and/or works as expected and check in.