SVN Usage in CS601

Root of your repository:

$ svn mkdir -m 'add dir'
$ svn mkdir -m 'add dir'
$ svn ls
$ svn log
r2 | parrt | 2007-08-27 10:24:41 -0700 (Mon, 27 Aug 2007) | 1 line

add dir
r1 | parrt | 2007-08-27 10:24:21 -0700 (Mon, 27 Aug 2007) | 2 lines

add dir

Now check out main cs601 dir to place under revision control.

$ cd ~ # move home
$ svn co # makes a cs601 dir in current dir

601 projects

Make project directories (these must be exactly like this!)

$ cd ~/cs601
$ mkdir dictionary
$ mkdir -p dictionary/trunk/src
$ mkdir -p dictionary/trunk/lib
$ mkdir -p dictionary/branches
$ mkdir -p expr/trunk/src
$ mkdir -p expr/trunk/lib
$ mkdir -p expr/branches
$ mkdir -p http/trunk/src
$ mkdir -p http/trunk/lib
$ mkdir -p http/branches
$ svn add *
A         dictionary/branches
A         dictionary/trunk
A         dictionary/trunk/lib
A         dictionary/trunk/src
A         expr
A         expr/branches
A         expr/trunk
A         expr/trunk/lib
A         expr/trunk/src
A         http
A         http/branches
A         http/trunk
A         http/trunk/lib
A         http/trunk/src

Start on dictionary project

$ cd ~/cs601/dictionary/trunk/src
$ mkdir dict # make dict package
$ cd dict

Cut/paste from project description into dict dir.

$ cat >
package dict;                                                                 

public interface Dictionary {
  /** Add an object to the dictionary.  Do not allow null to be added.
      map() may be called with the same key multiple times; you do not
      have to collate these values in a list and associate with a single
      key.  Just keep adding key/value pairs to the appropriate buckets.
      Add objects to any linked lists at the end of the list to preserve
      order of addition.
  public void map(String key, Object value);

  /** Delete the first object you find associated with key from
   *  dictionary and return it.  Return null if not found.
  public Object delete(String key);

  /** Return the first object you find associated with key from
   *  dictionary; return null if not found.
   public Object find(String key);

  /** Return a string of the key/value pairs in the dictionary.
      The string should look EXACTLY like this for both implementations:

        [key1:value1, ..., keyN:valueN]

      If there are multiple values with the same key, list the key
      multiple times.
      The element separator is ", " (comma space) and there NO newline
      character as I will print that myself during testing.  I will be
      automatically testing your projects!
   public String toString();

Add to repository:

$ svn add ../dict
A         ../dict
A         ../dict/

Commit changes:

$ svn commit
Adding         dictionary
Adding         dictionary/branches
Adding         dictionary/trunk
Adding         dictionary/trunk/lib
Adding         dictionary/trunk/src
Adding         dictionary/trunk/src/dict
Adding         dictionary/trunk/src/dict/
Adding         expr
Adding         expr/branches
Adding         expr/trunk
Adding         expr/trunk/lib
Adding         expr/trunk/src
Adding         http
Adding         http/branches
Adding         http/trunk
Adding         http/trunk/lib
Adding         http/trunk/src
Transmitting file data .
Committed revision 3.