Skip to content

P4OO.Change / P4OO.Changelist#

P4OOChange dataclass #

Bases: _P4OOSpecObj

Perforce Change Spec Object

id Required: Yes

Forcible: Yes

Attributes:

Name Type Description
change int

Change #

user P4OOUser

User that created the change spec

description str

Description field

client P4OOClient | str

Current client workspace

status str

[pending|shelved|submitted|new]

type str

[restricted|public]

jobs P4OOJobSet | P4OOJob | str

List of jobs that are fixed by this change

date datetime

Time of last update to the spec

See Also

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

deleteShelf() #

Executes p4 shelve -d command for this change

Returns:

Type Description
list(str)

Output returned from _P4OOBase._runCommand()

See Also

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

deleteWithVengeance() #

Performs all operations necessary to delete this (pending) change.

  • Delete shelf
  • Delete change spec

Returns:

Type Description
Boolean

Result from _P4OOSpecObj.deleteSpec()

See Also

Perforce Helix Core Knowledge Base: https://portal.perforce.com/s/article/3452

getChangesFromChangeNums(otherChange, client) #

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

Assumptions

  • self represents the lower of the two changes. If the other direction is desired, then make the call against the other change instead.

revertOpenedFiles() #

Executes p4 revert -k command for all files in this change

Returns:

Type Description
list(str)

Output returned from _P4OOBase._runCommand()

See Also

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

P4OOChangeSet dataclass #

Bases: _P4OOSet

P4OOSet of P4OOChange objects

query(client=None, user=None, maxresults=None, status=None, files=None, longoutput=None, **kwargs) #

Executes p4 changes query

Parameters:

Name Type Description Default
client P4OOClient | str

The client (viewspec) to filter file revisions through

None
user P4OOUser | str

The user that created the change

None
maxresults int

Return only the first [max] results

None
status str

Filter changes by status: [pending|shelved|submitted]

None
files P4OOFileSet | P4OOFile | str

The set of file revisions to query

None
longoutput bool

include the full changelist descriptions

None

Returns:

Type Description
P4OOChangeSet

P4OOSet of P4OOChange objects matching query parameters

See Also

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


P4OOChangelist #

Bases: P4OOChange

P4OOChangelist is just a pseudonym for P4OOChange.

P4OOChangelistSet #

Bases: P4OOChangeSet

P4OOChangelistSet is just a pseudonym for P4OOChangeSet.