Methods Summary |
---|
org.apache.tools.ant.types.Commandline | buildCmdLine()Builds a command line to execute ss.
Commandline commandLine = new Commandline();
// first off, make sure that we've got a command and a vssdir and a label ...
if (getVsspath() == null) {
String msg = "vsspath attribute must be set!";
throw new BuildException(msg, getLocation());
}
// build the command line from what we got the format is
// ss History elements [-H] [-L] [-N] [-O] [-V] [-Y] [-#] [-?]
// as specified in the SS.EXE help
commandLine.setExecutable(getSSCommand());
commandLine.createArgument().setValue(COMMAND_HISTORY);
// VSS items
commandLine.createArgument().setValue(getVsspath());
// -I-
commandLine.createArgument().setValue(FLAG_AUTORESPONSE_DEF); // ignore all errors
// -Vd
commandLine.createArgument().setValue(getVersionDate());
// -VL
commandLine.createArgument().setValue(getVersionLabel());
// -R
commandLine.createArgument().setValue(getRecursive());
// -B / -D / -F-
commandLine.createArgument().setValue(getStyle());
// -Y
commandLine.createArgument().setValue(getLogin());
// -O
commandLine.createArgument().setValue(getOutput());
return commandLine;
|
public void | setDateFormat(java.lang.String dateFormat)Format of dates in fromDate toDate.
Used when calculating dates with the numdays attribute.
This string uses the formatting rules of SimpleDateFormat .
Defaults to DateFormat.SHORT .
super.setInternalDateFormat(new SimpleDateFormat(dateFormat));
|
public void | setFromDate(java.lang.String fromDate)Date representing the 'start' of the range.
super.setInternalFromDate(fromDate);
|
public void | setFromLabel(java.lang.String fromLabel)Label representing the 'start' of the range.
super.setInternalFromLabel(fromLabel);
|
public void | setNumdays(int numd)Number of days for comparison.
Defaults to 2 days.
super.setInternalNumDays(numd);
|
public void | setOutput(java.io.File outfile)Output file name for the history.
if (outfile != null) {
super.setInternalOutputFilename(outfile.getAbsolutePath());
}
|
public void | setRecursive(boolean recursive)Retrieve history recursively. Defaults to false.
super.setInternalRecursive(recursive);
|
public void | setStyle(org.apache.tools.ant.taskdefs.optional.vss.MSVSSHISTORY$BriefCodediffNofile attr)Output style. Valid options are:
- brief: -B Display a brief history.
- codediff: -D Display line-by-line file changes.
- nofile: -F- Do not display individual file updates in the project history.
- default: No option specified. Display in Source Safe's default format.
String option = attr.getValue();
if (option.equals(STYLE_BRIEF)) {
super.setInternalStyle(FLAG_BRIEF);
} else if (option.equals(STYLE_CODEDIFF)) {
super.setInternalStyle(FLAG_CODEDIFF);
} else if (option.equals(STYLE_DEFAULT)) {
super.setInternalStyle("");
} else if (option.equals(STYLE_NOFILE)) {
super.setInternalStyle(FLAG_NO_FILE);
} else {
throw new BuildException("Style " + attr + " unknown.", getLocation());
}
|
public void | setToDate(java.lang.String toDate)Date representing the 'end' of the range.
super.setInternalToDate(toDate);
|
public void | setToLabel(java.lang.String toLabel)Label representing the 'end' of the range.
super.setInternalToLabel(toLabel);
|
public void | setUser(java.lang.String user)Name of the user whose change history is generated.
super.setInternalUser(user);
|