Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-02-25 17:25:32 -0500
committerMichael Valenta2002-02-25 17:25:32 -0500
commit6b7718b35fe5506a51c3283365e19a0e504076d4 (patch)
tree3b966cd727c6f4149636dade512d0a9c6078347e
parentb08d28ec65252d61ba4f9127866ff25e88fe022c (diff)
downloadeclipse.platform.team-6b7718b35fe5506a51c3283365e19a0e504076d4.tar.gz
eclipse.platform.team-6b7718b35fe5506a51c3283365e19a0e504076d4.tar.xz
eclipse.platform.team-6b7718b35fe5506a51c3283365e19a0e504076d4.zip
Added optional fetching of absent directories
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java34
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java6
2 files changed, 30 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
index 9d5b81572..7c1d05b3c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
@@ -38,6 +38,8 @@ public class CVSProviderPlugin extends Plugin {
public static final String DEFAULT_CVS_SERVER = "cvs"; //$NON-NLS-1$
// determines if empty directories received from the server should be pruned.
public static final boolean DEFAULT_PRUNE = true;
+ // determines if new directories should be discovered during update.
+ public static final boolean DEFAULT_FETCH = true;
// communication timeout with the server
public static final int DEFAULT_TIMEOUT = 60;
@@ -49,6 +51,7 @@ public class CVSProviderPlugin extends Plugin {
private QuietOption quietness;
private int communicationsTimeout = DEFAULT_TIMEOUT;
private boolean pruneEmptyDirectories = DEFAULT_PRUNE;
+ private boolean fetchAbsentDirectories = DEFAULT_FETCH;
private String cvsRshCommand = DEFAULT_CVS_RSH;
private String cvsServer = DEFAULT_CVS_SERVER;
@@ -117,19 +120,19 @@ public class CVSProviderPlugin extends Plugin {
}
/**
+ * Get the communications timeout value in seconds
+ */
+ public int getTimeout() {
+ return communicationsTimeout;
+ }
+
+ /**
* Set the timeout value for communications to a value in seconds.
* The value must be greater than or equal 0. If is it 0, there is no timeout.
*/
public void setTimeout(int timeout) {
this.communicationsTimeout = Math.max(0, timeout);
}
-
- /**
- * Get the communications timeout value in seconds
- */
- public int getTimeout() {
- return communicationsTimeout;
- }
/**
* Set the quietness option to use with cvs commands.
@@ -251,5 +254,22 @@ public class CVSProviderPlugin extends Plugin {
public void setCvsServer(String cvsServer) {
this.cvsServer = cvsServer;
}
+
+ /**
+ * Gets the etchAbsentDirectories.
+ * @return Returns a boolean
+ */
+ public boolean getFetchAbsentDirectories() {
+ return fetchAbsentDirectories;
+ }
+
+ /**
+ * Sets the etchAbsentDirectories.
+ * @param etchAbsentDirectories The etchAbsentDirectories to set
+ */
+ public void setFetchAbsentDirectories(boolean fetchAbsentDirectories) {
+ this.fetchAbsentDirectories = fetchAbsentDirectories;
+ }
+
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
index 0f20c88bb..9b874367c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
@@ -98,13 +98,13 @@ public class Update extends Command {
protected LocalOption[] getDefaultLocalOptions(GlobalOption[] globalOptions, LocalOption[] localOptions) {
List newOptions = new ArrayList(5);
- // Always look for absent directories for now
- if(!RETRIEVE_ABSENT_DIRECTORIES.isElementOf(localOptions)) {
+ // Look for absent directories if enabled and the option is not already included
+ if (CVSProviderPlugin.getPlugin().getFetchAbsentDirectories() && ! RETRIEVE_ABSENT_DIRECTORIES.isElementOf(localOptions)) {
newOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
}
// Prune empty directories if pruning is enabled and the command in not being run in non-update mode
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories() && !PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions)) {
+ if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories() && ! PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions)) {
if(!Command.DO_NOT_CHANGE.isElementOf(globalOptions)) {
newOptions.add(Update.PRUNE_EMPTY_DIRECTORIES);
}

Back to the top