Skip to main content

Version control of design files - Tortoise SVN

A simple analogy:

Imagine a user borrows [svn checkout] a book from a library [svn repository], makes changes to the book and then returns [svn commit] the book to the library [svn repository].  In actual fact, with version control the book is not removed from the library [svn repository], it is simply copied from the library for the user to do whatever they wish [svn sandbox].  If the user makes changes to the book they can return the book to the library [svn repository] and this will become the latest [svn head] version of the book.  Version control stores all revisions of the book that were returned [svn commit] to the library [svn repository] so the user can access any revision.

SVN is primarily aimed at versioning files for software development using files in an ASCII format, but it can be used to version control any type of file.  It is particularly useful where a team of developers are working on the same project yet just as useful for a single user.

Project files are stored in a ‘repository’ which can be setup on a network server or on a local machine and each time a file is added/deleted/modified the revision number of the whole repository is incremented.

By default SVN creates 3 folders for a project as this is what most people use:

  • a “trunk” directory to hold the main line of development
  • a “branch” directory to isolate changes onto a separate line of development
  • a “tag” directory for design releases etc.

The branch and tag directories are optional depending on your development method.  For basic version control the user can simply use the trunk directory.

147_258381fe1243febfe9d27ff72338f47eaa842b58.png

 

‘Tortoise SVN’ is the client that the user installs on their machine and this integrates with ‘File Explorer’ by right clicking the mouse button...

237_f31d430c81a855b3d20982b820052ecf756bd7db.png 

When a user wants to work on a project, they ‘checkout’ the project they want to work on from the repository and this ‘copies’ the files from the repository to the users local drive (known as the users ‘sandbox’ or ‘working copy’). 

During the checkout the user can choose whether they want to check out the latest revision (known as the ‘head’ revision) or an earlier revision.  SVN stores every single revision so nothing is ever lost.

Icon overlays are used to indicate whether a file is unmodified, modified, conflicted, added or unversioned…


337_d1cf632188c40d2811ca7caf4d034f77f8e35c85.png

Once the user has finished working on the files they can ‘commit’ the files back to the repository.  During the commit process the user enters a log of a description of what’s been changed.…

424_b0f99dcdb0c285a7e3def37f046b1b9a735ec269.png 

Version controlled files that are in the ASCII format can be compared with the version in the repository to show the changes that have been made…

523_4239b1a9c0a71062b17aab455a92dff99a26f366.png

 

In addition to ASCII files, comparisons can also be performed with Word and Excel documents.  Users can add other comparison tools for other file types in the SVN settings.

A conflict occurs when a user modifies a file in their sandbox which has since been modified and committed to the repository by another user (i.e. they have modified a file that is now out of date with the repository).  A conflicted file cannot be committed to the repository.  The user has to update their sandbox to retrieve the head revision of the file and then merge their – if this is a text file then the merge is usually performed automatically.  There is an option to lock files when checked out to prevent conflicts, the downside to this is that only one user can checkout a file at a time.

Every revision in the repository can be accessed, the user can check out any of these earlier revisions from the very first revision to the head revision.  For efficiency, the SVN server only stores the differences between each revision and the data is also compressed.

618_b2b7bfe7b65485d0caeb167b1c6c28289ea410ee.png 

When committing ASCII format files it’s also possible to embed details about the commit into the file such as the revision, author, date, time etc…

719_dd77ef613feb256168ab0a5dae9d6bb3c2482a8f.png 

This feature can also work for Excel but only for earlier.xls type files as these are stored in an ASCII format (the later .xlsx files are stored as binary files)…

816_fabc0569a2c463e2bbcb37451f42fcc13a943a1a.png

 

There are many more features of SVN, visit the following website for further information, downloads and documentation….

https://tortoisesvn.net/