Guides/Subversion
From FGVwiki
Contents |
Subversion source control (SVN)
Subversion is a revision control system that we use for source code and software development-related files. If you're unfamiliar with the concept, read this explantion, or the full subversion documentation.
Note: This guide needs some work to make it applicable it FreeGeek
Basic operations
Checking out a working copy
To check out a working copy:
$ svn checkout http://svn.shop.lan
Moving a file within a working copy
Do not simply use the `mv` command to move a file within a working copy. Instead, you must use `svn mv`, and then commit your changes:
$ svn mv foo.c bar.c
A bar.c
D foo.c
$ svn ci -m "Renamed foo.c to bar.c"
Adding a file to be checked in
Use `svn add` to add files to the repository:
$ svn add baz.c
A baz.c
$ svn ci -m "Checked in baz.c"
Removing a file
As with moving files, don't use `rm`, use `svn rm`:
$ svn rm qux.c
D qux.c
$ svn ci -m "Deleted qux.c"
Checking in changes
As shown in the above examples, you use `svn ci` to check in your changes. Without any arguments, it will automatically check in all changes in the current directory and all version-controlled subdirectories:
$ svn ci
Alternatively, you can specify which files you want to check in:
$ svn ci one.c two.c one.h two.h
It is important to keep your commits atomic. That is, don't check in a whole bunch of unrelated changes, or only parts of one change.
Access
To gain access to the subversion system you must have a valid account in the FG LDAP database.
