Tuesday, October 2, 2007

14 CM Practice

Today's assignment is CM Practice, where we practice setting up a project on Google according to the class conventions.


All three tasks accomplished successfully.

Subversion Client

I already had the command-line client installed, so I decided to use that. One benefit is that I can just paste my command lines into this entry.

Improving Stack-Johnson

Every time I use svn with a new server, there are a few rough spots. No two servers are set up in quite the same way, and I always seem to want to use some feature of svn that I haven't needed in a while, like reading only the log message of the change I just committed. It took a little reading of the docs, but went fairly well:

$ svn --username brian.jaress checkout \
https://stack-johnson.googlecode.com/svn/trunk stack-johnson
$ cd stack-johnson
$ ant -f verify.build.xml

(At this point, I made my change.)

$ svn diff
Index: src/edu/hawaii/stack/EmptyStackException.java
===================================================================
--- src/edu/hawaii/stack/EmptyStackException.java       (revision 34)
+++ src/edu/hawaii/stack/EmptyStackException.java       (working copy)
@@ -1,7 +1,8 @@
package edu.hawaii.stack;

/**
- * EmptyStackException is thrown when an attempt is made to pop an empty stack.
+ * EmptyStackException is thrown when an attempt is made to pop an empty
+ * stack or check its top element.
 *
 * @author Philip M. Johnson
 */

$ ant -f verify.build.xml
$ svn commit

(Filled in the log message.)

$ svn update
$ svn log -r HEAD
------------------------------------------------------------------------
r35 | brian.jaress | 2007-10-02 09:19:18 -1000 (Tue, 02 Oct 2007) | 4 lines

Expanded EmptyStackException class comment to mention that it's thrown
when checking the top of an empty stack.

------------------------------------------------------------------------

Creating a New Project

This task was mostly about setting up a Google project in exactly the class-approved way. The biggest difficulty was that the instructions were in the form of a slide show full of screenshots that I couldn't really make out. I spent a lot of time squinting at pictures that were either tiny or blurry, depending on how much I zoomed in.

Once the Google side was all set up, I just had to bring the files in:

$ svn --username brian.jaress checkout \
https://webspider-jaress.googlecode.com/svn/trunk
$ cp -R webspider-jaress/* trunk
$ cd trunk
$ svn add *
$ ant -f verify.build.xml
$ svn commit

Then I checked my email and confirmed that I had gotten a message containing the change.

Lessons Learned

I learned a few quirks of Google Code and Google Groups and puzzled out our class conventions for how they should be used. I also discovered a few quirks of Subversion that I hadn't known about, like having to do an update before you can see your own commit in the log.

No comments: