Please sit next to your partner. If you don’t have a partner, please find one now

Embed Size (px)

Citation preview

  • Slide 1

Please sit next to your partner. If you dont have a partner, please find one now. Slide 2 CS 282 Slide 3 Questions from last time? Anything you would like to know about the assignment? Notes You should do all your drawing inside DrawGLScene The completed framework is online for Mac OSX, Linux, and Windows (once OpenGL is installed in ECC). In order to compile the framework, you must download OpenGL (XCode, apt-get, website). Slide 4 SVN is a versioning control software. Slide 5 A repository of files with monitored access to keep track of who and what changes were made to files Version tracking Collaboration and sharing files Historical information Retrieve past versions Manage branches Slide 6 Slide 7 Lets create a repository now. First, have two terminal sessions up. The first terminal will be used to access your ECC account (i.e. what you used to log onto the lab computer). Everything accessed here is considered to be on your local machine This is where your local copy is The second terminal will be used to access your CSE account (i.e. a DIFFERENT account completely separate from your ECC account). Everything accessed here is considered as being remotely accessed on a completely different computer than the ECC computer) This is where your repository is Slide 8 CSE 1) Log into the CSE server in terminal ssh [email protected]@cse.unr.edu CSE 2) Create a repository directory in CSE ~/repositories/ CSE 3) Type in svnadmin create tutorial in the repositories directory This will create a folder in repositories called tutorial Slide 9 ECC 1) Create a directory you would like to add repository files to. Lets name it myproject ECC 2) Add the following folders in myproject trunk branches tags ECC 3) Now type in the following from one directory up from myproject svn import myproject svn+ssh://[email protected]/cs/username/reposit ories/tutorial NOTE: this is all one command, and should all be typed onto a single line of the terminal before hitting enter Replace username with your CSE username Slide 10 Those directories you just created are now in your repository Use the import command on your first revision. ECC 4) Now delete the local directory (myproject) on the ECC side. rm fr myproject ECC 5) Now lets get the revision stored in the repository. svn checkout svn+ssh://[email protected]/cs/username/repositories/tuto rial NOTE: this is all one command, and should all be typed onto a single line of the terminal before hitting enter Replace username with your CSE username Congratulations! You have just successfully created and downloaded your first svn repository! Slide 11 Slide 12 First, switch drivers! ECC 6) Go into tutorial/trunk/ and create a file in it For example, main.cpp ECC 7) Commit this to your repository svn commit m [insert meaningful message here] ECC 8) Now, use and test the following commands Use these commands by typing: svn CommandNameHere add Use this when you want to add a file to your repository. Create a main.h and add it to the repository (dont commit it yet). Slide 13 delete Use this when you want to remove a file from the repository Remove main.cpp (dont commit yet). status Use this to check what youve changed so far. ? You havent added this file yet NOTE: This is fine. You dont ALWAYS have to add files that are denoted with a ?. NEVER ADD YOUR BINARIES (EXECUTABLES). A Youve added this file. M Youve made changes to this file. Slide 14 diff Check out the exact lines of code youve added or removed. + means youve added this line, - means youve removed this line. update Allows you to update to the newest revision. Have your partner svn checkout (co) the repository on their computer. Commit the changes youve been making. Have your partner svn update. Call me when you have completed this step. Slide 15 add add files to your local repository status check which files youve changed, which files havent been added yet diff see whats different between the revision youre running and the changes youve made delete remove files from your local repository commit commit your changes to the online repository update update your local repository with the latest version Slide 16 Slide 17 Partner A and Partner B both work on the same file, test1.cpp. Partner A commits his changes to the repository. Partner B finishes a little later, and tries to commit. Uh oh! Partner B has encountered a conflict. SVN will then prompt you with a variety of options to handle this conflict Slide 18 In order to resolve conflicts, there are a few things you can do Tell SVN to ignore your changes Tell SVN to ignore your partners changes Manually remove whatever is conflicting, and recommit. The best way, of course, is to not have a conflict in the first place. Be sure to google SVN, and take a look at the documentary if youre having trouble resolving conflicts. Slide 19 Slide 20 TortoiseSVN (For Windows): http://tortoisesvn.tigris.org/ http://tortoisesvn.tigris.org/ RabbitVCS (For Linux): http://www.rabbitvcs.org/ http://www.rabbitvcs.org/