Delen via


TeamFoundationVersionControlService.UndoPendingChanges Method (TeamFoundationRequestContext, String, String, array<ItemSpec[], array<String[], array<String , Boolean)

Undoes a set of pending changes.

If a serverItem spec does not match anything, a Failure object is returned for it.

This method returns an array of pending changes that were undone. For each file, the client should call DownloadFile() and specify the version returned in the UndonePendingChange object to retrieve the unmodified versions of the files.

Namespace:  Microsoft.TeamFoundation.VersionControl.Server
Assembly:  Microsoft.TeamFoundation.VersionControl.Server (in Microsoft.TeamFoundation.VersionControl.Server.dll)

Syntax

'Declaration
Public Function UndoPendingChanges ( _
    requestContext As TeamFoundationRequestContext, _
    workspaceName As String, _
    ownerName As String, _
    items As ItemSpec(), _
    itemPropertyFilters As String(), _
    itemAttributeFilters As String(), _
    localWorkspaceBehavior As Boolean _
) As TeamFoundationDataReader
public TeamFoundationDataReader UndoPendingChanges(
    TeamFoundationRequestContext requestContext,
    string workspaceName,
    string ownerName,
    ItemSpec[] items,
    string[] itemPropertyFilters,
    string[] itemAttributeFilters,
    bool localWorkspaceBehavior
)
public:
TeamFoundationDataReader^ UndoPendingChanges(
    TeamFoundationRequestContext^ requestContext, 
    String^ workspaceName, 
    String^ ownerName, 
    array<ItemSpec^>^ items, 
    array<String^>^ itemPropertyFilters, 
    array<String^>^ itemAttributeFilters, 
    bool localWorkspaceBehavior
)
member UndoPendingChanges : 
        requestContext:TeamFoundationRequestContext * 
        workspaceName:string * 
        ownerName:string * 
        items:ItemSpec[] * 
        itemPropertyFilters:string[] * 
        itemAttributeFilters:string[] * 
        localWorkspaceBehavior:bool -> TeamFoundationDataReader
public function UndoPendingChanges(
    requestContext : TeamFoundationRequestContext, 
    workspaceName : String, 
    ownerName : String, 
    items : ItemSpec[], 
    itemPropertyFilters : String[], 
    itemAttributeFilters : String[], 
    localWorkspaceBehavior : boolean
) : TeamFoundationDataReader

Parameters

  • workspaceName
    Type: System.String

    Workspace to revert pending changes from.

  • ownerName
    Type: System.String

    Owner of workspace (including domain).

  • itemPropertyFilters
    Type: array<System.String[]

    List of properties to return with get operations.

  • itemAttributeFilters
    Type: array<System.String[]

    List of attributes to return with get operations.

  • localWorkspaceBehavior
    Type: System.Boolean

    True to enable special local workspace behavior: Undo only operates on pending locks, and only removes the lock bit.

Return Value

Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationDataReader
TeamFoundationDataReader with results in the following order: GetOperation[] - Array of get operations that must be applied to the client to get in sync. Failure[] - Failure objects for items that could not be undone.

.NET Framework Security

See Also

Reference

TeamFoundationVersionControlService Class

UndoPendingChanges Overload

Microsoft.TeamFoundation.VersionControl.Server Namespace