Subversion Tip of the Week

The Undo Button!

In the world of software development, client requirements change and new features can introduce more bugs than they fix – sometimes, you just need an ‘undo’ button! Thankfully, Apache Subversion remembers every change made to its files and directories, so you can roll back to a revision before it all went wrong! There are several methods for reverting to a previous version:

1) svn revert {filename} – this command overrides any local changes made to the working copy, with the code in the repository.

To run this command in TortoiseSVN, select ‘Revert…’ from the TortoiseSVN menu.

You will then be able to specify which changes you wish to implement. In this example, we are re-adding the ‘Help file.’

2) svn merge -r {revision number} – this command performs a reverse merge by rolling back to a change that has already been committed to the repository, and then applying it to the local working copy.
3) Alternatively, it is possible to simply delete your working copy and then checkout a fresh working copy from the repository.

0 Responses to “Subversion Tip of the Week”

  • No Comments

Leave a Reply