Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 83758 - Merge conflicts with Watch/Edit tuned on
Summary: Merge conflicts with Watch/Edit tuned on
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: CVS (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows 2000
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: platform-cvs-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-26 15:33 EST by Bruce CLA
Modified: 2006-06-19 14:25 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 Bruce CLA 2005-01-26 15:33:35 EST
Two developers check out a project at the same time. 

The first developer edits a file and commits changes in the morning. The second 
developer edits the same file and commits the changes in the afternoon. The 
second developer will have to merge his changes. There is no notification that 
there are updates on the server that are needed before editing the file. 

Synchronizing the files before editing avoids the problem most of the time.
Comment 1 Michael Valenta CLA 2005-01-26 15:40:28 EST

*** This bug has been marked as a duplicate of 35997 ***
Comment 2 Bruce CLA 2005-01-26 16:03:38 EST
Mike,

Thanks for the information on Bug 35997. We had noticed this error also. 
However, it is slightly different from bug 83758. 

In this case, the edits are sequential. The first developer has completed his 
edits before the second developer starts editing the file. There is a need to 
merge because the second editor was not notified the file had changed in CVS 
before the edit was started. 

In the case of 35997, the edits are parallel. 
Comment 3 Michael Valenta CLA 2005-01-26 16:15:57 EST
In that case, the only notification you get is a commit failure ("up-to-date 
check failed). This is the way CVS works.
Comment 4 Bruce CLA 2005-01-26 16:32:56 EST
You are correct. CVS should require the merge if the files are out of synch 
with CVS when they are committed. No problem there. 

At the START of the edit, the files should be synchronized. This can be done 
manually. But, I can't think of a case where you would want to start and edit 
with dirty files. The edit action should verify that you have the latest 
updates from CVS and warn you if you don't. 

Agree?

Comment 5 Michael Valenta CLA 2005-01-26 16:51:29 EST
The problem is that, as far as I know, CVS itself does not provide this so it 
would require custom handling on the client. This would required is a second 
connection when editing EVERY file even though, in most cases, it may not be 
needed. Seems like a high price to pay for me. 
Comment 6 Bruce CLA 2005-01-27 17:02:33 EST
To bad the CVS Edit command does not return more information such as version or 
timestamp for performance. 

Agreed. The file should not be checked if the file was just retrieved or if it 
has changed locally. The edit is not available if the file has changed. 

The check should always be done if the file is old. The client knows when the 
file was retrieved. How long do you wait before you check the file? The answer 
depends on how hard it is to merge and how often you have collisions. 

Merging is not an option when users edit the source files with a WYSIWYG and 
don't understand the artifact. When merging the file is NOT an option, users 
need an automatic check of the file. 

This is not critical because users can manually get the latest changes before 
editing. We could change this bug to an enhancement. 
Comment 7 Michael Valenta CLA 2005-01-28 09:04:32 EST
What would be the benefit of keeping this bug open as an enhancement? If you 
are planning or working on it yourself, then I would suggest that you do so 
and reopen the bug report with the patch attached when you are done. If you 
are hoping that someone else will see the bug report and decide to work on it, 
then I am afraid that the chances of that are very slim. There are already 
close to 1000 bug reports against Team/CVS! If you feel strongly about it, go 
ahead and reoped it as an enhancement and we'll add it to the pile.
Comment 8 Bruce CLA 2005-01-28 09:24:19 EST
Sounds like you need some help. I am sure there are more serious bugs that we 
have not encoutered yet. 

I am opening this as an enhancement. Hopefully, someone will get a change to 
work on it. It is not a high priority for us right now. 
Comment 9 Michael Valenta CLA 2006-06-19 14:25:02 EDT
A feature was added to perform an update before an Edit. You will need to enable this on the Watch/Edit preference page.