Community
Participate
Working Groups
Befor I start, this is my environment: Windows 2000 PE, IBM WSAD 4.0.3 (Build 020301 based on Eclipse 1.0, org.eclipse.vcm.core.cvs 1.0.0), CVSNT 1.11.1.3 (Build 57h). I created a new stream and copied a project version into it. However, when trying to explore the stream's contents, I received a "CVS Communication Error". Since I originally though this might me a CVSNT bug (after all, I did not make the same experience on a non-CVSNT CVS server running on Linux), I opened a bug against CVSNT (bug #16). But, as it turned out, it is in fact an Eclipse bug. Here's why: Eclipse 1.0 assumes that a CVS client connection is opened until it closes it itself. As long as no error is returned, CVSNT keeps the connection to the client open. So far so good. But as soon as CVSNT returns an error to the client, it automatically closes the connection in order to protect itself (see CVSNT bug #16 for more details on this). And when Eclipse tries to send a second request over the same connection, a "CVS communication Error" is reported. Normally, this never happens. There is, however, one exception. Namely, when a "no such tag" is returned; as it happens after a project version has been copied into a new stream (aka a branch tag has been created) but the branch tag has not been added to the repository's "val-tags" file. Eclipse reacts to this scenario and send a send request without any tag info. But when CVSNT is involved, the second request fails. There is a relatively simple workaround for this problem: Eclipse would have to issue a cvs -l rtag -l -F -r STREAMTAG STREAMTAG PROJECT immediately after copying a project version to a newly created stream. The same command can be issued from the command line. A different fix, much better, is to modify the classes Context.java and CVSAdapter.java such that only the method "internalFetchMemberNames(IPath repositoryRelativePath, String tagName, final IProgressMonitor monitor)" invokes the method "internalFetchMemberNames(Client client, IPath repositoryRelativePath, String tagName, final IProgressMonitor monitor)". This way, it is made sure that a new connection is opened each time. - If I have not overseen anything, there are only places where the method "internalFetchMemberNames(Client client, IPath repositoryRelativePath, String tagName, final IProgressMonitor monitor)" is invoked (one in CVSAdapter.java, one in Context.java). --- Witold
This is indeed a CVSNT bug. Not only does CVSNT close the connection but it does not send an "error" response. However, you are right to say that we could compensate for this bug. However, as of 2.0, the CVS code base has changed so the code mentioned in this bug no longer applies. *** This bug has been marked as a duplicate of 14306 ***
Based on my experience (and tracking the communication between Eclipse and CVS), CVSNT returns an "error" string if an error occurs. It is just that it closes the connection to the client... --- Witold