Browse Source

Added ssdir attribute to vssget.

Submitted by:	Andrew Everitt <Andrew.Everitt@gbr.xerox.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267792 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
d0ca327d77
3 changed files with 40 additions and 11 deletions
  1. +13
    -7
      docs/index.html
  2. +26
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java

+ 13
- 7
docs/index.html View File

@@ -3704,42 +3704,48 @@ The following attributes are interpretted:
<td>login</td> <td>login</td>
<td>username,password</td> <td>username,password</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>vsspath</td> <td>vsspath</td>
<td>SourceSafe path</td> <td>SourceSafe path</td>
<td>Yes</td> <td>Yes</td>
<tr>
</tr>
<tr> <tr>
<td>localpath</td> <td>localpath</td>
<td>Override the working directory and get to the specified path</td> <td>Override the working directory and get to the specified path</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>writable</td> <td>writable</td>
<td>true or false</td> <td>true or false</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>recursive</td> <td>recursive</td>
<td>true or false</td> <td>true or false</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>version</td> <td>version</td>
<td>a version number to get</td> <td>a version number to get</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>date</td> <td>date</td>
<td>a date stamp to get at</td> <td>a date stamp to get at</td>
<td>No</td> <td>No</td>
<tr>
</tr>
<tr> <tr>
<td>label</td> <td>label</td>
<td>a label to get for</td> <td>a label to get for</td>
<td>No</td> <td>No</td>
</tr>
<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> </table>
<p>Note that only one of version, date or label should be specified</p> <p>Note that only one of version, date or label should be specified</p>
<h3>Examples</h3> <h3>Examples</h3>


+ 26
- 3
src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java View File

@@ -63,8 +63,8 @@ import java.io.File;
* A base class for creating tasks for executing commands on Visual SourceSafe. * A base class for creating tasks for executing commands on Visual SourceSafe.
* <p> * <p>
* The class extends the 'exec' task as it operates by executing the ss.exe program * 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>
* <p> * <p>
* This class provides set and get methods for 'login' and 'vsspath' attributes. It * This class provides set and get methods for 'login' and 'vsspath' attributes. It
@@ -76,9 +76,32 @@ import java.io.File;
*/ */
public abstract class MSVSS extends Exec { public abstract class MSVSS extends Exec {


private String m_SSDir = "";
private String m_vssLogin = null; private String m_vssLogin = null;
private String m_vssPath = 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. * Set the login to use when accessing vss.
* <p> * <p>
@@ -128,7 +151,7 @@ public abstract class MSVSS extends Exec {
/** /**
* Constant for the thing to execute * 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 = "$"; public static final String PROJECT_PREFIX = "$";




+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java View File

@@ -144,7 +144,7 @@ public class MSVSSGET extends MSVSS {
// build the command line from what we got the format is // build the command line from what we got the format is
// ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?] // ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?]
// as specified in the SS.EXE help // as specified in the SS.EXE help
commandLine.append(SS_EXE).append(' ').append(COMMAND_GET);
commandLine.append(getSSCommand()).append(' ').append(COMMAND_GET);


// VSS items // VSS items
commandLine.append(getVsspath()); commandLine.append(getVsspath());


Loading…
Cancel
Save