Class VersionControl_Hg_Repository_Command_Archive

Description

Implements interfaces:

Exports repository to a (optionally compressed) archive file.

Usage:

  1.  $hg new VersionControl_Hg('/path/to/hg');
  2.  $hg->archive('tip''/home/myself/releases/''tgz');

Or, a forthcoming fluid api:

  1.  $hg->archive('tip')->to('/home/myself/releases/')->as('tgz');

PHP version 5

Located in /Hg/Repository/Command/Archive.php (line 47)

VersionControl_Hg_Command
   |
   --VersionControl_Hg_Repository_Command
      |
      --VersionControl_Hg_Repository_Command_Archive
Class Constant Summary
 ERROR_UNSUPPORTED_ARCHIVE_TYPE = 'unsupportedArchiveType'
Variable Summary
string $command
string $destination
string $revision
string $type
Method Summary
void execute ( $params)
string getArchiveType ()
void getDestination ()
void getRevision ()
void setArchiveType ([ $type = 'files'], string $format)
void setDestination ( $directory)
void setRevision ([ $revision = 'tip'])
void to ( $directory)
void with ( $type)
Variables
mixed $allowed_options = array(
'type', 'rev', 'prefix', 'excluding', 'including'
)
(line 89)

Possible options this command may have

  • access: protected

Redefinition of:
VersionControl_Hg_Command::$allowed_options
Possible options a command may have
string $command = 'archive' (line 61)

The Mercurial command to execute

  • access: protected

Redefinition of:
VersionControl_Hg_Command::$command
Defines the mercurial command to implement
string $destination (line 75)

Where the archive should be saved to

  • access: protected
mixed $required_options = array(
''
)
(line 102)

Required options this command needs

--type defaults to 'files'; --rev defaults to tip; --prefix defaults to ;

  • access: protected

Redefinition of:
VersionControl_Hg_Command::$required_options
Required options this command needs
string $revision (line 68)

Which revision to use in this command

  • access: protected
string $type (line 82)

Default archive type is 'files'.

  • access: protected

Inherited Variables

Inherited from VersionControl_Hg_Repository_Command

VersionControl_Hg_Repository_Command::$allowed_commands
VersionControl_Hg_Repository_Command::$container

Inherited from VersionControl_Hg_Command

VersionControl_Hg_Command::$global_options
VersionControl_Hg_Command::$options
Methods
Constructor __construct (line 128)

Constructor

  • access: public
void __construct (VersionControl_Hg_Repository $repository)

Redefinition of:
VersionControl_Hg_Repository_Command::__construct()
Constructor
execute (line 151)

(non-PHPdoc)

  • see: execute($params)
  • access: public
void execute ( $params)
  • $params

Implementation of:
VersionControl_Hg_Command_Interface::execute()
getArchiveType (line 223)

Accessor for the archive's format

  • see: $_archive_format
  • see: $_valid_archive_formats
  • access: public
string getArchiveType ()
getDestination (line 239)
  • access: public
void getDestination ()
getRevision (line 249)
  • access: public
void getRevision ()
setArchiveType (line 205)

Mutator for the archive's format

  • throws: VersionControl_Hg_Repository_Command_Exception
  • access: public
void setArchiveType ([ $type = 'files'], string $format)
  • string $format
  • $type
setDestination (line 228)
  • access: public
void setDestination ( $directory)
  • $directory
setRevision (line 244)
  • access: public
void setRevision ([ $revision = 'tip'])
  • $revision
to (line 134)
  • access: public
void to ( $directory)
  • $directory

Redefinition of:
VersionControl_Hg_Command::to()
with (line 141)
  • access: public
void with ( $type)
  • $type

Inherited Methods

Inherited From VersionControl_Hg_Repository_Command

VersionControl_Hg_Repository_Command::__construct()
VersionControl_Hg_Repository_Command::__call()

Inherited From VersionControl_Hg_Command

VersionControl_Hg_Command::__construct()
VersionControl_Hg_Command::addOption()
VersionControl_Hg_Command::addOptions()
VersionControl_Hg_Command::changeset()
VersionControl_Hg_Command::excluding()
VersionControl_Hg_Command::forDir()
VersionControl_Hg_Command::forFiles()
VersionControl_Hg_Command::from()
VersionControl_Hg_Command::getOptions()
VersionControl_Hg_Command::getTemplate()
VersionControl_Hg_Command::including()
VersionControl_Hg_Command::parseOutput()
VersionControl_Hg_Command::prepareCommand()
VersionControl_Hg_Command::setTemplate()
VersionControl_Hg_Command::to()
VersionControl_Hg_Command::unsetOption()
VersionControl_Hg_Command::verbose()
VersionControl_Hg_Command::__call()
Class Constants
ERROR_UNSUPPORTED_ARCHIVE_TYPE = 'unsupportedArchiveType' (line 54)

For when the desired archive format is not one of the supported formats

Documentation generated on Tue, 18 Aug 2009 23:53:12 -0600 by phpDocumentor 1.4.2