GetTask Class

Summary

Used to retrieve an item or project from a Visual Source Safe database.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks.SourceSafe
Base Types
graph BT Type-->Base0["BaseTask"] click Base0 "/api/NAnt.Contrib.Tasks.SourceSafe/BaseTask" Base0-->Base1["Task"] Type["GetTask"] class Type type-node

Syntax

[TaskName("vssget")]
public sealed class GetTask : BaseTask

Examples

Get the latest files from a local sourcesafe database.

<vssget
          user="myusername"
          password="mypassword"
          localpath="C:\Dev\Latest"
          recursive="true"
          replace="true"
          writable="true"
          dbpath="C:\VSS\srcsafe.ini"
          path="$/MyProduct"
        />

Get the latest version of a file from a remote sourcesafe database. Put it in a relative directory.

<vssget
          user="myusername"
          password="mypassword"
          localpath="Latest"
          recursive="true"
          replace="true"
          writable="true"
          dbpath="\\MyServer\VSS\srcsafe.ini"
          path="$/MyProduct/myFile.cs"
        />

Get the latest version of a file from a remote sourcesafe database. Remove any deleted files from local image.

<vssget
          user="myusername"
          password="mypassword"
          localpath="C:\Dev\Latest"
          recursive="true"
          replace="true"
          writable="true"
          removedeleted="true"
          dbpath="\\MyServer\VSS\srcsafe.ini"
          path="$/MyProduct/myFile.cs"
        />

Attributes

Type Description
TaskName

Fields

Name Constant Value Summary
RecursiveFlag 24576
Inherited from BaseTask
static

Properties

Name Value Summary
Database VSSDatabase
Inherited from BaseTask
DBPath FileInfo
The path to the folder that contains "srcsafe.ini".
Inherited from BaseTask
FileTimestamp FileTimestamp
Set the behavior for timestamps of local files. The default is FileTimestamp.Current.
Item IVSSItem
Inherited from BaseTask
LocalPath DirectoryInfo
The path to the local working directory.
Login string
The name of the user needed to access the Visual SourceSafe database. When no NAnt.Contrib.Tasks.SourceSafe.BaseTask.UserName is specified and "Use network name for automatic user log in" is enabled, then the current Windows username will be used to log in.
Inherited from BaseTask
Password string
The password to use to login to the SourceSafe database.
Inherited from BaseTask
Path string
The Visual SourceSafe project or file path you wish the perform the action on (starting with "$/").
Inherited from BaseTask
Recursive bool
Determines whether to perform the get recursively. The default is true.
RemoveDeleted bool
If System.IO.Path refers to a project, determines whether files marked "deleted" in the repository will be removed from the local copy. The default is false.
Replace bool
Determines whether to replace writable files. The default is false.
UseModificationTime bool
Determines whether the timestamp on the local copy will be the modification time (if false or omitted, the checkout time will be used)
UserName string
The name of the user needed to access the Visual SourceSafe database. When no NAnt.Contrib.Tasks.SourceSafe.BaseTask.UserName is specified and "Use network name for automatic user log in" is enabled for the Visual SourceSafe database, then the current Windows username will be used to log in.
Inherited from BaseTask
Version string
A version of the path to reference. Accepts multiple forms, including the label, version number, or date of the version. If omitted, the latest version is used.
Inherited from BaseTask
Writable bool
Determines whether the files will be writable. The default is false.

Methods

Name Value Summary
BuildDeletedTable(IVSSItems) Hashtable
ExecuteTask() void
GetFileTimestampFlags(FileTimestamp) int
Gets the SourceSafeTypeLib.VSSFlags value corresponding with the specified NAnt.Contrib.Tasks.SourceSafe.FileTimestamp.
Inherited from BaseTask
Open() void
Opens the Source Safe database and sets the reference to the specified item and version.
Inherited from BaseTask
RemoveDeletedFromLocalImage() void
Checks to see if we should remove local copies of deleted files, and starts the scan.
RemoveDeletedFromLocalImage(IVSSItem, string) void
Scans the Project Item for deleted files and removes their local copies from the local image of the project. Obeys the recursive setting (and thus optionally calls itself recursively).