Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,

Similar presentations


Presentation on theme: "Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,"— Presentation transcript:

1 Introduction to CVS 7/3/20151UMBC CMSC 341

2 Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout, Add, Commit, Update ◦ How to use CVS using Putty ◦ How to use CVS using Eclipse 7/3/2015UMBC CMSC 3412

3 What is Source Code Management SCM : Also known as revision or source control So, why should you use one? 7/3/2015UMBC CMSC 3413

4 What is CVS? Concurrent Versioning System (CVS) is one of the earlier SCM systems which gained wide adoption Advantages – Open source – Easy to install and use – Simple command line client – Wide integration in a lot of development tools 7/3/2015UMBC CMSC 3414

5 CVS for Project submission Terminology used ◦ Repository ◦ Server ◦ Client ◦ Working Directory Some of the options available to connect to the repository ◦ Command-line using Putty ◦ Through Eclipse IDE 7/3/20155UMBC CMSC 341

6 CVS Command The general form of CVS commands is: – All CVS commands start out with “cvs” – Commands may also have flags and/or arguments which modify their behavior For a more help… – General help: cvs --help – List of commands: cvs --help-commands 7/3/2015UMBC CMSC 3416 cvs [cvs-options] command [command-options-and-arguments]

7 Basic commands checkout : Pull resources from the repository and create a working copy add : place a resource under version control update : Pull down changes from the repository into your working copy commit: Check files into the repository 7/3/2015UMBC CMSC 3417

8 Command-line using Putty Steps to be followed ◦ Log in using Putty ◦ Edit the.cshrc file : Add alias javac usr/local/bin/javac 7/3/2015UMBC CMSC 3418

9 Command-line using Putty Step 1: cd  changes your working directory to home directory Step 2: cvs -d /afs/umbc.edu/users/r/b/rberge1/pub/cs341s10/Proj0 checkout -d MyProj0 your_username 7/3/20159UMBC CMSC 341

10 Command-line using Putty Step 3: cd MyProj0  Change to your project directory Step 4 : mkdir src Step 5: cd src Step 6: Create a java file called Proj0.java and type in a simple java code. Let the package name be ‘firstproject’. Save the file in the src folder. 7/3/2015UMBC CMSC 34110

11 Step 9: Edit build.xml 7/3/201511UMBC CMSC 341

12 Command-line using Putty Step 10: Compile the code using ant compile Step 11: Run the code using ant run 7/3/2015UMBC CMSC 34112

13 Command-line using Putty Step 12 : Add files to the repository: ◦ Step 12.1 cvs add build.xml ◦ Step 12.2 cvs add src/ ◦ Step 12.3 cd src ◦ Step 12.4 cvs add Proj0.java ◦ Step 12.5 cvs commit –m ‘some text’ 7/3/2015UMBC CMSC 34113

14 Command-line using Putty Step 13: Check if Proj0.java is added to the repository ◦ Go to src folder in MyProj0 ◦ Remove Proj0.java ◦ Run ‘cvs update’ ◦ You should get back Proj0.java from the repository 7/3/2015UMBC CMSC 34114

15 Eclipse Eclipse has a built-in perspective for CVS ◦ All of the developer downloads come with it pre-installed (The following directions are for the Eclipse Ganymede Eclipse IDE for Java Developer release)

16 Eclipse – CVS Perspective To open the CVS repository perspective select Window  Open Perspective  Other…

17 Eclipse – CVS Perspective Select CVS Repository Exploring

18 Eclipse – Adding a Repository To add a repository, right click on the CVS Repositories pane and select New  Repository Location…

19 Eclipse – Connection Settings Type in the parameters to connect to the remote repository For example… ◦ Host: linux.gl.umbc.edu ◦ Repository Path: /afs/umbc.edu/users/r/b/rberge1/pub/cs341s10/Proj0/ ◦ User: Your GL/myUMBC username ◦ Password: Your GL/myUMBC password ◦ Connection type: extssh Save the password if you wish

20 Eclipse – Connection Settings

21 Eclipse – Viewing Repositories You should now see the repository under the CVS Repositories Pane

22 Eclipse – Checking Out Expand the repository, expand HEAD, select your module (username) then right click and choose Check Out As…

23 Eclipse – Checking Out (continued) Be sure to use the New Project Wizard, click Finish…

24 Eclipse – Checking Out (continued) Select to check out the module as a Java Project

25 Eclipse – Checking Out (continued) Name the project and click Finish…

26 Eclipse – Checked Out Code Switch back to the Java Perspective and you will see the module checked out as a project ◦ Note the little orange cylinders – that indicates that it’s under version control

27 Eclipse – New Resources Just like with the command line, items that are not know to be under CVS control are marked with a “?” symbol –Such as the Eclipse generated src folder

28 Eclipse – Synchronizing To commit to or update from the repository, right click on the project and choose Team  Synchronize with Repository

29 Eclipse – Committing Resources Here we see an outgoing arrow indicating that this needs to be pushed to the repository ◦ Commits and updates can be performed by right clicking

30 Eclipse – Synchronized If all is in sync, you should see the “No Changes” dialog as shown below…

31 Thank you! 7/3/2015UMBC CMSC 34131


Download ppt "Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,"

Similar presentations


Ads by Google