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

Bug 75574

Summary: Preference to Clean timestamps during a build or synchronize.
Product: [Eclipse Project] Platform Reporter: Daniel Schneller <daniel.schneller>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: AndrewBachmann, andy.w.freeman, gunnar, rlatta, sytze.van.koningsveld
Version: 3.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Daniel Schneller CLA 2004-10-04 11:15:09 EDT
When switching to the synchronize view for a project I very often see lots of
outgoing changes, even though the "Consider file contents" option is on. The
only change the files actually have is the date stamp (they are regenerated
automatically but do not have different contents).
This is very annoying, because if there are 100 files displayed but only 3
changed for real it can take some time finding them in the list. 
I have seen this in 3.0 and hoped it was fixed in 3.0.1 but it does not seem to be.
Comment 1 Michael Valenta CLA 2004-10-04 11:56:53 EDT
The "compare file content" option only applied to compares and merges. In the 
case you describe, you will want to use the Clean Timestamp menu command 
available in the context menu of the sync view, this will reset the timestamp 
for any files whose content match the content on the server.
Comment 2 Daniel Schneller CLA 2004-10-05 02:21:02 EDT
It would be nice though to have the option of making this the default behaviour.
Although it may increase the time necessary for the sync itself, I would prefer
the extra comfort of not having to select the menu myself each time.
Is there a chance of implementing a switch for this somewhere in the configuration?
Comment 3 Michael Valenta CLA 2004-10-05 08:56:00 EDT
Yes, it would be possible. I'm not sure if it would be best to do it after a 
build (since that's when the files are touched) or during a synchronize. 
Probably easier to do it on a sync. We could also save hitting the server if 
we allowed the user to specify one or more directories or files where the 
touching occurs and just keep the base cached somewhere locally.
Comment 4 Lukas Bradley CLA 2005-02-01 20:06:45 EST
I don't know if this should be related or not, but when selecting multiple files
in Eclipse 3.1M4, the "Clean Timestamps" option does not batch the action.  It
authenticates, cleans one file, resets, then repeats the action with the next file.
Comment 5 Daniel Schneller CLA 2005-02-02 02:49:51 EST
Same for me. Apart from the time penalty you get, the CVS server may lock you
out if pserver is used from inetd which believes the process to be faulting when
more than a certain number of connections per minute is reached.

However there are still occasions when the file compare (on double click) show
no differences whatsoever and the clean timestamps function did not and does not
remove them from the view.
Comment 6 Michael Valenta CLA 2005-02-02 09:13:38 EST
Re: comment 4 and 5: There is an existing bug for this (bug 63303)
Comment 7 Ross P. Davis CLA 2005-02-25 09:28:58 EST
(In reply to comment #3)

That would be awesome if there was an option I could check to tell Eclipse to 
automatically Clean Timestamps every time I sync. Any chance of adding this 
option?

> Yes, it would be possible. I'm not sure if it would be best to do it after a 
> build (since that's when the files are touched) or during a synchronize. 
> Probably easier to do it on a sync. We could also save hitting the server if 
> we allowed the user to specify one or more directories or files where the 
> touching occurs and just keep the base cached somewhere locally.

Comment 8 Michael Valenta CLA 2005-02-25 09:42:00 EST
The helpwanted tag means that there is no plan to address the issue but 
patches will be accepted.
Comment 9 Michael Valenta CLA 2005-04-20 19:20:45 EDT
*** Bug 92151 has been marked as a duplicate of this bug. ***
Comment 10 Michael Valenta CLA 2005-04-20 19:21:16 EDT
*** Bug 92159 has been marked as a duplicate of this bug. ***
Comment 11 rasto CLA 2005-08-18 07:55:44 EDT
Imagine this common and very often situation:

1. build your project with ANT (command line),i.e. new files are generated and 
consequently compiled
2. refresh project in Eclipse
3. try to build -> Then Eclipse:
   3.1 notices, that generated files have new timestamp
   3.2 copies all generated *.java to output folder (in my case more than 1000)
   3.3 compiles all these files

How to avoid this situation? To make a redundant and timely&memory expensive 
step - 'synchronise with repository' and there 'Clean Timestamp'? I would 
suggest to add this feature also  to Navigator context menu, and after that 
everything what you must do after ANT build is to 
1.refresh source folder
2.clean timestamps of this source folder
3.refresh output folder
4.build project (of course without redundant compiling)



Comment 12 Michael Valenta CLA 2005-08-18 09:29:34 EDT
Seems to me what you want is an ANT task that will clean the timestamps. There 
is already one for refreshing so your ant task would look something like this 
(if I understand you correctly):

- generate source
- refresh workspace
- clean timestamps
- build

In reality each of these tasks could be an ant task or a builder in Eclipse 
with build dependencies. I don't really have a feel for how difficult it would 
be to implement a Clean Timestamp ant task or a Clean Timestamp builder but it 
seems that either or both of those may be helpfull.
Comment 13 Michael Valenta CLA 2005-09-06 15:35:06 EDT
*** Bug 108690 has been marked as a duplicate of this bug. ***
Comment 14 rasto CLA 2005-09-12 05:16:57 EDT
I guess, have found some compromise solution.

1.clean *.class files in ant
2.generate source files with ant
3.refresh Eclipse and build project, thus the source codes are compiled only in 
Eclipse. So I had to customize my ant process, instead of Eclipse.

Handicap is, that it lasts in Eclipse a bit longer, but I can live with that
Comment 15 Michael Valenta CLA 2006-06-19 14:32:12 EDT
Synchronize now doies a clean timestamps.
Comment 16 Andrew Bachmann CLA 2006-06-20 16:05:03 EDT
(In reply to comment #15)
> Synchronize now doies a clean timestamps.
> 

Thank you!
Comment 17 rasto CLA 2006-06-21 04:19:00 EDT
In which version/build has been this solved?
Tahnks
Comment 18 rasto CLA 2006-06-21 04:21:10 EDT
In which version/build has been this solved?
Thanks
Comment 19 Michael Valenta CLA 2006-06-21 08:00:37 EDT
This was fixed in 3.2.
Comment 20 Sytze van Koningsveld CLA 2006-09-26 08:16:01 EDT
In Eclipse 3.2, I am seeing conflicting java files in the Synchronize View, having no conflicts in content. Since the Clean Timestamps action has been removed, the conflicts stay in my view; even after performing a new Synchronize action and waiting a while. 

This leaves a cluttered Synchronize View and forces the user to perform "Update and Override" on each individual conflicting file with no content conflicts in order to be able to commit. The Clean Timestamps from Eclipse 3.1 used to be helpful here, and could be executed on a project, cleaning all timestamps in it in one go. I think there is something broke in the auto-clean-timestamps feature for Eclipse. 3.2. Is this a known bug or is it related to a setting in the preferences ?
Comment 21 Michael Valenta CLA 2006-09-26 14:44:16 EDT
Clean Timestamps (and the synchronize in 3.2) only worked for outgoing changes. If you have a conflict, that means that a remote change has also occured and, by coincidence, matches the local contents. In such a case, you will need to perform an update to handle the conflict.
Comment 22 Sytze van Koningsveld CLA 2006-09-27 08:50:21 EDT
As an example scenario for reproduction of the problem i have with auto-clean-timestamps, delete a file and then re-add it again from local history; this will end up as an outgoing change with no change in content. In Eclipse 3.1, the Clean Timestamps successfully removed this file from the Synchronize View as outgoing change.

The major difference between the Update and Clean Timestamps for me, is that the last action is not destructive and can be run easily on a project folder; with Update I would be more cautious and inspect file by file.
Comment 23 Michael Valenta CLA 2006-09-27 15:06:47 EDT
For the scenario you describe, a Synchronize in 3.2 will do the same thing that Clean Timestamp does (i.e. Synchronize now just doea a clean timestamp).