wiki:OurTutorial

What is what

SVN = Subversion = manager for file repositories with full change history.

Trac = a web application that includes a wiki, SVN view, and tickets.

Ticket = submitted bug or idea, e.g. jhusak submitted ticket:1 for putting ASMA in the SVN, and pfusik did it.

Language

Make sure Trac interface is in English. Polish translation is incomplete.

On the top, click Preferences, Language, English (United States), and save your changes.

Trac navigation

On the top bar:

  • Wiki
  • Timeline - Trac + SVN history, e.g.
    • wiki page edit
    • ticket - bug or idea
    • changeset is a change in SVN
  • Roadmap - our goals and how far we are according to tickets
  • Browse Source - read-only view on the SVN
  • View Tickets
  • New Ticket
  • Search

SVN Basics

SVN (subversion) is a version control system. In such systems, nothing is ever lost, the history of changes is always available with the author, and you can always revert to a previous version and fix any problem (see below).

As you can see in the Browse Source tab, there are three top directories in SVN:

  • branches - for the more advanced users. We don't use them yet
  • tags - contains tagged versions, usually releases and sometimes betas. We don't edit files directly here
  • trunk - it's the main workspace. You can browse it from Trac, but it's much more comfortable to have a copy on your disk (see below)

Every update to SVN is registered in its history - which you see in Timeline. A write is a "changeset". A changeset has the following attributes:

  • ordinal number
  • author's login
  • timestamp
  • log message - a short text written by the author to summarize the change
  • the changes - added/changed/removed files or directories

SVN can be browsed from Trac. To make changes, you need an SVN client. The most popular SVN client for Windows is TortoiseSVN.

TortoiseSVN Installation

https://tortoisesvn.net/downloads.html Choose 32-bit or 64-bit to match your Windows version. Any installation is fine; you can uncheck unnecessary things such as extra icons, command-line tools, and dictionaries. After the installation, the context menu of Windows Explorer gets additional TortoiseSVN commands.

Getting a local copy of SVN

Create an ordinary empty directory on your disk containing your SVN copy. Let's say it's called asma-trunk (use any name and location you like). Enter this directory in Windows Explorer, click the empty space, and select TortoiseSVN / Checkout. In the URL of the repository, paste: svn://asma.scene.pl/asma/trunk Make sure that the checkout directory is exactly your empty directory. Click OK and wait for the download.

The downloaded files are regular files - you can play and edit them. However, deleting, renaming, and moving must be done in a special way described below).

Basic SVN commands

Right-click on your directory gives you the following commands:

  • SVN Update - download new changes if someone made them
  • SVN Show Log - history (like Trac's Timeline, but limited to SVN changes)
  • SVN Commit - upload your local changes; this may block if someone made changes to the same file as you - in this case do SVN Update and resolve the conflicts (more info on demand: pfusik)
  • SVN Revert - reverts your local changes, replacing the files with their SVN version (cannot be undone, use with care!)

There are many other commands, but they are used less often.

Making changes

The easiest change is modifying a file that is already in SVN. Modify the file as you normally do - e.g. edit text files in the notepad. Next, choose SVN Commit - it will display the list of modified files. Enter the change description in the top edit box (the description is important so it's easier to browse the history), and accept. Enter your SVN login and password. Our changes are sent to the server and are available for the others who need to do SVN updates.

To add a file, put it in the directory, right-click it, and select TortoiseSVN / Add. The file won't be sent to the server until you select SVN Commit, as described above.

To delete a file don't just delete it. Instead, TortoiseSVN / Delete, then SVN Commit.

To rename a file, TortoiseSVN / Rename, then SVN Commit.

To copy or move a file, drag it with the right button - a menu will appear with options to SVN Move or Copy versioned items and optionally rename. Make sure to use SVN commands, not plain Windows move/copy! Then SVN Commit.

Only SVN Commit sends your changes to the server. The other operations work locally on your computer.

I think that's enough for the beginning. Any questions?

Viewing changes

Install TortoiseSvnDiff. It is optional but strongly recommended.

Last modified 14 months ago Last modified on Oct 31, 2023, 12:57:26 AM