I am attaching the two Diff files for consideration. I have included the modified files themselves.
I have modified two files from
ant/src/main/org/apache/tools/ant/taskdefs/optional/vss
They are:
MSVSS.java v1.25
and
MSVSSGET.java v1.21
The patch will allow users to use the VSS Command line switches for setting
the timestamp on the files extracted. The options are Current Date, Modified
Date, or, Updated Date.
usage would be:
<vssget localPath="C:\mysrc\myproject"
recursive="true"
label="Release1"
login="me,mypassword"
vsspath="/source/aProject"
timestamp="ModifiedDate"
writable="true"/>
thanks,
Steve Karney
bmcsoftware
273,278d272 < /** */ < public static final String FLAG_CURRENT_TIME = "-GTC"; < /** */ < public static final String FLAG_MODIFIED_TIME = "-GTM"; < /** */ < public static final String FLAG_UPDATE_TIME = "-GTU";
123,128d122
< * <tr>
< * <td>timestamp</td>
< * <td>Controls the Date/Time stamp applied to the files. Valid values
are:
< * CurrentDate, ModifiedDate, or UpdatedDate. </td>
< * <td>No</td>
< * </tr>
147d140
< private String m_TimeStamp = null;
189,190d181
< // Time Stamp
< getTimeStampCommand(commandLine);
387,420d377
<
< /**
< * What to respond with if timeStamp is used. By default, timeStamp is
< * not used; values of "currentDate" or "modifiedDate" or "updatedDate"
< * are legal. Case does not matter.
< */
< public void setTimeStamp(String timeStamp){
< if (timeStamp.equals("") || timeStamp.equals("null")) {
< m_TimeStamp = null;
< } else {
< m_TimeStamp = timeStamp;
< }
< }
<
< /**
< * Checks the value set for timeStamp.
< * if it equals "currentDate" then we set the flag for -GTC (vss ss get
option)
< * if it equals "modifiedDate" then we set the flag for -GTM (vss ss get
option)
< * if it equals "updatedDate" then we set the flag for -GTU (vss ss get
option)
< * otherwise we do nothing
< */
< public void getTimeStampCommand(Commandline cmd) {
<
< if (m_TimeStamp == null) {
< return;
< } else if (m_TimeStamp.equalsIgnoreCase("currentDate")) {
< cmd.createArgument().setValue(FLAG_CURRENT_TIME);
< } else if (m_TimeStamp.equalsIgnoreCase("modifiedDate")) {
< cmd.createArgument().setValue(FLAG_MODIFIED_TIME);
< } else if (m_TimeStamp.equalsIgnoreCase("updatedDate")) {
< cmd.createArgument().setValue(FLAG_UPDATE_TIME);
< } // end of else
<
< } // end getTimeStampCommand
MSVSSGET.java
Description: Binary data
MSVSS.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
