MercurialPreTransactionCommitHook Class

Summary

This MercurialControllingHookBase descendant implements the code necessary to handle the "pretxncommit" hook: This is run after a changeset has been created but the transaction not yet committed.
graph TD Base0["MercurialControllingHookBase"]-->Type click Base0 "/Cake.Hg/api/Mercurial.Hooks/MercurialControllingHookBase" Base1["MercurialHookBase"]-->Base0 click Base1 "/Cake.Hg/api/Mercurial.Hooks/MercurialHookBase" Base2["object"]-->Base1 Interface0["IMercurialControllingHook"]-.->Type click Interface0 "/Cake.Hg/api/Mercurial.Hooks/IMercurialControllingHook" Type["MercurialPreTransactionCommitHook"] class Type type-node

Syntax

public class MercurialPreTransactionCommitHook : MercurialControllingHookBase, 
    IMercurialControllingHook

Remarks

As with all controlling hooks (descendants of MercurialControllingHookBase), you can prevent the command from continuing, or let it continue, by calling TerminateHookAndCancelCommand(int) or TerminateHookAndProceed() respectively.

Constructors

Properties

Name Value Summary
CommittedRevision RevSpec
Gets the RevSpec identifying the revision that was committed.
LeftParentRevision RevSpec
Gets the RevSpec identifying the left parent of the changeset that was committed.
Repository Repository
Gets the Repository the hook is executing in.
Inherited from MercurialHookBase
RightParentRevision RevSpec
Gets the RevSpec identifying the left parent of the changeset that was committed; or null if this is not a merge changeset.

Methods

Name Value Summary
LoadRevision(string) RevSpec
Loads a RevSpec from a hash specified by an environment variable.
Inherited from MercurialHookBase
static
TerminateHookAndCancelCommand() void
Terminates the hook and cancels the Mercurial command being executed, with an exit code of 1 and no message.
TerminateHookAndCancelCommand(int) void
Terminates the hook and cancels the Mercurial command being executed, with the specified exit code and no message.
TerminateHookAndCancelCommand(int, string) void
Terminates the hook and cancels the Mercurial command being executed.
TerminateHookAndProceed() void
Terminates the hook program and allows the Mercurial command being hooked to proceed as normal.