Once you're connected to your home directory on lenny, issue the command:
svnsetup cs3500This will create a repository called cs3500 in your home directory. Contrary to what I said in lecture, the repository needs to be at the top level of your home directory.
Next issue this command:
chmod 700 cs3500This will ensure that your directory is accessible only by you.
Finally, issue the two commands:
cd ~cs3500 java GetPasswordYou will be prompted for your 8-digit UID number, and it will respond with a grade password. Write this number down. You'll need it to access your online grade records, and you'll also need it in the next step.
The next step is to edit three configuration files. You can do this while logged into lenny if you know how to use a Linux text editor, or you can do it from a Windows computer and use Wordpad or the like. Your choice.
# password-db = passwdso that it reads
password-db = passwdand change the line that reads
# authz-db = authzso that it reads
authz-db = authz(In other words, uncomment them. But make sure that the edited line does not begin with a blank space.)
smith = monkeyThis is an unencrypted text file, and even though it is inside a protected directory, it is still vulnerable to misuse. For that reason, do not put any of your favorite passwords here! In particular, do not put your CADE password here!
The second line will be the SVN username and password that the course staff will use to access your assignments. That line should read
cs3500 = #########where ######### is your grading password from the previous step.
[/] * = cs3500 = r smith = rwwhere smith is the SVN login name that you put in the passwd file. This gives you write access to the repository, gives the course staff read access to the repository, and denies everyone else access to the repository.
Now let's create a new project. Pull down the File menu, select "New" and then select Project. Highlight Windows Forms Application. Choose a name, such as "lab1", for your project and type it into the Name box. Make sure that "Add to Subversion" is ticked. When you've done all this, click "OK" and a new project will be created.
In addition, you will be prompted for the Repository URL. Enter
svn://lenny.eng.utah.edu/home/login/cs3500where "login" is your CADE login name. After a few seconds, you will be prompted for your SVN login name and password. Once you've entered those, some details about your repository will be displayed.
Select the line that says "home/login/cs3500" and tick "Add trunk Folder for Project". Look at the box that says "Project will be created in:" and it should say
svn://lenny.eng.utah.edu/home/login/cs3500/lab1/trunkIf that's what it says, click "OK". A directory for your brand new project will be created on the remote repository.
Now pull down the File menu, choose Subversion, and choose "Pending Changes". The Pending Changes window should appear.
Now look around a bit at all the hooks there are into SVN. You've already seen the Subversion menu.
Look at the Solution Explorer window, and you'll see blue plus signs next to all the newly created files. This means that they exist in the local working copy but haven't been copied to the repository yet.
Right click some of those files, and notice that there's a Subversion context menu.
But most importantly, check out the Pending Changes window. As you make additions, deletions, and changes to your project, the affected files will be listed here. The two main operations that you'll need to do are to Commit local changes back to the server, and to Update your local working copy with the latest versions from the server.
Right now we need to commit all the changes, so click "Commit" in the Pending Changes window. All the changed files will be copied to the repository and the file names will disappear. In the Solution Explorer, the little plus signs will have turned into check marks.
Open up one of the C# classes and add a comment somewhere. Notice that the file is now marked as modified in the Solution Explorer, and that it is also listed in the Pending Changes window. Click Commit and that change will also be sent to the repository.
svn --username cs3500 --password ######### checkout svn://lenny.eng.utah.edu/home/login/cs3500/lab1/trunk lab1Here, ######### is your grading password and login is your CADE login name. If all goes well, a directory called lab1 will be created, and it will contain your project. If it doesn't work for you, it won't work for us, so make sure it works!
Change one of the C# files and commit the change. Now go to the original Visual Studio window and update the project. The change that you've just committed should appear.
You only to need to do "Open from Subversion" once per computer. Once you've done it, the working copy will remain behind. You can update this copy whenever necessary.