Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-04 10:31:15 -0500
committerMichael Valenta2002-04-04 10:31:15 -0500
commitcf92e3f22cf1ce863ba5ece393ac4843fb6314d8 (patch)
treee9212ab8c46af446c769f62079a0877385d15f6d
parentc867fe6c8f6afbbd45e69ec83a5ae23ea923a16c (diff)
downloadeclipse.platform.team-cf92e3f22cf1ce863ba5ece393ac4843fb6314d8.tar.gz
eclipse.platform.team-cf92e3f22cf1ce863ba5ece393ac4843fb6314d8.tar.xz
eclipse.platform.team-cf92e3f22cf1ce863ba5ece393ac4843fb6314d8.zip
Fixes to exists testing
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index aed7a842e..84242245c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -164,17 +164,20 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
final IProgressMonitor progress = Policy.monitorFor(monitor);
// Create the listener for remote files and folders
- final boolean[] exists = new boolean[] {false};
+ final boolean[] exists = new boolean[] {true};
IUpdateMessageListener listener = new IUpdateMessageListener() {
public void directoryInformation(IPath path, boolean newDirectory) {
exists[0] = true;
}
public void directoryDoesNotExist(IPath path) {
+ exists[0] = false;
}
public void fileInformation(int type, String filename) {
- exists[0] = true;
+ // We can't set exists true here as we may get a conflict on a deleted file.
+ // i.e. remote files are always communicated to the server as modified.
}
public void fileDoesNotExist(String filename) {
+ exists[0] = false;
}
};
@@ -201,14 +204,18 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
}
if (status.getCode() == CVSStatus.SERVER_ERROR) {
CVSServerException e = new CVSServerException(status);
- if ( ! e.isNoTagException() || ! child.isContainer())
- if (e.containsErrors())
+ if ( ! e.isNoTagException() || ! child.isContainer()) {
+ if (e.containsErrors()) {
throw e;
+ }
+ }
// we now know that this is an exception caused by a cvs bug.
// if the folder has no files in it (just subfolders) cvs does not respond with the subfolders...
// workaround: retry the request with no tag to get the directory names (if any)
Policy.checkCanceled(progress);
- return exists(child, null, progress);
+ if (e.isNoTagException()) {
+ return exists(child, null, progress);
+ }
}
return exists[0];
}

Back to the top