How to use SVN

From Post-Apocalyptic RPG wiki

Jump to: navigation, search

Subversion.png This article is an SVN how-to!

SVN how-tos serve as documentation how the Subversion version control software is utilized by the developers in general or how it's used by a specific development department.

This article describes ways of working with Subversion that apply to the entire development team. In case you're interested in department-specific SVN workflows, check out the other articles of the Subversion category.

Contents

Repository URL

Repository structure

  • branches: branches for changes that should not go into trunk right away
    • active: branches under active work that introduce larger changes that would likely break trunk; active sprints branches reside here as well
    • historic: archived branches not under active work anymore
    • media: storage repository for raw assets (3d models, textures, sounds, music, etc.)
  • tags: tagged releases
  • trunk: the main development branch
    • game: the game itself, including ingame assets
    • tools: all kind of (asset creation) tools

Common tasks

Command Line SVN

All commands are described as if you started in the same top level directory, perhaps ~/projects/ on Linux, or C:\projects\ on Windows.

Getting a working copy

cd parpg
svn co http://parpg-svn.cvsdude.com/parpg/trunk/ parpg

Updating your working copy

cd parpg
svn up

Checking who edited a file

svn blame parpg/<filepath>

Checking which files you have changed

cd parpg
svn status

Checking the commit logs for a given file

svn log parpg/<filepath>

Commiting changes

svn ci file -m "Short note about the change" --username USERNAME

TortoiseSVN

After TortoiseSVN is installed, it will be integrated in the right-click menu in Windows.

Getting a working copy

Create a folder named "parpg" where you want to put the working copy, right-click somewhere inside the folder, and select SVN Checkout. Enter the URL of repository - http://parpg-svn.cvsdude.com/parpg/trunk/parpg - and click OK.

Updating your working copy

Right-click on the "parpg" folder, and select "SVN Update".

Checking who edited a file

Right-click on the file and select TortoiseSVN -> Blame.

Checking which files you have changed

The files/folders that are different in your working copy will show an "Attention" icon.

Checking the commit logs for a given file

Right-click on the file and select TortoiseSVN -> Show log

Commiting changes

Right-click on the PARPG folder and select SVN Commit...

Select the files that you want to commit and write a commit message that complies with our agreed upon Commit comments guidelines. Last step: press OK.

Additional reading

Personal tools