DOC PREVIEW
Berkeley COMPSCI 250 - Using SVN to Manage Source RTL

This preview shows page 1-2-3-4 out of 12 pages.

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

Unformatted text preview:

Using SVN to Manage Source RTLCS250 Tutorial 1 (Version 083010a)August 30, 2010Yunsup LeeIn this tutorial you w ill gain experience using the Subversion (SVN) to manage your source RTLand code. You will be using SVN to submit your lab assignments, but more imp ortantly SVN willmake it much easier for groups of students to work on the same project simultaneously. SVN keepstrack of the changes each user m akes to th e source RTL - this complete version history enablesusers to monitor what changes other users are making (each change includes log information), tagworking versions of the design (so that us er s can always revert back to a working version), andresolve conflicts (when two users change the same bit of RTL at the same time).SVN stores all version information in a central repository. Users cannot access the repositorydirectly, but must instead use a special set of SVN commands. Users begin by adding the initialversion of their source RTL to the repository. Users can then checkout the most current version ofthe source RT L into a private working directory. Local changes to the working directory are notstored in the repository until the user does a commit. Each commit includes a log message so thatother users can easily read what has changed. If multiple users are changing the source RTL atthe same time, then th e state of the repository might be different from when the user performedthe original checkout. At any time, a user can do an update wh ich brings the checked out workingdirectory in sync with the global repository. Sometimes an update will identify a conflict. A conflictindicates that two users h ave made changes to the same bit of of RTL. Users must resolve conflictsby hand - essentially they must ch oose whose changes should be permanent. Figure 1 illustratesthe relationship between the central repository and each user’s personal working directory.In this tutorial we will create a test directory and a test fi le, add them to the repository, make somechanges, commit these changes, and then emulate issues which arise when multiple users changethe same file at the same time.You can find more information in the SVN book (svn-book.pdf) located at the following website:http://svnbook.red-bean.com.add, commitadd, commitUser BWorkingDirectorycheckout, updateSVNCentralRepositoryUser AWorkingDirectorycheckout, updateFigure 1: Basic SVN model. Users checkout versions f rom the central repos-itory into private working directories.CS250 Tutorial 1 (Version 083010a), Fall 2010 2Getting startedYou can follow along through the tutorial yourself by typing in the commands marked with a ’%’symbol at the shell prompt. To cut and paste commands from this tutorial into your bash shell(and make sure bash ignores the ’%’ character) just use an alias to ”undefine” the ’%’ characterlike this:% alias %=""Before using the CS250 toolflow you must run the course setup script with the following command.The course setup script will set the SVNREPO to https://isvn.eecs.berkeley.edu/cs250. TheSVN commands use this environment variable to determine the location of the repository.% source ~cs250/tools/cs250.bashrcAdding Directories and Files to SVNIn th is section we will look at how to add d irectories and files to the repository. Figure 2 shows thetimeline of SVN commands involved in this section.All of your work will be in either you r student SVN directory or your group’s project S VN directory.For this tutorial we will be working in your student SVN directory. Th e very first step is to checkoutthis directory. All S VN commands are of the form svn <command>. For example, assuming yourusername is yunsup the following commands will checkout your student SVN directory.% mkdir tut1% cd tut1% TUTROOT=$PWD% svn checkout $SVNREPO/yunsupError validating server certificate for ’https://isvn.eecs.berkeley.edu:443’:- The certificate is not issued by a trusted authority. Use thefingerprint to validate the certificate manually!Certificate information:svn checkoutRepositoryUser AWorkingDirectorySVNfilessvn addsvn commitCreate new dirs/filesFigure 2: Timeline for ch eckout, add, and commit.CS250 Tutorial 1 (Version 083010a), Fall 2010 3- Hostname: isvn.EECS.Berkeley.EDU- Valid: from Thu, 15 Jan 2009 19:53:47 GMT until Sat, 15 Jan 2011 19:53:47 GMT- Issuer: Instructional Support Group, University of California Berkeley, ...- Fingerprint: 41:10:d6:7a:ad:4b:a5:20:02:09:f6:65:ad:4c:f5:37:f3:ef:03:30(R)eject, accept (t)emporarily or accept (p)ermanently? pWhenever you access the SVN repository for the firsttime, it will complain about the certificate.This is because the certificate on the server is not issued by a trusted auth ority. Go ahead andaccept the certificate perm an ently.The following commands first create a test directory and a typical SVN directory structure, testfile, and then add them to the SVN repository. The trunk directory is sup posed to be the maindevelopment line for the project. The branches directory is su pposed to be a place for branches.The tags dir ectory is used for cr eating tags.% cd $TUTROOT/yunsup% mkdir svntest% cd svntest% mkdir trunk branches tags% cd trunk% echo "Fred : 510-555-0123" > phone-list.txt% cd $TUTROOT/yunsup% svn add svntestAlthough the directory and file are added to the repository they are not actually in the repositoryuntil you commit them. Adding directories and files simply lets SVN know that you want theversioning system to track these files. You need to commit the directory and file before they arepermanently in the repository. You can use the following command to check the current status ofall files.% cd $TUTROOT/yunsup/svntest% svn statusThe status information s hould reflect that phone-list.txt has been locally added. Now you willcommit your new files to the repository.% cd $TUTROOT/yunsup% svn commit svntestThe svn commit command takes a list of files and directories as an argum ent. The svn commitcommand is recursive, so committing a d irectory will effectively commit all fi les (and subdirectories)within the directory. If you do not specify any files or directories, then SVN will commit the currentdirectory.After executing the svn commit command, you will be able to enter a log message using yourdefault text editor. You can chan ge the default text ed itor by setting the environment variableSVNEDITOR. You can add the environment variable to your d efault shell script so that the variableis set automatically in the future


View Full Document

Berkeley COMPSCI 250 - Using SVN to Manage Source RTL

Download Using SVN to Manage Source RTL
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 Using SVN to Manage Source RTL 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 Using SVN to Manage Source RTL 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?