- not tested, no VSS to test against
- incomplete, only supports -U and -R switches
- change to MSVSSConstants

Kev
Index: MSVSSConstants.java
===================================================================
RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSConstants.java,v
retrieving revision 1.7
diff -u -r1.7 MSVSSConstants.java
--- MSVSSConstants.java	9 Mar 2004 16:48:40 -0000	1.7
+++ MSVSSConstants.java	22 Dec 2004 11:46:36 -0000
@@ -42,6 +42,8 @@
     String COMMAND_HISTORY = "History";
     /**  The 'Create' command  */
     String COMMAND_CREATE = "Create";
+    /** The 'Status' command */
+    String COMMAND_STATUS = "Status";
 
     /**  The brief style flag  */
     String STYLE_BRIEF = "brief";
Index: MSVSSSTATUS.java
===================================================================
RCS file: MSVSSSTATUS.java
diff -N MSVSSSTATUS.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MSVSSSTATUS.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,72 @@
+/*
+ * Copyright  2000-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.tools.ant.taskdefs.optional.vss;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Perform Status commands from Microsoft Visual SourceSafe.
+ *
+ * @ant.task name="vssstatus" category="scm"
+ */
+public class MSVSSSTATUS extends MSVSS {
+
+	/**
+     * Builds a command line to execute ss.
+     * @return The constructed commandline.
+     */
+	Commandline buildCmdLine() {
+		Commandline commandLine = new Commandline();
+		
+		// build the command line from what we got the format is
+        // ss Status [VSS items] [-H] [-I-] [-N] [-O] [-P[project]] [-R] [-U[username]] [-Y] [-?]
+        // as specified in the SS.EXE help
+        commandLine.setExecutable(getSSCommand());
+        commandLine.createArgument().setValue(COMMAND_STATUS);
+		
+        if (getVsspath() == null) {
+            throw new BuildException("vsspath attribute must be set!", getLocation());
+        }
+        commandLine.createArgument().setValue(getVsspath());
+        //XXX still loads of options to add including [VSS items]
+        //this is just a first pass  - I can't test here - no VSS
+        //-U
+        commandLine.createArgument().setValue(getUser());
+        //-R
+        commandLine.createArgument().setValue(getRecursive());
+        return commandLine;
+	}
+	
+	/**
+     * Set the option to recurse through all the project files
+     * @param   recursive to recurse through project
+     */
+    public void setRecursiveStatus(final boolean recursive) {
+    	super.setInternalRecursive(recursive);
+    }
+	
+    /**
+     * Set the option to check file status by user
+     * @param User The user to check.
+     */
+    public void setUser(final String user) {
+    	super.setInternalUser(user);
+    }
+	
+
+}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to