CSE 120: Principles of Computer Operating Systems

Summer Session I, 2009


Subversion


We will be using subversion for handing in projects, though hopefully you will find it otherwise useful. Here is an executive summary:

  • Everyone is automatically in a ACS group; you can find out which one by typing groups (on ieng6) and looking for something resembling cs120u_x.
  • Every ACS group has a repository located at /home/linux/ieng6/cs120u/cs120u1/groups/<group-name> (heretofore refered to by $SVNPATH with an initial commit (the nachos source) in $SVNPATH/trunk.
  • Although you have a group, we still need to know who is in which groups! So please email the instructor and Cc: the TA about this (fuyeda@cs, mtelgars@cs).
  • Furthermore, for whichever partner ends up having the 'designated repository' (ie please only submit once), only that person has initial write access to it. To be able to share your repository, email us so we can add the other member to the ACS group.
  • To hand in projects, you must create new branches:
    • $SVNPATH/submit-proj1m for project 1 milestone.
    • $SVNPATH/submit-proj1 for project 1.
    • $SVNPATH/submit-proj2m for project 2 milestone.
    • $SVNPATH/submit-proj2 for project 2.
    • $SVNPATH/submit-proj3m for project 3 milestone 'm'.
    • $SVNPATH/submit-proj3h for project 3 milestone 'h'.
    • $SVNPATH/submit-proj3 for project 3.
  • We will ignore files outside the directories threads, userprog, vm. Furthermore, all non-java files are ignored (this will seem more relevant in project 2). In general there is no need to create new files, though you may wish to do so.
  • Submit using exactly the branch names we specify, unless you like receiving zero points.

Walkthrough of subversion on something vaguely POSIXy


Ok, let's see if this works:
$ ls /home/linux/ieng6/cs120u/cs120u1/groups/g-matus
conf  dav  db  format  hooks  locks  README.txt
$ export SVNPATH=file:///home/linux/ieng6/cs120u/cs120u1/groups/g-matus
$ svn ls $SVNPATH
submit-proj1m/
$ svn co $SVNPATH/trunk
A    trunk/nachos
A    trunk/nachos/test
A    trunk/nachos/test/printf.c
A    trunk/nachos/test/cat.coff
A    trunk/nachos/test/cp.c
A    trunk/nachos/test/sh.coff
A    trunk/nachos/test/echo.coff
A    trunk/nachos/test/sh.c
A    trunk/nachos/test/start.s
A    trunk/nachos/test/mv.coff
A    trunk/nachos/test/echo.c
A    trunk/nachos/test/syscall.h
A    trunk/nachos/test/stdlib.c
A    trunk/nachos/test/va-mips.h
[..]
$ cd trunk
$ svn log
------------------------------------------------------------------------
r1 | cs120u1 | 2009-06-30 13:12:13 -0700 (Tue, 30 Jun 2009) | 1 line

initial import
Okay, let's edit some files. When done, sync with others and then commit.
$ svn update
$ svn commit -m "LOL"
$ svn update
$ svn log
------------------------------------------------------------------------
r2 | cs120uzz | 2009-06-30 15:11:49 -0700 (Tue, 30 Jun 2009) | 1 line

LOL
------------------------------------------------------------------------
r1 | cs120u1 | 2009-06-30 13:12:13 -0700 (Tue, 30 Jun 2009) | 1 line

initial import
------------------------------------------------------------------------
Looks great. Time to hand in!
$ svn copy $SVNPATH/trunk $SVNPATH/submit-proj1-matus-is-terrible -m "oops this is a typo"
$ svn delete $SVNPATH/submit-proj1-matus-is-terrible -m "j/k A++ pls"
$ svn copy $SVNPATH/trunk $SVNPATH/submit-proj1m -m "project 1 milestone submission"
$ svn ls $SVNPATH
submit-proj1m/
trunk/

Other Tips


  • Working on ieng6 can be painful, so one nice trick is to set SVNPATH=svn+ssh://<user-name>@ieng6/home/linux/ieng6/cs120u/cs120u1/groups/<group-name>. With this, you can operate remotely.
  • svn status, svn diff, svn cat, and svn ls are all very helpful in sanity-checking the contents of your repositories. When in doubt regarding the usage of some command, you can always type svn help <command>.
  • Here are some ieng6-specific instructions to have Eclipse talk to the remote subversion repository.