Subversion
From Maslab 2007
Subversion is a version control system (like CVS, only without a decade of cruft). Its main advantage is the fact that it tracks changes to your source code base as a whole together, not to individual files.
Setting up a Subversion respository
- To set up a Subversion repository for your team in your Athena locker:
-
add svn(try to get this in your dotfiles) -
mkdir ~/maslab-repository(you can name it whatever you want) -
fs setacl -dir ~/maslab-repository -acl system:maslab-2006-team-N all(where N is your team number; see Athena lists) -
svnadmin create --pre-1.4-compatible ~/maslab-repository(make the repository) - Make, somewhere unrelated in your home directory, a directory called
maslab-project(or something); inside it place three directories calledtrunk,branches, andtags. Copy all of your code so far into thetrunkfolder. - Change to the directory that contains the
maslab-projectdirectory. Typesvn import maslab-project file:///mit/username/maslab-repository.
-
- Follow the instructions below to check out your code somewhere.
The maslab-project directory was only to be used for initially importing the code into the repository; feel free to delete it once you're sure you can check out the code from it. (Don't delete maslab-repository!)
Using SVN
- To check out a working copy of the project from your team's repository,
- If you are logged into your bot (as opposed to Athena),
kinit username, type in your password, and thenaklog. -
svn checkout file:///afs/athena/user/t/e/teammate/maslab-repository/trunk maslab-checked-out(wheretandeare the first two letters theteammatewho set up your repository). This will plop your project into the directorymaslab-checked-outinside your current directory.
- If you are logged into your bot (as opposed to Athena),
- To update your (already checked out) archive: type
svn update. This updates to the latest version in the repository, letting you know if you've made any incompatible changes locally. - To commit any changes you've made (in all files):
svn commit. - To see what files have been changed:
svn status(Mmeans modified). - To add a new file to be version controlled: make the file like usual, then do
svn add file. - To copy or rename a file:
svn cp file1 file2orsvn mv file1 file2. (If you don't use svn here, it won't know that the file has moved!) - To get help:
svn helporsvn subcommand help.
Full documentation: The Subversion Book
