public abstract class MSVSS extends Task implements MSVSSConstants
The class extends the 'exec' task as it operates by executing the ss.exe program 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 also contains constants for the flags that can be passed to SS.
Modifier and Type | Class and Description |
---|---|
static class |
MSVSS.CurrentModUpdated
Extension of EnumeratedAttribute to hold the values for file time stamp.
|
static class |
MSVSS.WritableFiles
Extension of EnumeratedAttribute to hold the values for writable filess.
|
description, location, project
COMMAND_ADD, COMMAND_CHECKIN, COMMAND_CHECKOUT, COMMAND_CP, COMMAND_CREATE, COMMAND_GET, COMMAND_HISTORY, COMMAND_LABEL, FLAG_AUTORESPONSE_DEF, FLAG_AUTORESPONSE_NO, FLAG_AUTORESPONSE_YES, FLAG_BRIEF, FLAG_CODEDIFF, FLAG_COMMENT, FLAG_FILETIME_DEF, FLAG_FILETIME_MODIFIED, FLAG_FILETIME_UPDATED, FLAG_LABEL, FLAG_LOGIN, FLAG_NO_FILE, FLAG_NO_GET, FLAG_OUTPUT, FLAG_OVERRIDE_WORKING_DIR, FLAG_QUIET, FLAG_RECURSION, FLAG_REPLACE_WRITABLE, FLAG_SKIP_WRITABLE, FLAG_USER, FLAG_VERSION, FLAG_VERSION_DATE, FLAG_VERSION_LABEL, FLAG_WRITABLE, PROJECT_PREFIX, SS_EXE, STYLE_BRIEF, STYLE_CODEDIFF, STYLE_DEFAULT, STYLE_NOFILE, TIME_CURRENT, TIME_MODIFIED, TIME_UPDATED, VALUE_FROMDATE, VALUE_FROMLABEL, VALUE_NO, VALUE_YES, WRITABLE_FAIL, WRITABLE_REPLACE, WRITABLE_SKIP
Constructor and Description |
---|
MSVSS() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Executes the task.
|
protected java.lang.String |
getAutoresponse()
Gets the auto response string.
|
protected java.lang.String |
getComment()
Gets the comment string.
|
java.lang.String |
getFileTimeStamp()
Gets the value set for the FileTimeStamp.
|
protected java.lang.String |
getGetLocalCopy()
Builds and returns the -G- flag if required.
|
protected java.lang.String |
getLabel()
Gets the label string.
|
protected java.lang.String |
getLocalpath()
Gets the localpath string.
|
protected java.lang.String |
getLogin()
Gets the login string.
|
protected java.lang.String |
getOutput()
Gets the output file string.
|
protected java.lang.String |
getQuiet()
Gets the quiet string.
|
protected java.lang.String |
getRecursive()
Gets the recursive string.
|
protected java.lang.String |
getSSCommand()
Gets the sscommand string.
|
protected java.lang.String |
getStyle()
Gets the style string.
|
protected java.lang.String |
getUser()
Gets the user string.
|
protected java.lang.String |
getVersion()
Gets the version string.
|
protected java.lang.String |
getVersionDate()
Gets the Version date string.
|
protected java.lang.String |
getVersionDateLabel()
Gets the version string.
|
protected java.lang.String |
getVersionLabel()
Gets the version string.
|
protected java.lang.String |
getVsspath()
Gets the vssserverpath string.
|
protected java.lang.String |
getWritable()
Gets the writable string.
|
java.lang.String |
getWritableFiles()
Gets the value to determine the behaviour when encountering writable files.
|
void |
setFailOnError(boolean failOnError)
Indicates if the build should fail if the Sourcesafe command does.
|
protected void |
setInternalAutoResponse(java.lang.String autoResponse)
Set the auto response attribute.
|
protected void |
setInternalComment(java.lang.String comment)
Set the internal comment attribute.
|
protected void |
setInternalDate(java.lang.String date)
Set the date attribute.
|
protected void |
setInternalDateFormat(java.text.DateFormat dateFormat)
Set the date format attribute.
|
protected void |
setInternalFailOnError(boolean failOnError)
Set the failOnError attribute.
|
protected void |
setInternalFileTimeStamp(MSVSS.CurrentModUpdated timestamp)
Set the timestamp attribute.
|
protected void |
setInternalFromDate(java.lang.String fromDate)
Set the from date attribute.
|
protected void |
setInternalFromLabel(java.lang.String fromLabel)
Set the from label attribute.
|
protected void |
setInternalGetLocalCopy(boolean getLocalCopy)
Set the getLocalCopy attribute.
|
protected void |
setInternalLabel(java.lang.String label)
Set the label attribute.
|
protected void |
setInternalLocalPath(java.lang.String localPath)
Set the local path comment attribute.
|
protected void |
setInternalNumDays(int numDays)
Set the num days attribute.
|
protected void |
setInternalOutputFilename(java.lang.String outputFileName)
Set the outputFileName comment attribute.
|
protected void |
setInternalQuiet(boolean quiet)
Set the quiet attribute.
|
protected void |
setInternalRecursive(boolean recursive)
Set the recursive attribute.
|
protected void |
setInternalStyle(java.lang.String style)
Set the style attribute.
|
protected void |
setInternalToDate(java.lang.String toDate)
Set the to date attribute.
|
protected void |
setInternalToLabel(java.lang.String toLabel)
Set the to label attribute.
|
protected void |
setInternalUser(java.lang.String user)
Set the user attribute.
|
protected void |
setInternalVersion(java.lang.String version)
Set the version attribute.
|
protected void |
setInternalWritable(boolean writable)
Set the writable attribute.
|
protected void |
setInternalWritableFiles(MSVSS.WritableFiles writableFiles)
Set the writableFiles attribute.
|
void |
setLogin(java.lang.String vssLogin)
Login to use when accessing VSS, formatted as "username,password".
|
void |
setServerpath(java.lang.String serverPath)
Directory where
srssafe.ini resides. |
void |
setSsdir(java.lang.String dir)
Directory where
ss.exe resides. |
void |
setVsspath(java.lang.String vssPath)
SourceSafe path which specifies the project/file(s) you wish to perform
the action on.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public final void setSsdir(java.lang.String dir)
ss.exe
resides.
By default the task expects it to be in the PATH.dir
- The directory containing ss.exe.public final void setLogin(java.lang.String vssLogin)
You can omit the password if your database is not password protected. If you have a password and omit it, Ant will hang.
vssLogin
- The login string to use.public final void setVsspath(java.lang.String vssPath)
A prefix of 'vss://' will be removed if specified.
vssPath
- The VSS project path.public final void setServerpath(java.lang.String serverPath)
srssafe.ini
resides.serverPath
- The path to the VSS server.public final void setFailOnError(boolean failOnError)
failOnError
- True if task should fail on any error.public void execute() throws BuildException
Builds a command line to execute ss.exe and then calls Exec's run method to execute the command line.
execute
in class Task
BuildException
- if the command cannot execute.protected void setInternalComment(java.lang.String comment)
comment
- the value to use.protected void setInternalAutoResponse(java.lang.String autoResponse)
autoResponse
- the value to use.protected void setInternalDate(java.lang.String date)
date
- the value to use.protected void setInternalDateFormat(java.text.DateFormat dateFormat)
dateFormat
- the value to use.protected void setInternalFailOnError(boolean failOnError)
failOnError
- the value to use.protected void setInternalFromDate(java.lang.String fromDate)
fromDate
- the value to use.protected void setInternalFromLabel(java.lang.String fromLabel)
fromLabel
- the value to use.protected void setInternalLabel(java.lang.String label)
label
- the value to use.protected void setInternalLocalPath(java.lang.String localPath)
localPath
- the value to use.protected void setInternalNumDays(int numDays)
numDays
- the value to use.protected void setInternalOutputFilename(java.lang.String outputFileName)
outputFileName
- the value to use.protected void setInternalQuiet(boolean quiet)
quiet
- the value to use.protected void setInternalRecursive(boolean recursive)
recursive
- the value to use.protected void setInternalStyle(java.lang.String style)
style
- the value to use.protected void setInternalToDate(java.lang.String toDate)
toDate
- the value to use.protected void setInternalToLabel(java.lang.String toLabel)
toLabel
- the value to use.protected void setInternalUser(java.lang.String user)
user
- the value to use.protected void setInternalVersion(java.lang.String version)
version
- the value to use.protected void setInternalWritable(boolean writable)
writable
- the value to use.protected void setInternalFileTimeStamp(MSVSS.CurrentModUpdated timestamp)
timestamp
- the value to use.protected void setInternalWritableFiles(MSVSS.WritableFiles writableFiles)
writableFiles
- the value to use.protected void setInternalGetLocalCopy(boolean getLocalCopy)
getLocalCopy
- the value to use.protected java.lang.String getSSCommand()
protected java.lang.String getVsspath()
protected java.lang.String getQuiet()
protected java.lang.String getRecursive()
protected java.lang.String getWritable()
protected java.lang.String getLabel()
protected java.lang.String getStyle()
protected java.lang.String getVersionDateLabel()
protected java.lang.String getVersion()
protected java.lang.String getLocalpath()
The localpath is created if it didn't exist.
protected java.lang.String getComment()
protected java.lang.String getAutoresponse()
protected java.lang.String getLogin()
protected java.lang.String getOutput()
protected java.lang.String getUser()
protected java.lang.String getVersionLabel()
protected java.lang.String getVersionDate() throws BuildException
BuildException
- if there is an error.protected java.lang.String getGetLocalCopy()
public java.lang.String getFileTimeStamp()
public java.lang.String getWritableFiles()