3 people like it.

Team Foundation Server: Check Out a file

Team Foundation Server (TFS): Check Out a file.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
//#r "Microsoft.TeamFoundation.Client"
//#r "Microsoft.TeamFoundation.VersionControl.Client"
//#r "Microsoft.TeamFoundation.VersionControl.Common"
open Microsoft.TeamFoundation.Client
open Microsoft.TeamFoundation.VersionControl.Client

let tfsCheckOut filename =
    let workspaceInfo = Workstation.Current.GetLocalWorkspaceInfo filename
    let workspace = RegisteredTfsConnections.GetProjectCollections().First()
                    |> TfsTeamProjectCollectionFactory.GetTeamProjectCollection
                    |> workspaceInfo.GetWorkspace
    workspace.PendEdit filename
namespace Microsoft
val tfsCheckOut : filename:'a -> 'b

Full name: Script.tfsCheckOut
val filename : 'a
val workspaceInfo : obj
val workspace : obj
Raw view Test code New version

More information

Link:http://fssnip.net/aH
Posted:12 years ago
Author:Tuomas Hietanen
Tags: tfs