Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 21577

Summary: [CVS Watch/Edit] Readonly/Edit/Unedit Support
Product: [Eclipse Project] Platform Reporter: ObjectWiz <objectwiz>
Component: TeamAssignee: Michael Valenta <Michael.Valenta>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: crivet, eclipse, Kevin_McGuire, mhilpert, v.neubauer
Version: 2.0Keywords: helpwanted
Target Milestone: 2.1 M4   
Hardware: All   
OS: All   
Whiteboard:

Description ObjectWiz CLA 2002-07-15 03:37:11 EDT
The CVS component in Eclipse currently cannot support:

- readonly checkout
- cvs edit
- cvs unedit
- add/remove watches

This means that you cannot use the CVS notification mechanism. I would propose
that either:

- support for these features is added, e.g. CVSREAD variable can be set via CVS
Preference etc., or

- Eclipse can be configured to use an external CVS client resident on the
developers machine.

The latter is already used as an SSH policy for supporting SSH2. If someone were
to help me out on this, I would be happy to contribute to these changes.

--wiz
Comment 1 Michael Valenta CLA 2002-07-17 11:26:52 EDT
Using an external cvs client for edit/unedit support is not really an option 
since the edit/unedit mechanism is tightly coupled to other CVS commands such 
as update and commit. 

I have released initial support for "cvs edit" to HEAD for project 
org.eclipse.team.cvs.core. The functionality provided is very basic and 
integrated with the validateSave/validateEdit mechanism. What this means is 
that every time a file is opened by an editor or modified by a tool, the 
equivalent of a "cvs edit" is performed underneath the hood, so to speak. This 
will allow Eclipse to work with repositories that have configured projects with 
watches on (i.e. all files are checked out read-only).

Here's what's missing from CVS core.

1) The format of the notifications stored in the CVS/Notify file are probably 
not command line compatible. I couldn't find a spec for the file format.
2) There is no progress monitoring for the "cvs edit" invoked from the 
validateEdit or validateSave callbacks
3) Commit does not reset the file to read-only (this requirs step 4).
4) The base contents are not cached in the CVS/Base directory and the base 
revision is not cahced in the CVS/Baserev file.
5) As a result of 4, "cvs unedit is not supported.
6) The watch commands are not implemented.
7) The format of the timestamp in the notification sent to the server does not 
match the same format as the cvs command line client. The spec says it's just a 
text field but scripts on the server may expect a certain format.

In addition, the following should or could be provided by the CVS UI
1) Enable Watch/Edit support for all or some projects (right now it's on by 
default).
2) Access to Edit/Unedit through menu commands.
3) Mechanism to set temporary watches on an edit (could be a preference)
3) Ability to configure the Watch configuration of a project or resource
4) Preference to indicate that all or some projects should be checked out as 
read-only (equivalent to CVSREAD?).

I think that's it but I may have missed something. If you want to offer help on 
any of the above points that would be great. The Team Team would be happy to 
offer help as required. The best place to ask would be the platform-vcm-dev 
mailing list
Comment 2 Michael Valenta CLA 2002-08-13 09:08:49 EDT
*** Bug 252 has been marked as a duplicate of this bug. ***
Comment 3 Rolf Wilms CLA 2002-08-17 06:57:07 EDT
I think it would be useful to have these additional features:

a) Before performing an edit, query the current editors and if there is at 
least one, display these to the user, giving the user the option to cancel the 
edit operation. 

b) Add an 'autowatch' feature which will automatically create a watch when 
adding certain file types, in particular those that cannot be merged. 
Comment 4 Michael Valenta CLA 2002-09-09 15:57:57 EDT
*** Bug 13570 has been marked as a duplicate of this bug. ***
Comment 5 Michael Valenta CLA 2002-11-20 14:12:39 EST
*** Bug 25620 has been marked as a duplicate of this bug. ***
Comment 6 Michael Valenta CLA 2002-11-20 16:08:41 EST
Code has been released to HEAD that provides Edit/Unedit support that can be 
triggered using popu menu actions of files or by trying to edit a file in an 
editor. Any bugs or requests for addition functionality should be logged as 
separate bug reports.