| Eclipse CVS client Updated 28 Apr 2009 | Upper levels: - QuArK Information Base - 4. The Source Code - 4.1. The CVS repository at Sou...

4.1.1. Eclipse CVS client | [ Prev - Up - Next ]

This is Rowdy's guide to configuring Eclipse to access the QuArK CVS repository. This is at best a short introduction in Eclipse, but it should be enough to get you going, and teach you the basics of usage.

Index

- - Installation (28 Apr 2009)
- - Configuration (19 Apr 2008)
- - Downloading Files (27 Apr 2008)
- - Uploading Files (27 Apr 2008)
- - Comparing Files (19 Apr 2008)
- - Terminology (12 Sep 2008)

Installation | Rowdy / cdunde / DanielPharos - 28 Apr 2009 | [ Top ]

First, you will need to download and install the Java Runtime Environment (JRE) (http://www.java.com/) (currently Version 6 Update 5), since Eclipse needs this. The JRE basically installs itself, so no configuration instructions are really needed here. Then download and install Eclipse (http://www.eclipse.org/downloads/). You only need one file, the Eclipse Classic one. (Currently version 3.2.2, with the filename of eclipse-SDK-3.3.2-win32.zip (if you're running Windows 32 bit)). It is a zip file so you might need a utility like WinZip to unpack it (note: keep the directory structure!). The default and generally recommended directory to extract it to is c:\eclipse. For the rest of this article, we'll assume that's the Eclipse install directory.

Configuration | Rowdy / cdunde / DanielPharos - 19 Apr 2008 | [ Top ]

When you run Eclipse for the first time, it will prompt you for a repository location. This is where you want to keep your QuArK CVS files. The default c:\eclipse\workspace is fine. You might want to keep them in your 'My Documents'/'Documents and Settings'-folder if you prefer. Step 1) Set the Preferences: In the main menu of the program select Window > Preferences, expand the treeview to show Team > File Content, click the Add... button and add 'dfm', 'pas' and 'dpr' as ASCII files, add 'res' as Binary file (add it first as ASCII, the default, then select it and click the "Change" button). Finally, click the OK button to close the Preferences window. |
Step 2) Add a new CVS Repository: Switch to CVS Repository Exploring - By clicking the icon circled in red in the upper-right of Eclipse's window. (This is where you can change Perspective in Eclipse.) Now click the Add CVS Repository icon, circled in red in the next picture. |
Step 3) Set the Add CVS Repository: Fill out the form with the information settings shown. Host: quark.cvs.sourceforge.net Repository path: /cvsroot/quark User: your registered sourceforge user name Password: your registered password Connection type: extssh Use Default Port (selected) Validate Connection on Finish (checked) Save Password (checked) Then click the Finish button to complete your connection to sourceforge. Make sure Eclipse is allowed access through your firewall(s) (if any). |
Step 4) Viewing the sourceforge CVS files: After connecting, view the list of available modules by expanding the tree-view. The most current version files for QuArK are usually kept in the HEAD directory. |

Downloading Files | Rowdy / cdunde / DanielPharos - 27 Apr 2008 | [ Top ]

Downloading a Module: Each folder is known as a Module of the program. To download a module, right-click it and select Check Out. This will download all of the files in the selected module to the Workspace-directory. The modules required to build the QuArK program and support files are: infobase - used to build the help files. runtime - the program support files: addons, Python files, icons, images... etc. source - the files used to build the QuArK.exe file. You probably want to check out utils too, since that contains the files to create the installer. |
This dialog is displayed while the module is being checked out and can be set to Run in Background, so you can continue to work with Eclipse while the files are being downloaded. |
Now switch to the Resource view to see the module files you have downloaded to your computer by clicking the icon circled in red and selecting Resource. All items shown are actually the files in your Workspace-directory. |
The Resource View: Note that the ">" indicates that a file has been changed or added. You can right-click an item and select Refresh (or press F5) to refresh that resource item to see what files you have changed. |
To check if there are any new files on the CVS, switch to Team Synchronizing perspective, and hit the Synchronize CVS button, circled in red to the right. This process might take a while, but all the changed files will eventually show up in the tree-view. A grey arrow to the right with the file indicates outgoing changes, and a blue arrow to the left incoming changes. (A conflict (red double-arrow) is handled in the Upload-section.) If you want to check out updated files, select them, right-click, Update. All the changed files will now be downloaded into your Workspace-directory. (Note: You can also use Override and Update to overwrite local changes, and resolve conflicts this way. Be careful, as this will OVERWRITE local changes!) |

Uploading Files | Rowdy / cdunde / DanielPharos - 27 Apr 2008 | [ Top ]

Committing Files: Committing a file means that you are uploading it. To upload a (changed) file, right-click it, on the popup menu go to Team and then select Commit.... Note also the Synchronize with Repository option - this compares your local files with the files on the CVS server and shows you graphically the differences between them. Just to reiterate, before you commit anything using Eclipse, make sure you ALWAYS go to the resource perspective, right-click on the modules you are going to commit (you can hold down the Ctrl key on the keyboard and left-click to select multiple files/directories), and refresh them. Eclipse doesn't know that you have changed anything outside of Eclipse unless you tell it to refresh. Now switch to Team Synchronizing perspective. All changed files (marked with a ">" in the resource perspective) will be shown in the tree-view. A grey arrow to the right with the file indicates outgoing changes, and a blue arrow to the left incoming changes. Sometimes, you've changed a file but somebody else already updated another changed version. This will result in a Conflict, indicted with a red arrow going both ways. You'll first need to 'resolve' this conflict by manually importing the changed from the remote file into your own. After you've done that, refresh that file in the resource perspective, go back to the team synchronizing perspective and right-click it, and select Mark as Merged. This will tell Eclipse you really want to upload this file (note: this will OVERWRITE the remote file, so be careful you imported all changes correctly!). Now select all the outgoing files/directories you want to upload, right-click, Commit. A window will pop up. Write a short but descriptive comment for the changes you made, and press Finish to start the upload. |

Comparing Files | DanielPharos - 19 Apr 2008 | [ Top ]

When there is a conflict between files, you'll need to compare them and import changes from the remote files into your local files. You can compare them in Eclipse from the resource perspective (right-click the item and from the submenu select "Synchronize with Repository...") or in the team synchronizing perspective (right-click the item and select "Open In Compare Editor"). That will compare your files with those in the repository, and show you any changes you have made that are outgoing, changes other people have committed that are incoming, and any conflicts (where someone has committed a file that you have also modified). However, I suggest you do it differently. If you keep your work-copy of the files separated from the Eclipse-workspace (as in, you work in a copy of those files), you can first update your workspace-files and then use your favorite compare-program to import your new changes, and merge the files. Don't forget to check if the newly imported changes don't break yours! If you then refresh your workspace in Eclipse, there should be no conflict between files whatsoever, and you can upload your files.

Terminology | DanielPharos - 12 Sep 2008 | [ Top ]

Here's a small list of some of the terms used by CVS and in this description about Eclipse: Check out a file/directory - Downloading a file/directory from the CVS into your Workspace-directory. Committing a file/directory - Uploading a file/directory from your Workspace-directory to the CVS. Conflict - When there are changes made to the remote file, and conflicting changes in the local file. CVS - Concurrent Versions System. The system used to store the online files on SourceForge. Local file - A file in your Workspace-directory. Perspective - The current 'view' you're working in. Every perspective has its own functions, allowing you to do different things with the files. Remote file - A file located in the repository, on the CVS. Repository - The online site where the files are actually kept. Updating a file/directory - Downloading changes from the CVS into your Workspace-directory. Workspace - The directory in which Eclipse stores the local files.

Copyright (c) 2009, GNU General Public License by The QuArK (Quake Army Knife) Community - http://quark.sourceforge.net/ | [ Prev - Top - Next ]