Package perforce :: Package async :: Module objects :: Class Client
[frames] | no frames]

Class Client



        object --+    
                 |    
objects.FormObject --+
                     |
                    Client

A Perforce client/workspace object.

Instance Methods
 
__init__(self, connection, clientName, form)
Initialises the Client based on the form retrieved on the connection.
None
save(self)
Save any changes made to the client on the Perforce server.
perforce.results.Results
sync(self, *fileRevisions, **options)
Sync the client workspace to the specified file revisions.
 
delete(self, force=False)
Delete this client workspace from the Perforce repository.

Inherited from objects.FormObject: __delitem__, __getitem__, __iter__, __setitem__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods
Client
__new__(cls, connection, clientName)
Creates a Client based on the form retrieved on the connection.
Properties

Inherited from object: __class__

Method Details

__new__(cls, connection, clientName)
Static Method

 
Creates a Client based on the form retrieved on the connection.
Parameters:
Returns: Client
A deferred that fires with the Client object once its form has been retrieved.
Raises:
  • CommandError - If there was a Perforce error querying the client.
Overrides: object.__new__

__init__(self, connection, clientName, form)
(Constructor)

 
Initialises the Client based on the form retrieved on the connection.
Parameters:
Overrides: objects.FormObject.__init__

save(self)

 
Save any changes made to the client on the Perforce server.
Returns: None
A deferred that fires with None when the save operation completes.
Raises:
  • CommandError - If there was a Perforce error saving the client.

sync(self, *fileRevisions, **options)

 

Sync the client workspace to the specified file revisions.

If no file revisions are specified, then sync the entire workspace to the latest revision.
Parameters:
  • fileRevisions (tuple of str or unicode) - The file revisions to sync in this workspace. If no fileRevisions were specified then all files in the workspace are synced to the #head revision.
  • force (boolean) - Pass as True to force all named file revisions to be retransmitted rather than just those that are out of date.
Returns: perforce.results.Results
The results of performing the sync operation in a deferred.
Raises:
  • CommandError - If there was a Perforce error syncing the client.

delete(self, force=False)

 

Delete this client workspace from the Perforce repository.

The client cannot normally be deleted when the client is locked. Passing force=True will allow the client owner or a Perforce user with admin privileges to forcibly delete a locked client.
Returns:
A deferred that fires when the operation completes successfully.
Raises:
  • CommandError - If there was a Perforce error deleting the client.

Note: This operation will not delete the files from the client's directory.