Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-01-10 14:23:28 -0500
committerMichael Valenta2003-01-10 14:23:28 -0500
commit1ea27f151593bec334fc964e34ecd0dbed33fe1a (patch)
tree6f3c18d3878ae04814ee623606ebfc512591cf1c
parent34909918582726df65a7d8faefdfab470298c971 (diff)
downloadeclipse.platform.team-1ea27f151593bec334fc964e34ecd0dbed33fe1a.tar.gz
eclipse.platform.team-1ea27f151593bec334fc964e34ecd0dbed33fe1a.tar.xz
eclipse.platform.team-1ea27f151593bec334fc964e34ecd0dbed33fe1a.zip
29250: Setting resource sync info on phantom folder causes build
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
index f55184571..982eca4e7 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java
@@ -265,12 +265,31 @@ import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
getWorkspaceSynchronizer().flushSyncInfo(RESOURCE_SYNC_KEY, resource, IResource.DEPTH_ZERO);
}
} else {
- getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, resource, syncBytes);
+ // ensure that the sync info is not already set to the same thing.
+ // We do this to avoid causing a resource delta when the sync info is
+ // initially loaded (i.e. the synchronizer has it and so does the Entries file
+ byte[] oldBytes = getCachedSyncBytes(resource);
+ if (oldBytes == null || !equals(syncBytes, oldBytes))
+ getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, resource, syncBytes);
}
} catch (CoreException e) {
throw CVSException.wrapException(e);
}
}
+
+ /**
+ * Method equals.
+ * @param syncBytes
+ * @param oldBytes
+ * @return boolean
+ */
+ private boolean equals(byte[] syncBytes, byte[] oldBytes) {
+ if (syncBytes.length != oldBytes.length) return false;
+ for (int i = 0; i < oldBytes.length; i++) {
+ if (oldBytes[i] != syncBytes[i]) return false;
+ }
+ return true;
+ }
/**
* @see org.eclipse.team.internal.ccvs.core.resources.LowLevelSyncInfoCache#getDirtyIndicator(org.eclipse.core.resources.IResource)

Back to the top