I don't know no standard way, how to do it. But you can create a tool to do this.
string strServer = startInfo.Server;
string strWorkspace = startInfo.Workspace;
Microsoft.TeamFoundation.Client.TeamFoundationServer tfsServer = null;
if ( false == string.IsNullOrEmpty( strServer ) ) {
tfsServer = new Microsoft.TeamFoundation.Client.TeamFoundationServer( startInfo.Server );
tfsServer.Authenticate();
}
Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer vcServer = null;
if ( tfsServer != null ) {
object obj = tfsServer.GetService( typeof( Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer ) );
vcServer = obj as Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer;
}
Microsoft.TeamFoundation.VersionControl.Client.Workspace workspace = null;
if ( tfsServer != null && vcServer != null && false == string.IsNullOrEmpty( strWorkspace ) ) {
workspace = vcServer.GetWorkspace( strWorkspace, tfsServer.AuthenticatedUserName );
}
List<string> pendingItems = new List<string>();
foreach ( Microsoft.TeamFoundation.VersionControl.Client.WorkingFolder folder in workspace.Folders ) {
pendingItems.Add( folder.ServerItem );
}
List<string> localFilePaths = new List<string>();
string userName = tfsServer.AuthenticatedUserIdentity.AccountName;
Microsoft.TeamFoundation.VersionControl.Client.PendingSet[] pendingSets = workspace.QueryPendingSets( pendingItems.ToArray(), Microsoft.TeamFoundation.VersionControl.Client.RecursionType.Full, null, userName, false );
foreach ( Microsoft.TeamFoundation.VersionControl.Client.PendingSet ps in pendingSets ) {
foreach ( Microsoft.TeamFoundation.VersionControl.Client.PendingChange change in ps.PendingChanges ) {
localFilePaths.Add( change.LocalItem );
}
}