FileDocCategorySizeDatePackage
MSVSSCHECKOUT.javaAPI DocApache Ant 1.705188Wed Dec 13 06:16:22 GMT 2006org.apache.tools.ant.taskdefs.optional.vss

MSVSSCHECKOUT

public class MSVSSCHECKOUT extends MSVSS
Performs CheckOut commands to Microsoft Visual SourceSafe.
ant.task
name="vsscheckout" category="scm"
ant.attribute.group
name="vdl" description="Only one of version, date or label"

Fields Summary
Constructors Summary
Methods Summary
protected org.apache.tools.ant.types.CommandlinebuildCmdLine()
Builds a command line to execute ss.

return
The constructed commandline.

        Commandline commandLine = new Commandline();

        // first off, make sure that we've got a command and a vssdir ...
        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 Checkout VSS items [-G] [-C] [-H] [-I-] [-N] [-O] [-R] [-V] [-Y] [-?]
        // as specified in the SS.EXE help
        commandLine.setExecutable(getSSCommand());
        commandLine.createArgument().setValue(COMMAND_CHECKOUT);

        // VSS items
        commandLine.createArgument().setValue(getVsspath());
        // -GL
        commandLine.createArgument().setValue(getLocalpath());
        // -I- or -I-Y or -I-N
        commandLine.createArgument().setValue(getAutoresponse());
        // -R
        commandLine.createArgument().setValue(getRecursive());
        // -V
        commandLine.createArgument().setValue(getVersionDateLabel());
        // -Y
        commandLine.createArgument().setValue(getLogin());
        // -G
        commandLine.createArgument().setValue(getFileTimeStamp());
        // -GWS or -GWR
        commandLine.createArgument().setValue(getWritableFiles());
        // -G-
        commandLine.createArgument().setValue(getGetLocalCopy());

        return commandLine;
    
public voidsetAutoresponse(java.lang.String response)
Autoresponce behaviour. Valid options are Y and N.

param
response The auto response value.

        super.setInternalAutoResponse(response);
    
public voidsetDate(java.lang.String date)
Date to check-out.

param
date The date to check-out.
ant.attribute
group="vdl"

        super.setInternalDate(date);
    
public voidsetFileTimeStamp(CurrentModUpdated timestamp)
Date and time stamp given to the local copy. Defaults to current.

param
timestamp The file time stamping behaviour.

        super.setInternalFileTimeStamp(timestamp);
    
public voidsetGetLocalCopy(boolean get)
Retrieve a local copy during a checkout. Defaults to true.

param
get The get local copy behaviour

        super.setInternalGetLocalCopy(get);
    
public voidsetLabel(java.lang.String label)
Label to check-out.

param
label The label to check-out.
ant.attribute
group="vdl"

        super.setInternalLabel(label);
    
public voidsetLocalpath(org.apache.tools.ant.types.Path localPath)
Override the project working directory.

param
localPath The path on disk.

        super.setInternalLocalPath(localPath.toString());
    
public voidsetRecursive(boolean recursive)
Check-out files recursively. Defaults to false.

param
recursive The boolean value for recursive.

        super.setInternalRecursive(recursive);
    
public voidsetVersion(java.lang.String version)
Version to check-out.

param
version The version to check-out.
ant.attribute
group="vdl"

        super.setInternalVersion(version);
    
public voidsetWritableFiles(WritableFiles files)
Action taken when local files are writable. Defaults to fail.

Due to ss.exe returning with an exit code of '100' for both errors and when a file has been skipped, failonerror is set to false when using the skip option.

param
files The writable files behaviour

        super.setInternalWritableFiles(files);