Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 23439 - Browsing newly created stream fails
Summary: Browsing newly created stream fails
Status: RESOLVED DUPLICATE of bug 14306
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-VCM-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-11 18:15 EDT by Missing name Mising name CLA
Modified: 2002-09-13 07:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name Mising name CLA 2002-09-11 18:15:55 EDT
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
Comment 1 Michael Valenta CLA 2002-09-12 07:05:24 EDT
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 ***
Comment 2 Missing name Mising name CLA 2002-09-13 07:22:53 EDT
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