diff --git a/docs/manual/OptionalTasks/vssget.html b/docs/manual/OptionalTasks/vssget.html index b639c2e45..a0d7f39ed 100644 --- a/docs/manual/OptionalTasks/vssget.html +++ b/docs/manual/OptionalTasks/vssget.html @@ -65,6 +65,11 @@ label only one will be used in the order version, date, label.

task expects it to be in the PATH. No + + serverPath + directory where srssafe.ini resides. + No +

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

Examples

diff --git a/docs/manual/OptionalTasks/vsslabel.html b/docs/manual/OptionalTasks/vsslabel.html index f489e4e0d..aab44f200 100644 --- a/docs/manual/OptionalTasks/vsslabel.html +++ b/docs/manual/OptionalTasks/vsslabel.html @@ -28,6 +28,11 @@ project.

SourceSafe path Yes + + serverPath + directory where srssafe.ini resides. + No + ssdir directory where ss.exe resides. By default the task 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 69567fddf..71e453def 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 @@ -81,6 +81,7 @@ public abstract class MSVSS extends Task { private String m_SSDir = ""; private String m_vssLogin = null; private String m_vssPath = null; + private String m_serverPath = null; /** * Set the directory where ss.exe is located @@ -149,11 +150,37 @@ public abstract class MSVSS extends Task { return m_vssPath; } + /** + * Set the path to the location of the ss.ini + * + * @param serverPath + */ + public final void setServerpath(String serverPath) { + m_serverPath = serverPath; + } + protected int run(Commandline cmd) { try { Execute exe = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN)); + + // If location of ss.ini is specified we need to set the + // environment-variable SSDIR to this value + if (m_serverPath != null) { + String[] env = exe.getEnvironment(); + if( env == null ) { + env = new String[0]; + } + String[] newEnv = new String[env.length+1]; + for( int i=0;i