wiki:Tortoise_SVN

Tortoise SVN is a Subversion client for Windows, which integrates into the Windows Explorer. It's easy to use and supports nearly all Subversion operations.

Download

Download Tortoise from the project website:

Quick Start

{| style="float:right; background:transparent; padding:0px; margin:0px;"

|No image "tortoise1.png" attached to Image/tortoise1.png |No image "tortoise2.png" attached to Image/tortoise2.png |}

  • Install Tortoise SVN
  • Create a new folder, where you want to download the contents of the repository to. E.g. a folder C:\shared\decos
  • Right-click the folder and choose SVN Checkout
  • Enter the correct URL of the repository, e.g. for the DECOS project and press OK  https://rtsys.informatik.uni-kiel.de/svn/projects/decos
  • In the upcoming dialog press Accept permanently to accept the server
  • Enter your username and password
  • All files of the repository will be checked out. If the repository is large, this might take a while.

Updating the Repository (download foreign changes)

When somebody has changed something at the repository, you need to update your local copy of it:

  • Right-click the folder of the repository
  • Choose SVN update
  • Update process will start automatically

Add new files

{| style="float:right; background:transparent; padding:0px; margin:0px;"

|No image "tortoise4.png" attached to Image/tortoise4.png |No image "tortoise5.png" attached to Image/tortoise5.png |}

Basic Rule: No special characters in file or folder names (e.g. german umlauts)

To add new files to the repository do the following:

  • Simply create the new files anywhere in the repository (or copy them from somewhere)
  • Right-click the file
  • Select TortoiseSVN and then Add...
  • In the upcoming list you can select the files you want to add. Hence you can even add a whole new folder and select or deselect some of its contents to add.
  • Note this addition is only done locally on your own machine! You need to commit your changes to really upload all added files!

Commit changes at the repository (upload local files)

No image "tortoise6.png" attached to Image/tortoise6.png If you have made any changes at your local copy of the repository this includes

  • Added or removed files
  • Changed files (e.g. edited source code)

you need to commit these changes.

  • First check whether somebody else has changed the file already! Do an update!
  • Then right-click the repository and press SVN Commit...

No image "tortoise7.png" attached to Image/tortoise7.png

  • Enter a little explanation what you have changed at the repository
  • Select or deselect changes you have made that you want to really commit
  • Press OK

Problems when Updating

Conflicts

If somebody else has changed a file and you have changed the same file on your local repository, you cannot commit your changes!

  • Before you commit, always update
  • If you and somebody else have changed the same file, this is a conflict
  • If you changed a file at different positions (e.g. in source code), SVN will merge the changes automatically, so both changes are in the file.

No image "tortoise8.png" attached to Image/tortoise8.png

  • If the changes are too complicated for automatic merge, you need to decide yourself, which changes you want to keep:
    • New files were created for the conflicted file:
      • filename.mine: only my own changes
      • filename.rXXX: with XXX=number of revision before all changes, hence file with no changes
      • filename.rYYY: with YYY=number of revision of foreign changes, hence file with changes of the other developer
      • filename: In this file all changes are merged. If they are really conflicted, there are special <<< markers added to indicate the conflicts, e.g.

<<<<<<< .mine

x = y + 3; my change

=======

x = y + 5; change of other developer

.r283

  • Hence you cannot use this file! Solve the conflict manually, repair the file by either Copy the file with the correct version to filename, right-click, TortoiseSVN, Resolved Repair the file manually, right-click, TortoiseSVN, Resolved
  • Now you need to commit again!

Containing working copy admin area is missing

No image "tortoise9.png" attached to Image/tortoise9.png Subversion stores all information about its files in a .svn folder in every repository folder. If one of these folders is deleted, you get an error message. To solve:

  • Delete the whole folder where the .svn folder is missing
  • Update the repository
  • The folder with correct svn information will be received from the repository

This is likely to happen if some automatic build or clean process deletes some folder which is under version control and creates a fresh one. Hence

  • A good rule: Only check in source code and no build or other temporary folders'''