|
eclipse 2.0 cvs faq |
| Eclipse Team Component | |
|
Last Modified: June 5, 2002 |
|
| Table of contents: |
| Getting Started | top |
| Browsing the Repository | top |
When you are browsing in the CVS Repositories view, you may expect to see branch and version tags which you have previously created. In CVS, such tags are stored on individual files rather than on projects or folders. Rather than scan every file in the repository, Eclipse only scans one well-known file, .project, which should exist in every Eclipse project. It is possible that you have other interesting tags that do not appear on .project but which you would like to show up in the CVS Repositories view.
To make these tags appear, do the following:
| Server Setup | top |
Eclipse supports CVS version 1.11.1p1 or higher, running on a Linux or UNIX server. Eclipse does not officially support running CVSNT on a Windows server, but varied degrees of success have been achieved. In this case, CVSNT version 1.11.1.1 or higher must be used.
CVS for UNIX can be downloaded from http://www.cvshome.org. CVSNT can be downloaded from http://www.cvsnt.org.
The CVS manual can be browsed online at http://www.cvshome.org/docs/manual/. The CVS FAQ-O-Matic can be found at http://ccvs.cvshome.org/fom/fom.cgi.
We have reports that CVSNT 1.11.1.1 (and perhaps later versions) will not run on Windows 2000 unless Service Pack 2 or later is installed.
| Using SSH with CVS | top |
The pserver protocol sends passwords over the network in plaintext. Many people prefer to establish a secure connection using SSH. Eclipse supports two methods of connecting to CVS repositories using SSH.
To use the Eclipse's built-in SSH support, simply specify "extssh" as the connection method type when creating the repository connection.
To use SSH support from an external tool, you must:
C:\plink.exe" or "/usr/local/bin/ssh"). Also specify the name and location
of the CVS binary on the server. The default value is often correct.The extssh connection method uses a built-in SSH client. The ext connection method allows you to specify an external SSH client to use. For extssh to work, the server must be running an SSH server with SSH1 protocol compatibility. If extssh does not work, it is likely that the server is running only the SSH2 protocol. If this is the case, you must configure the ext connection method with an external SSH client.
The steps for setting up public-key authentication vary depending on your SSH client. However, they all follow this set of common steps:
/home/user/.ssh/authorized_keys.This often happens when using SourceForge projects for the first time, but may occur on other servers as well. You must manually log in to the server, using an interactive SSH session, in order to create your home directory for the first time. After this, you will be able to log in successfully.
Use your SSH client to connect to the server (e.g. cvs.sourceforge.net) and log in with your username and password. Your home directory will be created for you.
| Upgrading from Eclipse 1.0 | top |
Team support changed drastically between Eclipse 1.0 and 2.0. As such, the method of sharing projects with the repository changed as well. We have tried to make it relatively easy for you to migrate, however. You will notice that your previously shared projects only have "Share Project" in the Team menu. If you select that option, a wizard will guide you through the migration process. When you are finished, your project will be shared and the Synchronize view will open. You will see conflicting changes on every file - this is due to changes in the way sync information is stored between 1.0 and 2.0. Pull down the triangle menu in the Synchronize view and select "Compare File Contents". After some work, the Synchronize view will show you only the files which are actually different.
Any file checked into a CVS repository from Eclipse 1.0 was marked as binary. This means that end-of-line conversions will not occur on checkout, and some features of CVS (such as auto-mergeable conflicts) will not apply to these files. As such, it may be desirable to change some of these files from binary to text. To change the file types, do the following:
In an effort to move away from generic terminology that applies to all repository providers, and toward provider-specific terminologies and workflows, many terms, menu items and labels have changed in 2.0. Here is a brief list of some of the changes. For more detailed information, please see the Eclise CVS documentation.
| Eclipse 1.0 | Eclipse 2.0 | Comments |
| Stream | Branch | The CVS terminology "Branch" replaces "Stream" |
| Catchup | Update | "Update" refers to the standard CVS method of retrieving remote contents. For more details on Update, see the Eclipse CVS documentation. |
| Release | Commit | These terms are equivalent. |
| Add to Workspace | Check Out as Project | The CVS terminology "Check Out" replaces "Add to Workspace". |
| None | Tag | In CVS, a Tag refers to either a Branch Tag or a Version Tag. Branches and versions together are referred to as Tags. |
In Eclipse 1.0, meta-information about a project was stored in .vcm_meta. In Eclipse 2.0, this mechanism was made more general and the data was moved to the .project file. As such, the .vcm_meta file is now unneeded. The Eclipse CVS client will warn you of this state by placing a warning in the task list. If you still have people on your team who are using Eclipse 1.0 for development with your repository, then you should not delete the .vcm_meta file. If all members of your team are using Eclipse 2.0, then you can safely delete the .vcm_meta file and commit the deletion to the repository.
| Using Eclipse and CVS for Java Development | top |
Eclipse's Java development tools create and maintain a special file, .classpath, in the root of each Java project. This file contains information about the project's classpath, including references to other projects, external jars, and the project's own source path. If you are working on a team with other developers that use Eclipse, you probably want to commit this file to the repository so that others can benefit from correct classpath settings. If the other developers on your team do not use Eclipse, you may still want to commit the .classpath file so that your settings are persisted - this should not affect the users that are not using Eclipse.
If the name of the CVS module is part of the package name of Java files, you will encounter problems. For example, if the module you check out is called "test", and it contains a folder called "code" which contains Java files that claim to be in the package "test.code", Eclipse will not be able to compile these Java classes. The solution is to move the top-level package folder ("test" in this case) to be a subfolder of the CVS module. In this case, create a folder called "test" in the project "test", and move "code" into it. Then commit your changes.
Source folders must always begin beneath the project, not above it. See the Eclipse Java Development Tools documentation for more information on source folders.
| Compatibility Between CVS Command-line Client and Eclipse | top |
No. Eclipse implements a CVS client in Java that talks directly to the server using the documented CVS protocol. No external CVS client is required.
Eclipse stores CVS sync information in CVS/ folders in the same way as the command-line CVS client does. However, you rarely see these folders within Eclipse. They are marked using a Core facility called "team-private" which causes them to be hidden from view. If you open a (non-Eclipse) file explorer you will see that these directories and their contents appear on the file system.
Eclipse Team CVS stores its meta information in a format that is compatible with the command-line CVS client. Thus you should be able to use a CVS command line client on an Eclipse workspace. Please note that this support is experimental, and you may run into problems. However, we are very interested in making this work, so please report any bugs you find.
Whenever you use external tools to modify workspace files, you must perform a Refresh from within Eclipse to make the workspace aware of the changes.
You may encounter unexpected behaviour when using the command-line CVS client in conjunction with deleted folders. Eclipse's CVS support keeps track of deleted folders and their contents so that, on the next synchronization, the Synchronize view can properly report on the changes. This information is kept outside of the CVS meta folder structure. This is because in CVS you normally inform the repository of deletions prior to deleting them locally, which is a different workflow than we like to support in the Synchronization view. Thus it is recommended that you do not use the command-line CVS client while you have pending deletions to commit. In some circumstances it could cause the Synchronize view to display incorrect contents, although it should not cause any lost work.
| Working with Patches | top |
If you have modified a project that you checked out from CVS, you may want to send those changes to someone else. This often occurs when you do not have commit rights, but want to send the changes to someone who does. To create a patch file:
To apply a patch, such as one generated in the previous step, do the following:
| Miscellaneous | top |
The .project file is created and maintained by Eclipse. It stores meta-information about the project, such as which projects it references and what type of project it is. If other members of your team will be using Eclipse to check out this project from CVS, you almost certainly want to release the .project file to CVS. Even if other members of your team are not using Eclipse, you may still want to release the .project file so that the information is persisted for you.
In some circumstances, depending on permissions on the server, you may not be able to browse the repository in the CVS Repositories view. In this case, it may still be possible to check out the project you want.
The project in your workspace is now shared with the CVS repository, and contains the remote contents.