wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 48,397 times.
Learn more...
One of the great things about Apache Subversion is that it remembers every change made to its files and directories. This gives you the option of reverting to earlier versions of your code - a useful feature if you’ve introduced some bugs or unnecessary code in the last few revisions, and need to roll back to a time before it all went wrong! Tagging can make this process much easier, by giving you the option of labelling a specific revision with a handy, human-readable tag (such as “Release 5.0.”) In this guide, we will first cover creating such a tag, before walking you through the process of reverting to that tag, a few revisions down the development line.
Steps
-
1To get started, right click on your working copy and select the ‘Branch/Tag option from the TortoiseSVN’ menu.
-
2In the subsequent dialog, select the ‘tags’ path and add the desired tag. In this example we’ll use ‘Release_5.0”Advertisement
-
3Add an appropriate log message in the ‘Log message’ box.
-
4Select which revision you wish to tag. This is usually the HEAD revision, but you can specify another revision, if required. When you have entered all this information, hit ‘OK.’
-
5TortoiseSVN will warn you that: “your working copy remains on the previous path. If you want your next changes to be in the just created copy then you need to switch over to that copy path. Use the Switch command to do that." You have now created your tag.
-
6If you check your repository, you will see that this tag has been successfully committed.
-
7With TortoiseSVN and Subversion, it is easy to roll back to previous tagged revisions. To roll back to the revision we just tagged at a later date, right-click on your working copy and select ‘Show Log.’
-
8This will display a list of revisions.
-
9Select the revision you wish to revert to and right-click. Select ‘Revert to this revision.’
-
10When prompted, confirm you wish to revert.
-
11TortoiseSVN will now revert to this earlier revision.
-
12Check the results of the revert and, if you’re happy with them, commit your working copy back to the repository. Warning: this will discard all the changes you made after the selected revision.
Things You'll Need
- The TortoiseSVN Windows client: http://www.wandisco.com/subversion/download#tortoise
- Apache Subversion: http://www.wandisco.com/subversion/download