nico 01/03/25 11:07:35
Modified: src/main/org/apache/tools/ant/taskdefs/optional/vss
MSVSS.java
docs/manual/OptionalTasks vssget.html vsslabel.html
Log:
Added attribute serverPath which lets the user specify the path to the srcsafe.ini.
Submitted by Barranger Ridler <barranger.ridler@screamingsolutions.com>
Revision Changes Path
1.8 +27 -0 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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MSVSS.java 2001/01/03 14:18:46 1.7
+++ MSVSS.java 2001/03/25 19:07:35 1.8
@@ -81,6 +81,7 @@
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 @@
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<env.length;i++ ) {
+ newEnv[i] = env[i];
+ }
+ newEnv[env.length] = "SSDIR=" + m_serverPath;
+
+ exe.setEnvironment(newEnv);
+ }
+
exe.setAntRun(project);
exe.setWorkingDirectory(project.getBaseDir());
exe.setCommandline(cmd.getCommandline());
1.3 +5 -0 jakarta-ant/docs/manual/OptionalTasks/vssget.html
Index: vssget.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/vssget.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vssget.html 2001/02/13 12:31:57 1.2
+++ vssget.html 2001/03/25 19:07:35 1.3
@@ -65,6 +65,11 @@
task expects it to be in the PATH.</td>
<td>No</td>
</tr>
+ <tr>
+ <td>serverPath</td>
+ <td>directory where <code>srssafe.ini</code> resides.</td>
+ <td>No</td>
+ </tr>
</table>
<p>Note that only one of version, date or label should be specified</p>
<h3>Examples</h3>
1.3 +5 -0 jakarta-ant/docs/manual/OptionalTasks/vsslabel.html
Index: vsslabel.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/vsslabel.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vsslabel.html 2001/02/18 13:44:40 1.2
+++ vsslabel.html 2001/03/25 19:07:35 1.3
@@ -28,6 +28,11 @@
<td>SourceSafe path</td>
<td>Yes</td>
</tr>
+ <tr>
+ <td>serverPath</td>
+ <td>directory where <code>srssafe.ini</code> resides.</td>
+ <td>No</td>
+ </tr>
<tr>
<td>ssdir</td>
<td>directory where <code>ss.exe</code> resides. By default the
task
|