Thursday, February 14, 2013

Homework 3

Homework 3 is up.  It's due on Feb. 22.

Teaching assistant lab hours

The teaching assistants are holding lab hours at the ITS lab at 14 Washington Place on the lower level every week at these times:

Monday: 10:00am–1:00pm and 2:30pm–7:00pm
Tuesday: 10:30am–6:00pm
Wednesday: 2:15pm–4:30pm
Thursday: 11:00am–7:30pm
Friday: 2:00pm–6:00pm (except Feb. 22)

Monday, February 11, 2013

"svn checkout" versus "svn update"


Some people are confused about the distinction between "svn checkout" and "svn update."

"svn checkout" creates a working copy based on data from the repository where no working copy previously existed.  You only need to run it once on any given computer.

"svn update" copies changes made by other people (like me) to the repository into your existing working copy.  Its main purpose for you in this class is to download changes that I make after you do the initial checkout, like new test scripts or marks from graded homework.

If you were working in a group, you'd use "svn update" to download changes to the project made by other group members.  You could do this even if you made changes that you hadn't committed.  Subversion is pretty good at merging changes made by multiple people in different parts of the same file, though occasionally you have to help it out.

Saturday, February 9, 2013

Final exam May 15 at 8am

The registrar posted the final exam schedule.  Ours will be 8:00–9:50am on Wednesday, May 15.

Wednesday, February 6, 2013

Homework 2 posted

Homework 2 is up.  It's due a week from Friday.  In addition to work to be turned in, it also contains some suggested readings and exercises.

Another Subversion server outage (Update: back up)

As of 10:39PM on Wednesday, subversive.cims.nyu.edu is not reachable.  You may see errors like "Unable to connect to repository."  Other servers at the Courant institute are also affected. I'm not sure how widespread the failures are.

Update: As of 10:09AM Thursday, it is back up.

Monday, February 4, 2013

Fixing a filename with the wrong case in Subversion


Java convention is that classes begin with an uppercase letter.  Suppose you create a file "foo.java" and want to rename it to "Foo.java".  If you look at the Subversion documentation, you might find the "svn move" command and try something like this:

$ svn move foo.java Foo.java
svn: E155007: Path '.../Foo.java' is not a directory

Huh?

The problem is that Mac OS X and Windows do not respect case differences in filenames, so it looks like you're asking to rename a file to its own name, which doesn't work.  (What that error message means, I have no idea.)

The solution is to rename it temporarily to something different, commit it, then rename it back to the properly cased name:

$ svn move foo.java TempFoo.java
A         TempFoo.java
D         foo.java
$ svn commit -m "temporary rename"
Adding         TempFoo.java
Deleting       foo.java

Committed revision 1145.
$ svn move TempFoo.java Foo.java
A         Foo.java
D         TempFoo.java
$ svn commit -m "rename back"
Adding         Foo.java
Deleting       TempFoo.java

Committed revision 1146.