classes/phing/tasks/system/CvsTask.php

\CvsTask

Task for performing CVS operations.

NOTE: This implementation has been moved here from Cvs.java with the addition of some accessors for extensibility. Another task can extend this with some customized output processing.

Extends from
\Task
author
Hans Lellelid (Phing)
author
costin@dnt.ro (Ant)
author
stefano@apache.org (Ant)
author
Wolfgang Werner (Ant)
author
Kevin Ross (Ant)
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.system
version
$Revision: 526 $

Constants

Constant  DEFAULT_COMPRESSION_LEVEL = '3'

Default compression level to use, if compression is enabled via setCompression( true ).

Properties

Propertyprivate  $cmd= ''
Details
Type
Propertyprivate  $command= 'null'

the CVS command to execute.

Default valuenullDetails
Type
Propertyprivatearray  $commandlines= 'array'

List of Commandline children

Commandline[]
Default valuearrayDetails
Type
array
Propertyprivate  $compression= '0'

compression level to use.

Default value0Details
Type
Propertyprivate  $cvsModule= ''

the package/module to check out.

Details
Type
Propertyprivate  $cvsRoot= ''

the CVSROOT variable.

Details
Type
Propertyprivate  $cvsRsh= ''

the CVS_RSH variable.

Details
Type
Propertyprivate  $default_command= 'checkout'
static

the default command.

Default valuecheckoutDetails
Type
Propertyprivate\File  $dest= ''

the directory where the checked out files should be placed.

Details
Type
\File
Propertyprivate  $error= ''
Details
Type
Propertyprivateboolean  $failOnError= 'false'

If true it will stop the build if cvs exits with error.

Default is false. (Iulian)

Default valuefalseDetails
Type
boolean
Propertyprivate  $noexec= 'false'

report only, don't change any files.

Default valuefalseDetails
Type
Propertyprivate  $output= ''
Details
Type
Propertyprivate\File  $passFile= 'null'

CVS password file

Default valuenullDetails
Type
\File
Propertyprivate  $port= '0'

CVS port

Default value0Details
Type
Propertyprivate  $quiet= 'false'

suppress information messages.

Default valuefalseDetails
Type

Methods

methodpublic  addConfiguredCommandline( \insertAtStart $c,  $insertAtStart = false ) :
Configures and adds the given Commandline.
Parameters
Name Type Description
$c \insertAtStart If true, c is
$insertAtStart
methodpublic  appendCommandArgument(  $arg ) :
This needs to be public to allow configuration of commands externally.
Parameters
Name Type Description
$arg
methodprotected  configureCommandline(  $c ) : string
Configure a commandline element for things like cvsRoot, quiet, etc.
Parameters
Name Type Description
$c
Returns
Type Description
string
methodpublic  getCommand( ) :
methodpublic  getCvsRoot( ) :
methodpublic  getCvsRsh( ) :
methodpublic  getDest( ) :
methodpublic  getModule( ) :
methodpublic  getPassFile( ) : \File
Returns
Type Description
\File
methodpublic  getPort( ) : int
Returns
Type Description
int
methodpublic  init( ) :
methodpublic  main( ) : void
Details
throws
methodprotected  removeCommandline(  $c ) :
Parameters
Name Type Description
$c
methodprotected  runCommand( \Commandline $toExecute ) :
Sets up the environment for toExecute and then runs it.
Parameters
Name Type Description
$toExecute \Commandline
Details
throws
methodpublic  setCommand( string $c ) :
The CVS command to execute.
Parameters
Name Type Description
$c string
methodpublic  setCompression( boolean $usecomp ) :
If true, this is the same as compressionlevel="3".
Parameters
Name Type Description
$usecomp boolean If true, turns on compression using default level, AbstractCvsTask.DEFAULT_COMPRESSION_LEVEL.
methodpublic  setCompressionLevel( int $level ) :
If set to a value 1-9 it adds -zN to the cvs command line, else it disables compression.
Parameters
Name Type Description
$level int
methodpublic  setCvsRoot( string $root ) :
The CVSROOT variable.
Parameters
Name Type Description
$root string
methodpublic  setCvsRsh(  $rsh ) :
The CVS_RSH variable.
Parameters
Name Type Description
$rsh rsh
methodpublic  setDate(  $p ) :
Use the most recent revision no later than the given date.
Parameters
Name Type Description
$p p
methodpublic  setDest( \PhingFile $dest ) :
The directory where the checked out files should be placed.
Parameters
Name Type Description
$dest \PhingFile
methodpublic  setError(  $f ) :
File to which error output should be written.
Parameters
Name Type Description
$f
methodpublic  setFailOnError( boolean $failOnError ) :
Stop the build process if the command exits with a return code other than 0.

Defaults to false.

Parameters
Name Type Description
$failOnError boolean
methodpublic  setModule(  $m ) :
The package/module to operate upon.
Parameters
Name Type Description
$m
methodpublic  setNoexec( boolean $ne ) :
If true, report only and don't change any files.
Parameters
Name Type Description
$ne boolean
methodpublic  setOutput(  $f ) :
File to which output should be written.
Parameters
Name Type Description
$f
methodpublic  setPassfile(  $passFile ) :
Password file to read passwords from.
Parameters
Name Type Description
$passFile passFile
methodpublic  setPort( int $port ) :
Port used by CVS to communicate with the server.
Parameters
Name Type Description
$port int
methodpublic  setQuiet( boolean $q ) :
If true, suppress informational messages.
Parameters
Name Type Description
$q boolean
methodpublic  setTag( string $p ) :
The tag of the package/module to operate upon.
Parameters
Name Type Description
$p string
Documentation was generated by DocBlox 0.13.1.