Community
Participate
Working Groups
3.6 Files lost from CVS in the workspace when replacing a project with a nonexistent version and the project had outgoing changes. - check out tag R3_6 of - org.eclipse.ui.editors and - org.eclipse.jdt.junit.runtime from :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse - on org.eclipse.jdt.junit.runtime, open "Properties > Java Compiler > Building > Build path problems", and set the last option to Warning (confirm rebuild) => 2 files in org.eclipse.jdt.junit.runtime/.settings have outgoing changes (good) - select both projects - context menu > Replace With > Another Branch or Version... - confirm "Overwrite Uncommitted Changes" - replace with branch "R3_6_maintenance" (which is not available for org.eclipse.jdt.junit.runtime) => No changes visible in the workspace any more. But when you synchronize the whole workspace, you get incoming additions for the 2 prefs files. This bug hit me in a maintenance build input where I accidentally released org.eclipse.jdt.junit.runtime with a new tag, although the plug-in has not been branched at all (but the Release... wizard detected the project as changed).
Created attachment 177433 [details] Proposed Fix This patch modifies the ReplaceOperation so that it doesn't delete files from projects that won't be replaced in the end because the tag doesn't exist.
Thanks for the patch Markus. It looks correct. Committed to HEAD. Available in builds >= N20100826-2000.
Argh! That patch is no good: it breaks 'Override and Update'.
Reverted the fix in HEAD. Since the ReplaceOperation is used in multiple paths it's probably best (and most performant) to fix it in ReplaceWithSelectableTagAction or its super class by excluding the resources which don't have the selected tag.
> it's probably best (and most performant) to fix it in > ReplaceWithSelectableTagAction or its super class by excluding the resources > which don't have the selected tag. This would also allow us to defer the warning that files will be overwritten to the point where we know which projects get replaced. I'll try to take a look during 3.7 but not now.
>This would also allow us to defer the warning that files will be overwritten to >the point where we know which projects get replaced. I've not done that as this would mean bigger changes.
Created attachment 178017 [details] Fix
Verified original scenario and comment 3 in I20100914-0100.
Verified for 3.7M2 on Linux with I20100914-0100.