Subversion
From XBMC
In computing, Subversion (SVN) refers to Revision control (also known as version control (system) (VCS), source control or (source) code management (SCM)) is a tool used by many software developers to manage changes within their source code tree. SVN provides the means to store not only the current version of a piece of source code, but a record of all changes (and who made those changes) that have occurred to that source code. Use of SVN is particularly common on projects with multiple developers, since SVN ensures changes made by one developer are not accidentally removed when another developer posts their changes to the source tree.
SourceForge providedSVN revision control system hosting for The XBMC Project to maintain current and historical versions of the XBMC source code files. SVN replaced the previous used CVS (Concurrent Versions System) revision control system that XBMC also had hosted on SourceForge.
In order to access a Subversion repository, you must install a special piece of software called a Subversion client. Subversion clients are available for most any operating system.
Contents |
XBMC SVN repository access
The XBMC project's SourceForge.net Subversion repository can be checked out through SVN with the following instruction set:
Xbox
Linux/OSX/Win32
SourceForge Reference: http://sourceforge.net/svn/?group_id=87054
Recommended SVN client software
TortoiseSVN is an easy to use SCM / source control software for Microsoft Windows and maybe the best Subversion client there is. It is implemented as a Windows shell extension, which makes it integrate seamlessly into the Windows explorer. Since it's not an integration for a specific IDE you can use it with whatever development tools you like.
Another advantage of this shell integration is that not only web or software developers can use it but all the people who don't have the development tools installed, for example translators.
SVN offers features like
- Commits are true atomic operations. Interrupted commit operations do not cause repository inconsistency or corruption.
- Renamed/copied/moved/removed files retain full revision history.
- Directories, renames, and file metadata (but not timestamps) are versioned. Entire directory trees can be moved around and/or copied very quickly, and retain full revision history.
- Versioning of symbolic links.
- Native support for binary files, with space-efficient binary-diff storage.
- Branching and tagging are cheap operations, independent of file size.
- Natively client/server, layered library design.
- Client/server protocol sends diffs in both directions.
- Costs are proportional to change size, not data size.
- Parsable output, including XML log output.
- Internationalised program messages.
- File locking for unmergeable files ("reserved checkouts").
- Path-based authorization for svnserve.
- Full MIME support - the MIME Type of each file can be viewed or changed, with the software knowing which MIME types can have their differences from previous versions shown.
Properties
One important feature of the Subversion filesystem is properties, simple name=value pairs of text. Properties are used in two different places in the Subversion filesystem. The first is on filesystem entries (i.e., files and directories). These are versioned just like other changes to the filesystem. Users can add any property they wish, and the Subversion client uses a set of properties, which it prefixes with 'svn:'.
- svn:executable
- Makes files on UNIX-hosted working copies executable.
- svn:mime-type
- Stores the MIME type of a file. Affects the handling of diffs and merging.
- svn:ignore
- A list of filename patterns to ignore in a directory. Similar to CVS's .cvsignore file.
- svn:keywords
- A list of keywords to substitute into a file when changes are made. The keywords must also be referenced in the file as $keyword$. This is used to maintain certain information (e.g date of last change, revision number) in a file without human intervention.
- svn:eol-style
- Makes the client convert end-of-line characters in text files. Used when the working copy is needed with a specific EOL style. "native" is commonly used, so that EOL's match the users OS EOL style. Repositories may require this property on all files to prevent inconsistent line endings, which can be a problem in itself.
- svn:externals
- Allows parts of other repositories to be automatically checked-out into a sub-directory.
- svn:needs-lock
- Specifies that a file is to be checked out with file permissions set to read-only. This is designed to be used with the locking mechanism. The read-only permission is a reminder to obtain a lock before modifying the file: obtaining a lock makes the file writable, and releasing the lock makes it read-only again. Locks are only enforced during a commit operation. Locks can be used without setting this property. However, that is not recommended, because it introduces the risk of someone modifying a locked file; they will only discover it has been locked when their commit fails.
- svn:special
- This property isn't meant to be set or modified directly by users. Currently only used for having symbolic links in the repository. When a symbolic link is added to the repository, a file containing the link target is created with this property set. When a Unix-like system checks out this file, the client converts it to a symbolic link.
The second place in Subversion where properties are used is on revisions themselves. Like the above properties on filesystem entries the names are completely arbitrary, with the Subversion client using certain properties prefixed with 'svn:'. However, these properties are not versioned and can be changed later.
- svn:date
- The date and time stamp of when the revision was made.
- svn:author
- The name of the user that submitted the change(s).
- svn:log
- The user-supplied description of the change(s).
Branching and tagging
Subversion uses the interfile branching model from Perforce to handle branches and revision tags. A new branch or tag is created with the 'svn copy' command, which should be used in place of the native operating system mechanism. Subversion does not create an entire new file in the repository with its copy. Instead, the old and new files are linked together internally and the history is preserved for both. The copied files take up only a little extra room in the repository because Subversion saves only the differences from the original files.
All the files in each branch maintain the history of the file up to the point of the copy, plus any changes made since. Changes can be 'merged' back into the trunk or between branches. To Subversion, the only difference between tags and branches is that changes should not be checked into the tagged versions. Due to the differencing algorithm, creating a tag or a branch takes very little additional space in the repository.

