This is a draft

Installing

Tortoise SVN can be downloaded from http://tortoisesvn.tigris.org/. The installation is fairly self-explanatory.

Repository

Find somewhere to put the files where they wont be deleted. A good location would be C:\Documents and Settings\<Your Windows Account>

Create a new folder here for SVN repositories such as “SVN Repositories”


Make a directory for your specific project. In this case “example”. Right click on the folder and on the tortoise SVN menu go to create repository.


The recommended type of repository is FSFS as it is slightly less likely to have corruption and is better supported on network file systems.


Now the repository is created and we shouldn't need to use this directly except for backups and such.

Working Copy

Now for a working copy. Go to your code directory (or create one if you are just starting the project)

Right click in dir → tortoise → checkout.


Click on the triple dots (shown in red box) to choose repository path.


Browse to file path. ok. ok.

It will ask if you want to continue even though files are in directory. This shouldn't be a problem since the repository we are checking out is empty.


Add files

Now select all your files and directories you want under source control and right click → tortoise → add files. Confirm the files being added and remove any you didn't want added. A blue plus sign should appear over file icon (try using F5 to refresh if you don't see it).


This wont actually save the changes yet. The only way to save changes after adding and deleting files or renaming them is to commit them. In the project directory right click→commit.


Now a dialog asking for a commit message will appear. Always give a commit message that will help you identity the state of the program when you are looking for previous versions to compare with. Double check the list of files affected makes sense.


Working with Source Control

To see what changes you have made to a certain file on the list you can double click its name and it will show you file differences. It will try to find a reasonable program to diff them in and for code files will use its own diff program. Success. Your project is now under source control.

As you work you and change your program you should commit changes as steps are completed. Don't make changes too big or you wont be able to benefit as much from source controls ability to help you track down when things broke.

NOTE: to delete or rename files you need to right click on them → tortoise→ delete or rename otherwise SVN will not know where your changes went.

Reverting

If you make changes to a file and want to figure out what has changed since last commit you can select Diff from the tortoise menu (either by right clicking the background of the base folder for all changes, or on specific files). If you decide these changes aren't a good idea and want to get back to the last committed copy you can use the revert option on the tortoise menu.

Tracking down bugs

Sometimes you discover bugs that were not in the code before and need to track down where they came from. A good tool is the Show Log option. Although this looks complicated at first, it can be a powerful tool. You can search through commit messages to find versions that describe when the change may have happened. You can then select a revision and the full message and list of files that changed. You can double click on a file and the difference program will show you what has changed.

Trying older versions

Another way to debug is to compare how the program ran in older versions. The easiest way is to create a new directory elsewhere and use the checkout command. You can select the repository path like before and now click the show log button (highlighted in red) to help find the version to look at. Select a revision and then ok, ok. You now can compile and run your program and test against it.


 
tortoisesvn_howto.txt · Last modified: 2007/07/23 00:06 by wolever
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki