BundleCommand Class

Summary

This class implements the "hg bundle" command (): create a changegroup file.
graph TD Base0["MercurialCommandBase<T>"]-->Type click Base0 "/Cake.Hg/api/Mercurial/MercurialCommandBase_1" Base1["CommandBase<T>"]-->Base0 click Base1 "/Cake.Hg/api/Mercurial/CommandBase_1" Base2["object"]-->Base1 Interface0["IMercurialCommand"]-.->Type click Interface0 "/Cake.Hg/api/Mercurial/IMercurialCommand" Interface1["ICommand"]-.->Type click Interface1 "/Cake.Hg/api/Mercurial/ICommand" Type["BundleCommand"] class Type type-node

Syntax

public sealed class BundleCommand : MercurialCommandBase<BundleCommand>, IMercurialCommand, ICommand

Constructors

Name Summary
BundleCommand() Initializes a new instance of the BundleCommand class.

Properties

Name Value Summary
AdditionalArguments Collection<T>
Gets the collection which additional arguments can be added into. This collection is exposed for extensions, so that they have a place to add all their extra arguments to the Mercurial command line client.
Inherited from CommandBase<T>
All bool
Gets or sets a value indicating whether to bundle all the changesets in the repository. Default is false.
Arguments IEnumerable<T>
Gets all the arguments to the Command, or an empty array if there are none.
Inherited from CommandBase<T>
BaseRevisions Collection<T>
Gets the collection of revisions assumed to be available at the destination, and thus not included in the bundle. Mostly used when leaving Destination empty, to calculate an "assumed" bundle for a target repository that may not be available for comparison. Default is empty.
Branches Collection<T>
Gets the collection of branches to bundle. Default is empty.
Command string
Gets the command to execute with the Mercurial command line client.
Inherited from CommandBase<T>
Compression MercurialCompressionType
Gets or sets the MercurialCompressionType to use for the bundle file. Default is MercurialCompressionType.BZip2.
DebugOutput bool
Gets or sets a value indicating whether to enable debug output on the command. This should only be used by the command code itself, never by the user.
Inherited from CommandBase<T>
Destination string
Gets or sets the path or URL to the destination repository that the bundled will be built for. The repository will be used to figure out which changesets to add to the bundle. Default is System.String.Empty.
FileName string
Gets or sets the full path to and name of the file to save the bundle to. Default is System.String.Empty.
Force bool
Gets or sets a value indicating whether to run even when the destination is unrelated. Default is false.
Observer IMercurialCommandObserver
Gets or sets the object that will act as an observer of command execution.
Inherited from CommandBase<T>
RawExitCode int
Gets the raw exit code from executing the command line client.
Inherited from CommandBase<T>
RawStandardErrorOutput string
Gets the raw standard error output from executing the command line client.
Inherited from CommandBase<T>
RawStandardOutput string
Gets the raw standard output from executing the command line client.
Inherited from CommandBase<T>
RemoteCommand string
Gets or sets the hg command to run on the remote side. Default is System.String.Empty.
Revisions Collection<T>
Gets the collection of revisions to be added to the destination, and thus include in the bundle. If empty, include every changeset from the source repository that isn't in the destination. Default is empty.
SshCommand string
Gets or sets the ssh command to use when cloning. Default is System.String.Empty.
Timeout int
Gets or sets the timeout to use when executing Mercurial commands, in seconds. Default is 60.
Inherited from CommandBase<T>
VerifyServerCertificate bool
Gets or sets a value indicating whether to verify the server certificate. If set to false, will ignore web.cacerts configuration. Default value is true.

Methods

Name Value Summary
AddArgument(string) void
Adds the specified argument to the AdditionalArguments collection, unless it is already present.
Inherited from CommandBase<T>
After(int, string, string) void
This method is called after the command has been executed. You can use this to clean up after the command execution (like removing temporary files), and to react to the exit code from the command line client. If the exit code is considered a failure, this method should throw the correct exception.
Inherited from CommandBase<T>
Before() void
This method is called before the command is executed. You can use this to store temporary files (like a commit message or similar) that the Arguments refer to, before the command is executed.
Inherited from CommandBase<T>
Cleanup() void
Override this method to implement code that will execute after command line execution.
Inherited from CommandBase<T>
ParseStandardOutputForResults(int, string) void
This method should parse and store the appropriate execution result output according to the type of data the command line client would return for the command.
Inherited from CommandBase<T>
Prepare() void
Override this method to implement code that will execute before command line execution.
Inherited from CommandBase<T>
RequiresVersion(Version, string) void
This method will check the current client version and throw a System.NotSupportedException if the current client version is older than the required one.
ThrowOnUnsuccessfulExecution(int, string) void
This method should throw the appropriate exception depending on the contents of the exitCode and standardErrorOutput parameters, or simply return if the execution is considered successful.
Validate() void
Validates the command configuration. This method should throw the necessary exceptions to signal missing or incorrect configuration (like attempting to add files to the repository without specifying which files to add.)
WithAdditionalArgument(string) T
Adds the value to the AdditionalArguments collection property and returns this instance.
Inherited from CommandBase<T>
WithAll(bool) BundleCommand
Sets the All property to the specified value and returns this BundleCommand instance.
WithBaseRevision(RevSpec) BundleCommand
Adds the value to the BaseRevisions collection property and returns this BundleCommand instance.
WithBranch(string) BundleCommand
Adds the value to the Branches collection property and returns this BundleCommand instance.
WithCompression(MercurialCompressionType) BundleCommand
Sets the Compression property to the specified value and returns this BundleCommand instance.
WithConfigurationOverride(string, string, string) void
Adds a configuration override specification to the AdditionalArguments collection in the form of section.name=value.
WithDestination(string) BundleCommand
Sets the Destination property to the specified value and returns this BundleCommand instance.
WithFileName(string) BundleCommand
Sets the FileName property to the specified value and returns this BundleCommand instance.
WithForce(bool) BundleCommand
Sets the Force property to the specified value and returns this BundleCommand instance.
WithObserver(IMercurialCommandObserver) T
Sets the Observer property to the specified value and returns this instance.
Inherited from CommandBase<T>
WithRemoteCommand(string) BundleCommand
Sets the RemoteCommand property to the specified value and returns this BundleCommand instance.
WithRevision(RevSpec) BundleCommand
Adds the value to the Revisions collection property and returns this BundleCommand instance.
WithSshCommand(string) BundleCommand
Sets the SshCommand property to the specified value and returns this BundleCommand instance.
WithTimeout(int) T
Sets the Timeout property to the specified value and returns this instance.
Inherited from CommandBase<T>
WithVerifyServerCertificate(bool) BundleCommand
Sets the VerifyServerCertificate property to the specified value and returns this BundleCommand instance.

Extension Methods

Name Value Summary
OperateOnPatchRepository<BundleCommand>() T
Makes the command operate on the patch repository instead of the main repository.