Skip to content

P4OO.Label#

P4OOLabel dataclass #

Bases: _P4OOSpecObj

Perforce Label Spec Object

id Required: Yes

Forcible: Yes

Attributes:

Name Type Description
label str

Name of the label

owner P4OOUser

User that owns the label spec

description str

Description field

options str

[locked|unlocked|autoreload|noautoreload]

revision str

optional revision specification for automatic label

view str

View spec mappings

update datetime

Time of last update to the spec

access datetime

Time of last access of the spec

See Also

Perforce Helix Core Command Reference: https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_label.htm

getChangesFromLabels(otherLabel, client) #

Fetch the list of changes from this label to another one.

Assumptions: - self represents the lower of the two labels. If the other direction is desired, then make the call against the other label instead.

getDiffsFromLabels(otherLabel, client, **diffOpts) #

Fetch the list of diffs from this label to another one

getLastChange() #

Return the latest change incorporated into the label

Return None if the label sees no changes (empty depot).

getRevision() #

Return the revision spec attribute of the label

tagFiles(*fileSpec, **kwargs) #

Tag the specified files against label (self)

P4OOLabelSet dataclass #

Bases: _P4OOSet

P4OOSet of P4OOLabel objects

query(user=None, maxresults=None, namefilter=None, files=None, **kwargs) #

Executes p4 labels query

Parameters:

Name Type Description Default
user P4OOUser | str

The user that owns the label

None
maxresults int

Return only the first [max] results

None
namefilter str

Case-sensitive filter on label name

None
files P4OOFileSet | P4OOFile | str

The set of file revisions to query

None

Returns:

Type Description
P4OOLabelSet

P4OOSet of P4OOLabel objects matching query parameters

See Also

Perforce Helix Core Command Reference: https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_labels.html