Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-10-14 18:01:20 +0000
committerMichael Valenta2003-10-14 18:01:20 +0000
commit3fb136245db064efd70ffc91ad9be6bf94d607a6 (patch)
tree605c2d4f6b38025ebd721d820c7f8cbe9c9c71c4
parent714e2f372de0c79d9a0713c9335dded65ce93e4c (diff)
downloadeclipse.platform.team-3fb136245db064efd70ffc91ad9be6bf94d607a6.tar.gz
eclipse.platform.team-3fb136245db064efd70ffc91ad9be6bf94d607a6.tar.xz
eclipse.platform.team-3fb136245db064efd70ffc91ad9be6bf94d607a6.zip
44614: [CVS] Unable to commit, NPE, broken UI
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java11
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java3
2 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
index 4c5e9cd87..36840732d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
@@ -1540,5 +1540,16 @@ public class EclipseSynchronizer implements IFlushOperation {
if (rule != null) endBatching(rule, null);
}
}
+
+ /**
+ * React to a file that was just moved by the move/delete hook.
+ * @param file the file that was moved (at its new location)
+ */
+ public void fileMoved(IFile file) throws CVSException {
+ if (!isWithinActiveOperationScope(file)) {
+ sessionPropertyCache.purgeCache(file.getParent(), false /*don't flush children*/);
+ }
+
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
index fc697ae70..3d103b2f9 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
@@ -167,6 +167,7 @@ public class MoveDeleteHook implements IMoveDeleteHook {
EclipseSynchronizer.getInstance().prepareForMoveDelete(destination, Policy.subMonitorFor(monitor, 20));
}
tree.standardMoveFile(source, destination, updateFlags, Policy.subMonitorFor(monitor, 30));
+ EclipseSynchronizer.getInstance().fileMoved(destination);
}
} finally {
monitor.done();
@@ -265,7 +266,7 @@ public class MoveDeleteHook implements IMoveDeleteHook {
* @param file
* @return boolean
*/
- private boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor) {
+ /* private */ boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor) {
// Ensure that the file is "checked out" (i.e. not read-only
IFileModificationValidator validator = getFileModificationValidator(files);
if (validator instanceof ICVSFileModificationValidator) {

Back to the top