Difference between revisions of "Subversion"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
m (Properties)
Line 54: Line 54:
 
== Properties ==
 
== Properties ==
  
==  
+
== Pitfalls ==
 +
 
 
== Configuring subversion ==  
 
== Configuring subversion ==  
  

Revision as of 04:50, 5 April 2006

This page introduce the use of subversion. If you're only intent is to get the file from subversion you should start with HOWTO: Obtain the library source from subversion which help you in getting the file and compiling CEGUI. This page dive deeper in the use of subversion as a standard user as well as a developer of the library itself. This page presents the use of subversion with the command line tool available for windows, mac and linux.

First of all here is some urls to get started with subersion usage :


Glossary

  • Repository: That's the place storing all the files and revisions. It's hosted by sourceforge. In Subversion respository are identified using urls.
  • Working Copy: A working copy is a local view of part of the repository. You can retrieve a local copy using the checkout command. A working copy contains the file as well as a lot of additional information. The size of the working copy is more than twice the size of the file of the project.
  • Branches: Subversion does not provides branches concept, however it's possible to organize the project in several branches. The current development branch is known as trunk. The other branches are stored in a folder named .... branches. So a branch in Subversion is just a folder in branches.
  • Tags: Subversion does not provides tags concept. Like branches tags are only subfolder of the tags folder.
  • Revision: Snapshot of the tree at a given time. Each modification on the tree create a new revision.

Layout of the repository

At the moment there is two project in the CEGUI repository. The CEGUI library and the layout editor. The repository is organised the following

  • cegui_mk2 : The cegui library itself
    • trunk : The main development stream
    • branches : Branches (features testing are prefix with pre-)
    • tags: Release of the CEGUI library
  • CELayoutEditor : The editor files
    • trunk : The main development stream
    • branches : Branches
    • tags: Release of the editor

Getting a working copy of the project

In order to get the files from the sourceforge server one can use two command. Both command retrieves the files, however, the second command does not allow later use of subversion to update and maintain up to date local copy. If you plan to get the sources, create your library, install it, and remove them the second solution is the best for you.

svn checkout url [dest_dir] 
svn co url [dest_dir]

or

svn export url [dest_dir]

Using each of these command you will get the latest version of any file with url as root tree. You can get files at a particular revision using an additional parameter:

svn checkout/export [-r number] url [dest_dir]. It usefull to test older version. There is no named revision in subversion but it's easy to create tags which provides the same features. 

Updating your working copy

You'are now having a working copy by checking out a version of the project. You can keep it in sync with the repository at sourceforge using in any folder of your working copy. Only the current folder will be updated.

svn update 
svn up 

Getting history of modifications

In order to get a kind of changelog you can use subversion. Each modification of the repository comes with a text message explaining the last modification. You can get the history of any file or directory of your working copy using:

svn log [url]  (remote repository) 
svn log [path] (working copy)

Making change to your working copy

There is several change that can be made on subversion repository : adding, removing, renamming and modifying files, adding, removing and renamming directory. @in progress@

Branching, Merging, Tagging

Properties

Pitfalls

Configuring subversion

Command line client

Tortoise SVN