Package perforce :: Module objects :: Class Job
[frames] | no frames]

Class Job



object --+    
         |    
FormObject --+
             |
            Job

The job class wraps the Perforce job concept.

Instance Methods
 
__init__(self, connection, jobName=None)
Intialise the Job based on the form retrieved on the connection.
 
save(self, force=False)
Save any changes made to the job on the Perforce server.
 
refresh(self)
Reload the contents of the job from the Perforce server.

Inherited from FormObject: __delitem__, __getitem__, __iter__, __setitem__

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

Properties

Inherited from object: __class__

Method Details

__init__(self, connection, jobName=None)
(Constructor)

 
Intialise the Job based on the form retrieved on the connection.
Parameters:
  • connection (perforce.connection.Connection) - The connection to the Perforce server to use. Must be already connected.
  • jobName (str or unicode) - The name of the label to query. If None then obtains a new empty job.
Raises:
  • CommandError - If there was a Perforce error querying the job.
Overrides: FormObject.__init__

save(self, force=False)

 

Save any changes made to the job on the Perforce server.

By default a locked job can only be updated by its owner. Passing force as True will allow users with 'admin' access to force saving changes to the job.
Parameters:
  • force (boolean) - Flag indicating whether to force saving of updates.
Raises:
  • CommandError - If the operation failed due to Perforce errors.

refresh(self)

 

Reload the contents of the job from the Perforce server.

All unsaved changes to the form will be lost.
Raises:
  • CommandError - If the operation failed due to Perforce errors.