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

Bug 19704

Summary: Team/Commit after refactor leaves both old and new files in repository
Product: [Eclipse Project] Platform Reporter: Bob Foster <bob>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Michael.Valenta
Version: 2.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
.log file none

Description Bob Foster CLA 2002-06-08 06:20:32 EDT
I created two new packages and in the packages view dragged several files from
existing packages to the new ones, oking the dialogs. Then I Refactor/Renamed a
file. Then I did a Team/Commit on the project. The operation seemed to complete
normally and the client side files and CVS entry files are ok. But the
repository contains both the old and new files. After the commit, Eclipse
couldn't synchronize with the repository. It reported uninformative "error in
file" messages for each original refactored file (both in dialog and .log).

To work around this, I had to manually delete the files from the repository! Not
every user will have this option. This makes Refactor pretty painful to use in
Team projects.
Comment 1 Michael Valenta CLA 2002-06-08 07:48:03 EDT
What build of Eclipse are you using? We had a bug related to this in F1 but it 
was fixed in F2. If there is a problem in F2, please attach the contents of the 
log.

Also, NEVER delete files directly from the server. This will erase the history 
of that file. CVS does not support the deletion of folders so Eclipse has to do 
some fancy footwork to handle them (hence the bug). In such a situation, the 
best approach would be to checkout the project again, delete the files directly 
and then commit the changes back to the repository.
Comment 2 Bob Foster CLA 2002-06-08 08:50:54 EDT
F2, Win2K.

Please try to repro this before responding.

1) In batch, add a new repository entry, trial and a user.
2) Start Eclipse, New/Repository Location trial.
3) Create a new java project, trial.
4) New/class FirstClass and SecondClass.
5) Team/Share Project... in the trial repository
6) Exit and restart eclipse.
7) New/Package foo.
8) In the Packages view, drag FirstClass to foo.
9) Select SecondClass, Refactor/Rename SecondClass to RenamedSecondClass
10) Team/Commit.
11) Exit.
12) In batch, login to trial repository. cvs ls -R shows me that both refactored
files are in the Attic and nowhere else.
13) Open eclipse. Refresh trial repository. No files!
Comment 3 Michael Valenta CLA 2002-06-08 13:04:03 EDT
I'm not sure what you mean by "in batch" (do you mean "using the command line 
client"?) but I tried the second scenario using Eclipse only and got the 
expected behavior. The expected behavior is that new files will not be 
committed until they have been added to CVS control using the "Team/Add to 
Version Control" menu command. After adding the files they should commit OK 
(they did for me).

I'm more concerned about the first scenario where the deletions did not occur. 
I was unable to reproduce this.  Could you please attach the log file? Also, 
did you check the project out using the command line client and then bring it 
into Eclipse after?
Comment 4 Bob Foster CLA 2002-06-08 19:31:16 EDT
Created attachment 1327 [details]
.log file
Comment 5 Bob Foster CLA 2002-06-08 19:47:35 EDT
>I'm not sure what you mean by "in batch"
CVS for NT/Configure server - add a repository. Cmd line - add a password.

>I tried the second scenario using Eclipse only and got the 
>expected behavior.
How do you add a repository using Eclipse only?

>The expected behavior is that new files will not be 
>committed until they have been added to CVS control using the "Team/Add
>to Version Control" menu command. After adding the files they should
> commit OK (they did for me).
Huh? When you commit without first adding, the dialog asks if you want to add
and does it. The files were certainly added before step 6. I checked the server.

>I'm more concerned about the first scenario where the deletions did not occur.
Do you want me to file a new bug report? I'm just as concerned when there are
too few files in the repository as when there are too many.

>I was unable to reproduce this.
With respect, I can't tell that you tried. ;-} It appears you just did something
else that worked.

>Could you please attach the log file?
Done. Log covers entire period of first and second scenarios.

>did you check the project out using the command line client and then bring
>it into Eclipse after?
No. In the first scenario, I imported the existing project (not under source
control) into Eclipse then added it to the repository and committed it in
Eclipse. I confirmed that it worked by closing the project then checking out a
second copy of the project in Eclipse. Built and ran ok. Deleted the second
project. The next day I re-opened the first project, made my refactoring changes
and got into trouble.
Comment 6 Kevin McGuire CLA 2002-06-09 11:30:51 EDT
Note: server version is CVSNT (unsupported)
Comment 7 Kevin McGuire CLA 2002-06-09 11:32:19 EDT
*** Bug 19724 has been marked as a duplicate of this bug. ***
Comment 8 Kevin McGuire CLA 2002-06-09 11:59:36 EDT
(Note: 19734 marked as a dupe appears to have more concise steps).

I've tried the steps mentioned in the newsgroup post with no problems.  I am 
testing against CVSNT 1.11.1.1 (not the same server version but close), and a 
slightly more recent build than F2 but with no changes that I know of in areas 
that could affect this.

I was also able to delete the project and retrieve it without problem.

From the logs (attached to 19724) it looks like you are able to commit but not 
retrieve.  Please ensure all permissions and rights are correct.  Please report 
results of verifying that the exact same steps work against CVS command line 
but fail for us.

>>I was unable to reproduce this.
>With respect, I can't tell that you tried. ;-} 

Bob, if Mike said he tried, he tried, and I am sure exactly as you described. 
We are extremely busy right now trying to get the 2.0 release out, and despite 
CVSNT not being supported, have now both spent considerable time trying to help 
you.

Marking later since bug is reported against CVNT which is unsupported and we 
are almost out of time for 2.0.  If new evidence appears to suggest either same 
bug happens on cvs 1.11.1p1 or higher, or a proposed fix is brought forward, 
will consider reopening for 2.0.
Comment 9 Bob Foster CLA 2002-06-10 03:22:56 EDT
This was entirely my problem. I had two versions of cvs installed. One was being
used as client, the other as server. It's a wonder anything worked. I fixed that
and re-tested with both 1.11.1.1 and 1.11.1.3. Both work fine.

Sorry to waste your time & perhaps ruffle your feathers. I know all about
deadlines - I'm facing one myself. Thanks!
Comment 10 Kevin McGuire CLA 2002-06-10 14:18:46 EDT
Thanks for the update Bob, and the comments.  Closing bug report.
Comment 11 Denis Roy CLA 2009-08-30 02:21:25 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.