Class P4::MergeData

Description

Class containing the context for an individual merge during execution of a p4 resolve. Users may not create objects of this class; they are created internally during P4::RunResolve(), and passed down to the Resolve() method of a P4::Resolver subclass.

Class Methods

None.

Instance Methods

$md.YourName() -> string

Returns the name of "your" file in the merge, in client syntax.

$md.TheirName() -> string

Returns the name of "their" file in the merge, in client syntax, including the revision number.

$md.BaseName() -> string

Returns the name of the "base" file in the merge, in depot syntax, including the revision number.

$md.YourPath() -> string

Returns the path of "your" file in the merge. This is typically a path to a file in the client workspace.

$md.TheirPath() -> string

Returns the path of "their" file in the merge. This is typically a path to a temporary file on your local machine in which the contents of P4::MergeData::TheirName() have been loaded.

$md.BasePath() -> string

Returns the path of the base file in the merge. This is typically a path to a temporary file on your local machine in which the contents of P4::MergeData::BaseName() have been loaded.

$md.ResultPath() -> string

Returns the path to the merge result. This is typically a path to a temporary file on your local machine in which the contents of the automatic merge performed by the server have been loaded.

$md.MergeHint() -> string

Returns a string containing the hint from Helix Server’s merge algorithm, indicating the recommended action for performing the resolve.

$md.RunMergeTool() -> integer

If the environment variable P4MERGE is defined, P4::MergeData::RunMergeTool() invokes the specified program and returns true if the merge tool was successfully executed, otherwise returns false.

$md.MergeType() -> string

Returns a string describing the merge type, such as Branch resolve.

$md.YourAction() -> string

Returns the name of "your" action, such as ignore.

$md.TheirAction() -> string

Returns the name of "their" action, such as branch.

$md.MergeAction() -> string

Returns the name of the action used in the merge. For example, if TheirAction is branch and YourAction is ignore, then if you choose yours, you get an ignore, and if you choose theirs, you get a branch.

$md.MergeInfo() -> string

Returns an object containing details about the resolve. For example:

'clientFile' => '/Users/jdoe/Workspaces/main.p4-perl/test/resolve/action/file-88.txt',
'fromFile' => '//depot/projA/src/file-88.txt',
'startFromRev' => 'none',
'resolveType' => 'branch',
'resolveFlag' => 'b',
'endFromRev' => '2'