FireWire Trademark
Subversion Source Code Repository
Google
Linux1394 Web  

Linux IEEE-1394 uses Subversion for a source code repository for libraries only (currently libraw1394 and libiec61883). The kernel modules source management now uses Git in a manner consistent with kernel maintainenance. A Linux 1394 Git tree is available. The URL of the driver repository for tools like git, Cogito, etc. is
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
The information below explains how to access and use our Subversion repository.

Checking out a repository

Because Subversion has tried to emulate CVS commands as much as possible, this is pretty intuitive for CVS users. The repository is located at:

svn://svn.linux1394.org/libraw1394/

There are three directories under this. The "trunk" is the equivalent of the "HEAD" revision. Directories under "branches/" are equivalent to a CVS branch (Subversion uses logical copies for branches and tags). The "tags/" directory contains logical tags (the same as one would expect under CVS). These mostly represent some sort of milestone in the main tree. So to check out the head, do this:

svn checkout svn://svn.linux1394.org/libraw1394/trunk/ libraw1394

The trailing "libraw1394" argument merely creates the local copy as a directory called "libraw1394" as opposed to the default of "trunk".

Updating an already checked out repository

Just like CVS:

cd libraw1394
svn up

Fairly simple.

Reverting to a previous revision

Since a Subversion repository uses a global revision number, it is easy to revert a tree to a know revision:

svn up -r 401

Note, that updating to a known revision is not sticky.

Switching to a tagged or branched tree

Let's say you checked out the "trunk", and you want to temporarily revert to a tagged revision (e.g. to try a branch):

svn switch svn://svn.linux1394.org/libraw1394/branches/foo

Then to switch back:

svn switch svn://svn.linux1394.org/libraw1394/trunk

Checking log information

Subversion has excellent log output. The basic log output shows the date, author, log message, and revision. You can also pass the --verbose option to view what files were affected by a revision. For example,

svn log | less

Would retrieve logs for all revisions.

svn log -r 400

Would retrieve just rev 400.

svn log file.c

Would retrieve logs for just the revisions that affect file.c.

svn log svn://svn.linux1394.org/libraw1394/trunk

Would retrieve logs (server-side, so no local copy needed).

svn log --verbose

Would show verbose logs for all revisions.


(For developers only)

Check out as you normally would as an anonymous user. The first time you attempt to write, you are prompted for your password. If the username is wrong, just press enter at the password prompt to get a username prompt. You can append to the URL /trunk /branches/foo to checkout different parts.

Committing changes

This is almost exactly like CVS. If you do not pass the commit message on the command line, you will have your editor invoked (just like CVS) so that you can enter it. Otherwise you can pass the message directly with the -m option, or pass a file containing the message using the -F option.

vi foo.c
svn ci -m "Fix" foo.c

You can leave out the filename on the checkin command, and svn will do the same as CVS and commit all changes.

Creating a branch or tag

Branches and tags are internally the same to Subversion. Basically a lightweight copy method. So, it's as easy as:

# svn up
At revision XXX
# svn copy trunk branches/mybranch
# svn propset branch-point XXX branches/mybranch
# svn commit -m "Branched for 'mybranch'"

The main difference between tags and branches is how we use them. Branches are for concurrent lines of development (e.g. Adding large pieces of funtionality), while tags are just meant to alias a certain point in the tree.

Currently Subversion does not have direct support for keeping a branch in sync with it's branch point (IOW, automated merging of changes to trunk into your branch). This will be added soon enough, and we will use it when it does come around. In order to merge changes from trunk into your branch:

# svn up
At revision XXX
# svn propget branch-point branches/mybranch
YYY
# svn merge trunk@YYY trunk@XXX branches/mybranch
# svn propset branch-point XXX branches/mybranch
# svn commit -m "Merge changes from trunk to 'mybranch'"

Adding or deleting files and directories

Unlike CVS, Subversion does not force directories to be created in the repo, when they are added locally in the working copy. Also unlike CVS, it is possible to delete a directory from the repository, but again this does not occur till commit. To add a file or directory, do:

svn add foo.c
svn add --recursive newdir/
svn commit -m "Added new files"

To delete, it's pretty much the same:

svn delete foo.c
svn delete newdir/
svn commit -m "Remove these files and directories"

Copying or moving files and directories

One of the best features of Subversion, as opposed to CVS, is the ability to copy and move files and directories, while retaining full history. Let's say you want to rename a file:

svn move foo.c foo-newname.c
svn commit -m "Rename this file"

Same occurs for directories. This can be done completely server-side aswell. For example, to rename a branch:

svn move svn+ssh://svn.linux1394.org/libraw1394/branches/old-branch \
svn+ssh://svn.linux1394.org/libraw1394/branches/new-branch

Obviously this doesn't need a commit, as the operation occurs in one operation.

Diff'ing

One of the features of SVN is the it keeps a local, unmodified copy of the files from the repository. This means that diff'ing local changes does not require contacting the server. Quite simple:

svn diff > ../temp.diff

Would get a complete diff of your changes against the unmodifed copies.

Read the manpage

There's a lot of functionality I haven't covered here.