Share via


Repository5.Shelve Method

Copies the pending changes to a shelveset. Changes will remain in the workspace as well.

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

Syntax

'Declaration
<WebMethodAttribute> _
Public Function Shelve ( _
    workspaceName As String, _
    workspaceOwner As String, _
    serverItems As String(), _
    shelveset As Shelveset, _
    replace As Boolean, _
    maxClientPathLength As Integer _
) As List(Of Failure)
[WebMethodAttribute]
public List<Failure> Shelve(
    string workspaceName,
    string workspaceOwner,
    string[] serverItems,
    Shelveset shelveset,
    bool replace,
    int maxClientPathLength
)
[WebMethodAttribute]
public:
List<Failure^>^ Shelve(
    String^ workspaceName, 
    String^ workspaceOwner, 
    array<String^>^ serverItems, 
    Shelveset^ shelveset, 
    bool replace, 
    int maxClientPathLength
)
[<WebMethodAttribute>]
member Shelve : 
        workspaceName:string * 
        workspaceOwner:string * 
        serverItems:string[] * 
        shelveset:Shelveset * 
        replace:bool * 
        maxClientPathLength:int -> List<Failure> 
public function Shelve(
    workspaceName : String, 
    workspaceOwner : String, 
    serverItems : String[], 
    shelveset : Shelveset, 
    replace : boolean, 
    maxClientPathLength : int
) : List<Failure>

Parameters

  • workspaceName
    Type: System.String

    Name of the workspace to shelve from.

  • workspaceOwner
    Type: System.String

    Username of the workspace's owner.

  • serverItems
    Type: array<System.String[]

    List of items to shelve.

  • replace
    Type: System.Boolean

    If true and there is already a shelveset with the same name, it will be deleted.

  • maxClientPathLength
    Type: System.Int32

    The maximum client supported server path length.

Return Value

Type: System.Collections.Generic.List<Failure>

Remarks

The call sequence for Shelve() is similar to Checkin(). Clients should: 1) call QueryPendingSets() 2) For each edited file, upload the content 3) Call Shelve() with the list of server items from 1) 4) Call UndoPendingChanges() if "move" behavior is desired.

.NET Framework Security

See Also

Reference

Repository5 Class

Microsoft.TeamFoundation.VersionControl.Server Namespace