RepositoryRenameClient Method
|
Renames client/workspace in the repository and also modifies all applicable places with new name.
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.1.265.5426
Syntax public string RenameClient(
string oldClientName,
string newClientName
)
Public Function RenameClient (
oldClientName As String,
newClientName As String
) As String
public:
String^ RenameClient(
String^ oldClientName,
String^ newClientName
)
member RenameClient :
oldClientName : string *
newClientName : string -> string
Parameters
- oldClientName
- Type: SystemString
Existing client/workspace name. - newClientName
- Type: SystemString
New client/workspace name which is to be replaced with old name.
Return Value
Type:
StringReturns outcome of renameclient command from server.
Remarks
p4 help renameclient
renameclient -- Rename a client throughout the database
renameworkspace -- synonym for 'renameclient'
p4 renameclient --from=old --to=new
'p4 renameclient' renames a client, modifying relevant database
records which reference the client as needed.
This includes pending and shelved changes created by the client,
any files that the user has opened or shelved, any fixes that the
user made to jobs associated with pending changes, files on the
client's have list, and the client record itself. Note that this
command does not modify submitted changes nor fixes that are
associated with submitted changelists.The intent of this
command is to create a new client, migrate all existing work
in progress to that new client, and then delete the old client.
The client name is not changed in descriptive text fields (such as job
descriptions, change descriptions, or workspace descriptions). The
client is modified only where it appears as a field or as part of a
client path of a database record.
This command will add an entry to the spec depot for the new client,
and will add a deletion entry for the old client.
This command does not process unloaded clients, so any unloaded
client to be renamed should be reloaded first.
This command is not supported for use with partitioned or readonly
clients, clients with opened streams, or clients with promoted shelved
changes.The client cannot be renamed to a client that already exists.
'p4 renameclient' by default requires 'admin' access granted
by 'p4 protect', or must be the owner of the client to be renamed.
The 'run.renameclient.allow' configurable can be used to restrict
users that can run the 'p4 renameclient' command.
See Also