diff --git a/docs/index.html b/docs/index.html index 05b7ef2c7..80a1f3b9a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3704,42 +3704,48 @@ The following attributes are interpretted: login username,password No - + vsspath SourceSafe path Yes - + localpath Override the working directory and get to the specified path No - + writable true or false No - + recursive true or false No - + version a version number to get No - + date a date stamp to get at No - + label a label to get for No + + ssdir + directory where ss.exe resides. By default the + task expects it to be in the PATH. + No +

Note that only one of version, date or label should be specified

Examples

diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index 9d9490784..b4c1c9821 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -63,8 +63,8 @@ import java.io.File; * A base class for creating tasks for executing commands on Visual SourceSafe. *

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

*

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

@@ -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 = "$"; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java index 816b547ca..a50a13dea 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java @@ -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());