Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322922 - Bad things happen when trying to synchronize while resources are out of sync
Summary: Bad things happen when trying to synchronize while resources are out of sync
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 0.9.0-M2   Edit
Assignee: Dariusz Luksza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 11:56 EDT by Chris Aniszczyk CLA
Modified: 2010-08-17 21:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2010-08-17 11:56:50 EDT
If you have resources that are "out of sync" in the workspace and then you go to synchronize, bad things happen. One thing we can do is ensure that resources are not out of sync or offer users the chance to refresh them before doing the sync.


eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/chrisaniszczyk/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/chrisaniszczyk/.eclipse_keyring -showlocation


Error
Tue Aug 17 10:50:16 CDT 2010
Resource is out of sync with the file system: '/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java'.

org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: '/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java'.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:699)
	at org.eclipse.core.internal.resources.File.getContents(File.java:293)
	at org.eclipse.core.internal.resources.File.getContents(File.java:282)
	at org.eclipse.egit.core.synchronize.GitResourceVariantComparator.getLocal(GitResourceVariantComparator.java:118)
	at org.eclipse.egit.core.synchronize.GitResourceVariantComparator.compare(GitResourceVariantComparator.java:55)
	at org.eclipse.team.core.synchronize.SyncInfo.calculateKind(SyncInfo.java:451)
	at org.eclipse.team.core.synchronize.SyncInfo.init(SyncInfo.java:389)
	at org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber.getSyncInfo(GitResourceVariantTreeSubscriber.java:110)
	at org.eclipse.team.core.variants.ResourceVariantTreeSubscriber.getSyncInfo(ResourceVariantTreeSubscriber.java:59)
	at org.eclipse.team.core.subscribers.Subscriber.getDiff(Subscriber.java:371)
	at org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler.handleChange(SubscriberDiffTreeEventHandler.java:162)
	at org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.collect(SubscriberEventHandler.java:219)
	at org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.processEvent(SubscriberEventHandler.java:310)
	at org.eclipse.team.internal.core.BackgroundEventHandler.processEvents(BackgroundEventHandler.java:369)
	at org.eclipse.team.internal.core.BackgroundEventHandler$1.run(BackgroundEventHandler.java:203)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Dariusz Luksza CLA 2010-08-17 19:07:09 EDT
Chris, could you check that patch:
http://egit.eclipse.org/r/1327
fix this issue?
Comment 2 Chris Aniszczyk CLA 2010-08-17 21:15:36 EDT
Fixed with ff9cd3ac74239740e518b894948074e68cc7f71b.