Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
index e9a069630..fded6332b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
@@ -213,7 +213,7 @@ public abstract class Command {
try {
resources[i] = localRoot.getChild(arguments[i]);
} catch (CVSFileNotFoundException e) {
- // Done to allow non-managed resources to be used as arguments
+ // XXX Temporary fix to allow non-managed resources to be used as arguments
resources[i] = localRoot.getFile(arguments[i]);
}
}
@@ -484,7 +484,7 @@ public abstract class Command {
}
public void send(Session session) throws CVSException {
if (option.length() != 0) super.send(session);
- }
+ }
}
/**
* Option subtype for local options that vary from command to command.
@@ -516,13 +516,16 @@ public abstract class Command {
*/
public static LocalOption makeTagOption(CVSTag tag) {
int type = tag.getType();
- if (type == CVSTag.BRANCH || type == CVSTag.VERSION || type == CVSTag.HEAD) {
- return new LocalOption("-r", tag.getName());
- } else if (type == CVSTag.DATE) {
- return new LocalOption("-D", tag.getName());
- } else {
- // FIXME: can this ever happen??? throw an exception?
- return null;
+ switch (type) {
+ case CVSTag.BRANCH:
+ case CVSTag.VERSION:
+ return new LocalOption("-r", tag.getName());
+ case CVSTag.DATE:
+ return new LocalOption("-D", tag.getName());
+ default:
+ // tag must not be HEAD
+ throw new IllegalArgumentException("Sticky tag not " +
+ "valid for trunk (HEAD).");
}
}

Back to the top