bodewig 00/07/17 02:00:05
Modified: docs index.html
src/main/org/apache/tools/ant/taskdefs/optional/vss
MSVSS.java MSVSSGET.java
Log:
Added ssdir attribute to vssget.
Submitted by: Andrew Everitt <[EMAIL PROTECTED]>
Revision Changes Path
1.49 +13 -7 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- index.html 2000/07/14 12:09:09 1.48
+++ index.html 2000/07/17 08:59:59 1.49
@@ -3704,42 +3704,48 @@
<td>login</td>
<td>username,password</td>
<td>No</td>
+ </tr>
<tr>
- <tr>
<td>vsspath</td>
<td>SourceSafe path</td>
<td>Yes</td>
- <tr>
+ </tr>
<tr>
<td>localpath</td>
<td>Override the working directory and get to the specified path</td>
<td>No</td>
+ </tr>
<tr>
- <tr>
<td>writable</td>
<td>true or false</td>
<td>No</td>
- <tr>
+ </tr>
<tr>
<td>recursive</td>
<td>true or false</td>
<td>No</td>
+ </tr>
<tr>
- <tr>
<td>version</td>
<td>a version number to get</td>
<td>No</td>
- <tr>
+ </tr>
<tr>
<td>date</td>
<td>a date stamp to get at</td>
<td>No</td>
+ </tr>
<tr>
- <tr>
<td>label</td>
<td>a label to get for</td>
<td>No</td>
+ </tr>
<tr>
+ <td>ssdir</td>
+ <td>directory where <code>ss.exe</code> resides. By default the
+ task expects it to be in the PATH.</td>
+ <td>No</td>
+ </tr>
</table>
<p>Note that only one of version, date or label should be specified</p>
<h3>Examples</h3>
1.2 +26 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
Index: MSVSS.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MSVSS.java 2000/07/14 12:09:11 1.1
+++ MSVSS.java 2000/07/17 09:00:03 1.2
@@ -63,8 +63,8 @@
* A base class for creating tasks for executing commands on Visual
SourceSafe.
* <p>
* The class extends the 'exec' task as it operates by executing the ss.exe
program
- * supplied with SourceSafe. You will need to have ss.exe in your PATH to
use this
- * task.
+ * supplied with SourceSafe. By default the task expects ss.exe to be in the
path,
+ * you can override this be specifying the ssdir attribute.
* </p>
* <p>
* This class provides set and get methods for 'login' and 'vsspath'
attributes. It
@@ -76,10 +76,33 @@
*/
public abstract class MSVSS extends Exec {
+ private String m_SSDir = "";
private String m_vssLogin = null;
private String m_vssPath = null;
/**
+ * Set the directory where ss.exe is located
+ *
+ * @param dir the directory containing ss.exe
+ */
+ public final void setSsdir(String dir) {
+ m_SSDir = project.translatePath(dir);
+ }
+
+ /**
+ * Builds and returns the command string to execute ss.exe
+ */
+ public final String getSSCommand() {
+ String toReturn = m_SSDir;
+ if ( !toReturn.equals("") && !toReturn.endsWith("\\") ) {
+ toReturn += "\\";
+ }
+ toReturn += SS_EXE;
+
+ return toReturn;
+ }
+
+ /**
* Set the login to use when accessing vss.
* <p>
* Should be formatted as username,password
@@ -128,7 +151,7 @@
/**
* Constant for the thing to execute
*/
- public static final String SS_EXE = "ss";
+ private static final String SS_EXE = "ss";
/** */
public static final String PROJECT_PREFIX = "$";
1.2 +1 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java
Index: MSVSSGET.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MSVSSGET.java 2000/07/14 12:09:12 1.1
+++ MSVSSGET.java 2000/07/17 09:00:04 1.2
@@ -144,7 +144,7 @@
// build the command line from what we got the format is
// ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y]
[-?]
// as specified in the SS.EXE help
- commandLine.append(SS_EXE).append(' ').append(COMMAND_GET);
+ commandLine.append(getSSCommand()).append(' ').append(COMMAND_GET);
// VSS items
commandLine.append(getVsspath());