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>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>


+ 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.
* <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,9 +76,32 @@ import java.io.File;
*/
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>
@@ -128,7 +151,7 @@ public abstract class MSVSS extends Exec {
/**
* 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
- 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
// 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());


Loading…
Cancel
Save