DOC PREVIEW
Berkeley COMPSCI 161 - Subversion access

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Subversion accessCS 161Fall 2006EditsThursday, 10/5: Fixed path, replacing cs161-fa06 with cs161/fa06.1 SetupEach project group has a group account that exists only to host the group’ssubversion repository. The account is named cs161-gN, where N is the groupnumber. We’ll use group 0 as a running example; wherever you see 0 as a groupnumber below, replace it with you group’s number (one-digit groups are justone character, without a leading zero).The repository’s base is in a subdirectory of the group’s home directorycalled SVN. The full path to the repository is/home/cc/cs161/fa06/group/cs161-g0/SVN/Don’t forget to replace the zero with your group’s number. (See section Section 3for more on repository URLs.)2 Subversion basicsYou should be familiar with the concept of version control; if not, please askyour partners or come to your TA’s office hours to get up to sp eed. The basicidea is that there is a central repository that keeps the current copy of all files,as well as a full history of changes, and each person working on the project willcheck out a local copy of the repository. Changes made locally can be checkedin to the main repository, and then others will see those changes when theyupdate their local copy.There is an excellent manual documenting subversion that you can find here:http://svnbook.red-bean.com/. Note that the instructional machines haveversion 1.2 installed, so you’ll probably want to look at that version of themanual.Subversion, or svn, is a cvs replacement that very nearly duplicates cvs’sfunctionality but adds some nice features. Like cvs, it does not require you to1lock a file before editing it, but instead merges different changes when two (ormore) people change the same file at the same time.The basic commands are almost identical to those of cvs. (See Section 3 forwhat to use as <url>.) You can get usage and options with the command svnhelp <command>.Checkout svn checkout <url>, or svn co <url>, will check out a copy ofthe directory specified by <url> into the current directory.Import svn import <url> will put the current directory (and all directo-ries/files recursively) into the repository at <url>. This directory shouldnot already exist in the repository. Two things to note: first, this com-mand does commit to the repository (unlike svn add, which requires acommit afterwards), and second, the svn makes no changes to the currentdirectory (such as adding repository metadata), so you will need to checkout the repository in a new location before working on the files.Update svn update, or svn up, will bring your local copy up-to-date withthe most recent version of the rep ository, recursively from the currentdirectory. Local changes are preserved, and files are merged if necessary.(There may be a conflict, which will have to be resolved by hand.)Status svn stat is a nice feature of svn that cvs does not have: it will tell youwhat you have changed locally without updating from the repository.Add svn add <file> will add a file or directory (plus files/directories recur-sively) to the repository.Commit svn commit will upload your local changes to the repository. Otherswon’t see your changes until you commit. Note that you’ll usually haveto do an update first to make sure you’re up to date.Diff svn diff <file> will show you the changes you’ve made to <file> sinceupdating it.For more details, use svn help or see the manual referenced above. You’llwant to look up the procedure for resolving conflicts, as you’ll probably have todeal with that at some point.3 Repository accessEach group member should send their public key to your TA, as describ edin the project 1 handout. Once you do that, you should have access to therepository using that key. (If you wish to access the repository from anothercomputer/account as well, send another key to your TA for that account; besure to tell your TA what machine/account it’s for.)You will not have shell access; the only access you have to the group accountis the subversion-over-ssh protocol. The svn commands should all work perfectly2if you form the URL correctly. The correct form for group 0’s base repositoryis:svn+ssh://[email protected]/home/cc/cs161/fa06/group/cs161-g0/SVN/The first field after the protocol is <groupname>@<host>; you can use pulsaror quasar or any other host if you prefer. This is followed by the repository’sdirectory, which is the same for all groups except for the group account’s name,which will have a different number for each group. I’ll use abbreviations cory forcory.eecs.berkeley.edu and <path> for home/cc/cs161/fa06/group/cs161-g0below so the URLs here are more readable.When you create directories in your repository, they will be appended to theend of the path. One directory has been created for you:svn+ssh://cs161-g0@cory/<path>/SVN/projectYou may put your code, design doc, etc. under this directory (or you may ignoreit if you wish and use another naming scheme under the base URL).There are two ways to get your code initially into the repository. First, youcan use svn import. To do this, cd to the top directory of your code tree (forexample, the ’project1’ directory you get from untarring the skeleton code) andtype:svn import svn+ssh://cs161-g0@cory/<path>/SVN/project/code(Of course, replace cory, <path>, and the group number with the correct val-ues.) This will check in the current directory (and subdirectories recursively)at the location project/code under the base repository. The current directoryis not modified to be a local copy of the repository, so you’ll have to then goelsewhere and check out a local copy withsvn co svn+ssh://cs161-g0@cory/<path>/SVN/projectNow there will be a directory called project in the directory where you ranthis command, which is a local copy of your repository that you can work on.The second way is to first check out the project directory, then copy yourcode directory into it and do an svn add. For example,svn co svn+ssh://cs161-g0@cory/<path>/SVN/projectcd projectcp -r ~/wherever-I-untarred/project1 codesvn add codeIn this case, the code directory is added to the local copy of the repository, soyou don’t have to checkout again.This should give you enough to get started. Please look through the docu-mentation for more information, or contact your TA if you have


View Full Document

Berkeley COMPSCI 161 - Subversion access

Documents in this Course
Rootkits

Rootkits

11 pages

Load more
Download Subversion access
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Subversion access and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Subversion access 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?