Add-VolatileEnlistment

SYNOPSIS

Creates a TFS workspace intended for mappings that have active churn and should be included in forward and reverse integrations.

SYNTAX

Add-VolatileEnlistment [-mappings] <String[]> [-tfsUrl <String>] [-localSourcePath <String>] [-branch <String>] [-branchToken <String>] [-localPathToken <String>] [-force] [<CommonParameters>]

PARAMETERS

Mappings

List of mappings to include in workspace. These can be piped froman existing workspace and you can use the BranchToken and LocalPathToken to replace new server and local path values to be used for this workspace.

TfsUrl

The TFS Collection URL to use for connecting to TFS

LocalSourcePath

Local path where the workspace mappings should be rooted to

Branch

Server path from which to root mappings

BranchToken (optional)

String in the server path of the Mappings to be replaced with the Branch parameter

LocalPathToken (optional)

String in the local path of the Mappings to be replaced with the LocalSourcePath parameter. The default is 'c:\'.

Force (optional)

If a wokspace already exists that was not created by BigGit then add these mappings to that workspace

EXAMPLE 1

Invoke-TF workfold /workspace:"SomeOtherWorkspace;Matt Wrock" | Add-VolatileEnlistment -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\" -localPathToken "c:\" -Branch $/my/branch -BranchToken $/original/branch
This will create a new workspace based on the mappings of SomeOtherWorkspace and replace server path mappings starting with $/original/branch with $/my/branch and replace local path mappings starting with c:\ with c:\dev\src\

EXAMPLE 2

Invoke-TF workfold /workspace:"SomeOtherWorkspace;Matt Wrock" | Add-VolatileEnlistment -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\" -localPathToken "c:\"
This will create a new workspace based on the mappings of SomeOtherWorkspace and replace local path mappings starting with c:\ with c:\dev\src\. The server paths will be copied from the original mappings.

EXAMPLE 3

Add-VolatileEnlistment -mappings " $/my/branch/folder1: c:\dev\src\folder1"," $/my/branch/folder2: c:\dev\src\folder2" -tfsUrl http://myserver:8080/tfs -localSourcePath "c:\dev\src\"
This will create a new workspace and use the mappings passed in as is since no token parameters were used.

NOTES

If a Volatile workspace exists, the directories of that workspace will be symbolically linked to this workspace.

Last edited Jan 14, 2013 at 5:30 AM by mwrock, version 3

Comments

No comments yet.