Checking Out O2S with Subversion
NOTE: If you do not have an account on o2s.csail.mit.edu, skip to the section on "Checking out Anonymously."
To check out the O2S repository, first ensure that you have subversion installed. Then issue the following command:
svn checkout svn+ssh://o2s.csail.mit.edu/home/o2s/svn/trunk/o2s
This will check out trunk (main branch) of our code into a new directory called o2s. You don't need to set environment variables; the URI gives subversion all the information it needs. Additionally, you only need to provide it the URI when you checkout new repositories.
Checking out Anonymously
You can check out code anonymously (but read-only) with the following command:
svn checkout svn://o2s.csail.mit.edu/trunk/o2s
You do not need an ssh account on o2s to do this.
Third Party Source for O2S Libraries
Note: You do not need to compile and build any of the support libraries if you are running Microsoft Windows or Apple Mac OS X. See InstallSoftware for binary installers.
To check out source code (and installer scripts) for required 3rd party libraries:
svn checkout svn+ssh://o2s.csail.mit.edu/home/o2s/svn/trunk/o2s-libs
Or to do so without an account (i.e., anonymously):
svn checkout svn://o2s.csail.mit.edu/trunk/o2s-libs
Branches
If you want to get one our branches, you just replace trunk with branches/XXX where XXX is the branch you want. For example:
svn checkout svn+ssh://o2s.csail.mit.edu/home/o2s/svn/branches/demo2/o2s
will get our most recent demo branch. Branching is really cheap and easy in Subversion, so we should probably make good use of it.
Finally, if you are working on o2s.csail.mit.edu and don't want the overhead of ssh, you can use a
file:// url. The above two would be:
svn checkout file:///home/o2s/svn/trunk/o2s
svn checkout file:///home/o2s/svn/branches/demo2/o2s
in this schema.
More Info
I learned most of getting Subversion up and running from O'Reilly's "Version Control with Subversion." It is available on the web (free) at
http://svnbook.red-bean.com/. A useful chapter to read carefully (it's the main one I read) is "Subversion for CVS Users"; Appendix A from the link above.
Skim the rest of the document for information about how things are set up, especially the last section if you get odd permission errors. (However, it should just work.)
What I converted
I brought over all of the previous CVS. This includes o2s2, o2s-old, packages, and personal. Eventually I will svn remove these since they haven't been touched in at least two years. You can always get them back when you want.
Some Words on Setup
This is how I set up our repository.
# see "A Word on Permissions"
umask 0002
# --fs-type=fsfs makes a file-system based SVN repository (versus
# a Berkeley DB one) because of the NFS locking issues. I had to
# use --exclude=start and --exclude=o2s because they were
# tags/branches in the CVS repository that were broken.
#
# (You have to do this command from the comfort of a local file
# system--I chose to use /tmp--since the cvs2svn utility uses
# Berkeley DB which relies on POSIX file locking semantics which
# most remote FSes don't provide.)
~/temp/cvs2svn-1.2.0/cvs2svn --fs-type=fsfs \
--exclude=start --exclude=o2s \
-s /home/o2s/svn /raid/cvs
# again, see a "Word on Permissions"
cd /home/o2s/svn
chgrp -Rc o2s *
Some Words on Permissions
The svn+ssh:// protocol indicator tells the svn client to ssh into the server and then run a svnserve command to actually perform your requests as your own user. As such, we have to be careful to keep permissions straight.
I set the umask to 002 so that the o2s group would have read and write access to the files the cvs2svn command made. The chgrp command set o2s to be the file's group since the default in /home/o2s is users.
I think its unlikely, but if we start getting odd permission denied errors like we did when we added new directories to our old CVS, we should make sure that the o2s group can write the directories and files in /home/o2s/svn/db. Typically, this would involve setting the umask in wrapper scripts around the svn commands a la
http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-6-sect-5 .