Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » invalid CVS conflicts(CVS/Entries file containing restored+ is referenced by eclipse CVS code)
invalid CVS conflicts [message #1705876] Wed, 19 August 2015 17:43 Go to next message
Steve Glasgow is currently offline Steve GlasgowFriend
Messages: 10
Registered: January 2014
Junior Member
Something strange happens from time to time. I haven't found a reproducible pattern to it.

All of our access is through the CVS command line.

Sometimes CVS indicates conflicts in files when 1) none of those files have changed locally, 2) some of those files may have been changed/added in the repository, and 3) there are no <<<<< >>>>> markers in the files after the cvs update command.

Solution, so far, is to delete those files locally and do another cvs update. This pulls down the latest copy from the repository again.

Why am I posting this to an Eclipse group? Because the CVS community hasn't replied to me yet and it seems that the Eclipse code refers to what I'm seeing...

Looking into the Entries file WRT the files that have conflicts, I see lines like the following:

.
.
.
/<filename1.java>/1.8/Thu Apr 9 19:04:33 2015//
/<filename2.java>/1.2/restored+Tue Aug 11 15:41:44 2015//
/<filename3.java>/1.2/Thu May 15 16:55:18 2014//
.
.
.

The abnormality is <filename2.java>, which is one of the files showing a conflict (that isn't actually a conflict). That file has NOT been modified in the sandbox, and is new to the repository, and has "restored+" attached to the time stamp.

This seems to happen only to .java files. We are using Eclipse for development. as I said before, we have NOT set up eclipse to access CVS in any way (all defaults are in place).

A google search for "cvs" and "restored+" turns up several links about this. One of which is:

http://code.openhub.net/file?fid=_IBCr2Z1aMkZnSdH-DyInojKUJ4&cid=g0mpTskWtaI&s=&fp=5905&mp&projSelected=true#L0

You will see a line that says the following:

protected static final String TIMESTAMP_DELETED_AND_RESTORED = "restored+"; //$NON-NLS-1$

Clicking on TIMESTAMP_DELETED_AND_RESTORED shows where this variable is used.

I think eclipse is just checking for the restored+ string and adjusting their internal variables appropriately.

I think that CVS is putting the restored+ in the Entries file but don't know how or why. Does anybody know how I can stop this from happening? Could anyone shed a little light on what restored+ is for?

It's possible eclipse is doing it, but I don't see that in the code.

Does anyone know of why this situation might be occurring?

Thank you in advance,
Steve
Re: invalid CVS conflicts [message #1705961 is a reply to message #1705876] Thu, 20 August 2015 12:44 Go to previous messageGo to next message
Steve Glasgow is currently offline Steve GlasgowFriend
Messages: 10
Registered: January 2014
Junior Member
I'm beginning to think that Eclipse is placing the "restored+" in the CVS/Entries files. I know it has access to the CVS/Entries files because it reads them and places the correct CVS version number next to each source file in the package explorer. If it can read them, it can write to them.

If CVS was causing the problem, why would removing the file and doing a CVS update to restore the file from the CVS repository not cause the same problem? When you do this, CVS removes the restored+ from the Entries file. The problem seems to be in the Eclipse class, ResourceSyncInfo.java.

How can I stop Eclipse from touching my CVS/Entries files all-together? I don't want it reading or writing anything, except source files.

I've had a lot of views to this thread, but no replies. Should I be posting this to another, more appropriate forum? Someone out there ought to be familiar with the Eclipse code and the ResourceSyncInfo.java file.

Thanks,
Steve

Re: invalid CVS conflicts [message #1705969 is a reply to message #1705961] Thu, 20 August 2015 13:44 Go to previous messageGo to next message
Steve Glasgow is currently offline Steve GlasgowFriend
Messages: 10
Registered: January 2014
Junior Member
I have found the problem and I think it is a disconnect between CVS usage in Eclipse and those of us that prefer to access CVS from the command line. This is an Eclipse problem. If it is a bug, please tell me where I submit bug reports for Eclipse.

After a new .java file is added to the CVS repository, and someone else does a cvs update, pulling in that file to their CVS sandbox, the Entries file is normal.

Then if that person opens up Eclipse and refreshes their project to bring the new files into the project, Eclipse rewrites the Entries file, placing "restored+" in front of the time stamp for those new files.

Any subsequent cvs updates will show conflicts in those files. If you remove the "restored+" from the time stamp, CVS will no longer complain about conflicts and Eclipse no longer changes the Entries files.

Not sure why Eclipse is doing this, but I expect that if I was accessing the CVS repository from within Eclipse, it would know how to deal with the "restored+" information. But, we use CVS on the command line which seems to have conflicts with what Eclipse is doing.

Again, 1) how can I stop Eclipse from touching the Entries files? If I can't, please shed some light on why Eclipse is doing this. 2) If this is a bug, please tell me where to go to report it.

Thank you,
Steve


Re: invalid CVS conflicts [message #1706059 is a reply to message #1705969] Fri, 21 August 2015 13:10 Go to previous messageGo to next message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
Re #2, I don't know if it is a bug, however I believe bugs can be reported at https://bugs.eclipse.org/bugs/ or clicking "MORE" at the top right corner of the page and then "Report a Bug".

Regardless, you might want to add to this post some info about your dev env, particularly your Eclipse version. F.ex. I'm using Eclipse Mars and - unlike older versions I previously used - in this one I see absolutely nothing CVS-related (no CVS entry anywhere in Window / Preferences nor in Window / Show View / Other) so I imagine that Mars is not doing anything with CVS unless you tell it to (f.ex. by installing a plugin), and for the same reason I assume you are using one of those older Eclipse versions, in which case it's possible that switching to Mars will make a difference for you if you really don't need to touch CVS from Eclipse.
If instead you are already using Mars or another version that has no CVS built-in support either, then it probably means that you have installed some CVS plugin, in which case you should mention which one.
Re: invalid CVS conflicts [message #1706074 is a reply to message #1706059] Fri, 21 August 2015 16:55 Go to previous messageGo to next message
momo momo is currently offline momo momoFriend
Messages: 1
Registered: August 2015
Junior Member
i don't think that it is abug
Re: invalid CVS conflicts [message #1706176 is a reply to message #1705876] Mon, 24 August 2015 12:49 Go to previous messageGo to next message
Steve Glasgow is currently offline Steve GlasgowFriend
Messages: 10
Registered: January 2014
Junior Member
Here is what I think is happening...since I have received no information from anyone actually coding the CVS portion of Eclipse...

When you add files to your project that are located in a CVS sandbox (i.e., they have a CVS directory containing the usual CVS files such as Entries), Eclipse recognizes this and activates CVS version control. It does not access the CVS server, but it does read the Entries files. I know this to be the case because each file in the package explorer is listed next to it's CVS revision number.

When a new file is added to the CVS repository, and a user updates his CVS sandbox (command line update), then refreshes his Eclipse project...Eclipse REWRITES the Entries file, placing "restored+" in front of the time stamp for that new file. For this reason, I believe it is, if not a bug, a design flaw. I've spoken to members of the CVS community and they believe the files in the CVS directory to be "private". i.e., NOT to be used by other applications such as eclipse. Eclipse should not be writing information to these files.

I have found the Disconnect option under Team, and have stopped Eclipse from writing to these files, but this should NOT have been a default setting.

Thank you,
Steve

[Updated on: Mon, 24 August 2015 12:50]

Report message to a moderator

Re: invalid CVS conflicts [message #1706179 is a reply to message #1706176] Mon, 24 August 2015 13:02 Go to previous message
Davide Vecchi is currently offline Davide VecchiFriend
Messages: 35
Registered: July 2009
Member
Great that you solved your problem. I would still like to know what Eclipse version you are using.
Previous Topic:Package not showing up inside of parent package.
Next Topic:Run Eclipse Win on Mac
Goto Forum:
  


Current Time: Thu Apr 25 20:54:15 GMT 2024

Powered by FUDForum. Page generated in 0.07972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top