# classes/phing/tasks/system/CvsTask.php

## \CvsTask
jump to top

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 <hans@xmpl.org> (Phing)
author
  costin@dnt.ro (Ant)
author
  stefano@apache.org (Ant)
author
  Wolfgang Werner <wwerner@picturesafe.de> (Ant)
author
  Kevin Ross <kevin.ross@bredex.com> (Ant)
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 526 $

### Constants

`DEFAULT_COMPRESSION_LEVEL = '3'`

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

### Properties

`$cmd= ''`
Details

Type

`$command= 'null'`

the CVS command to execute.

Default value `null` Details

Type

`array $commandlines= 'array'`

List of Commandline children

Commandline[]
Default value `array` Details

Type
  array

`$compression= '0'`

compression level to use.

Default value `0` Details

Type

`$cvsModule= ''`

the package/module to check out.

Details

Type

`$cvsRoot= ''`

the CVSROOT variable.

Details

Type

`$cvsRsh= ''`

the CVS_RSH variable.

Details

Type

`$default_command= 'checkout'`
static

the default command.

Default value `checkout` Details

Type

`\File $dest= ''`

the directory where the checked out files should be placed.

Details

Type
  \File

`$error= ''`
Details

Type

`boolean $failOnError= 'false'`

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

Default is false. (Iulian)

Default value `false` Details

Type
  boolean

`$noexec= 'false'`

report only, don't change any files.

Default value `false` Details

Type

`$output= ''`
Details

Type

`\File $passFile= 'null'`

CVS password file

Default value `null` Details

Type
  \File

`$port= '0'`

CVS port

Default value `0` Details

Type

`$quiet= 'false'`

suppress information messages.

Default value `false` Details

Type

### Methods

`addConfiguredCommandline( \insertAtStart $c, $insertAtStart = false ) :`
Configures and adds the given Commandline.
Parameters

Name | Type | Description
--- | --- | ---
$c | \insertAtStart | If true, c is
$insertAtStart |  |

`appendCommandArgument( $arg ) :`
This needs to be public to allow configuration of commands externally.
Parameters

Name | Type | Description
--- | --- | ---
$arg |  |

`configureCommandline( $c ) : string`
Configure a commandline element for things like cvsRoot, quiet, etc.
Parameters

Name | Type | Description
--- | --- | ---
$c |  |

Returns

Type | Description
--- | ---
string |

`getCommand( ) :`
`getCvsRoot( ) :`
`getCvsRsh( ) :`
`getDest( ) :`
`getModule( ) :`
`getPassFile( ) : \File`
Returns

Type | Description
--- | ---
\File |

`getPort( ) : int`
Returns

Type | Description
--- | ---
int |

`init( ) :`
`main( ) : void`
Details

throws

`removeCommandline( $c ) :`
Parameters

Name | Type | Description
--- | --- | ---
$c |  |

`runCommand( \Commandline $toExecute ) :`
Sets up the environment for toExecute and then runs it.
Parameters

Name | Type | Description
--- | --- | ---
$toExecute | \Commandline |

Details

throws

`setCommand( string $c ) :`
The CVS command to execute.
Parameters

Name | Type | Description
--- | --- | ---
$c | string |

`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.

`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 |

`setCvsRoot( string $root ) :`
The CVSROOT variable.
Parameters

Name | Type | Description
--- | --- | ---
$root | string |

`setCvsRsh( $rsh ) :`
The CVS_RSH variable.
Parameters

Name | Type | Description
--- | --- | ---
$rsh |  | rsh

`setDate( $p ) :`
Use the most recent revision no later than the given date.
Parameters

Name | Type | Description
--- | --- | ---
$p |  | p

`setDest( \PhingFile $dest ) :`
The directory where the checked out files should be placed.
Parameters

Name | Type | Description
--- | --- | ---
$dest | \PhingFile |

`setError( $f ) :`
File to which error output should be written.
Parameters

Name | Type | Description
--- | --- | ---
$f |  |

`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 |

`setModule( $m ) :`
The package/module to operate upon.
Parameters

Name | Type | Description
--- | --- | ---
$m |  |

`setNoexec( boolean $ne ) :`
If true, report only and don't change any files.
Parameters

Name | Type | Description
--- | --- | ---
$ne | boolean |

`setOutput( $f ) :`
File to which output should be written.
Parameters

Name | Type | Description
--- | --- | ---
$f |  |

`setPassfile( $passFile ) :`
Password file to read passwords from.
Parameters

Name | Type | Description
--- | --- | ---
$passFile |  | passFile

`setPort( int $port ) :`
Port used by CVS to communicate with the server.
Parameters

Name | Type | Description
--- | --- | ---
$port | int |

`setQuiet( boolean $q ) :`
If true, suppress informational messages.
Parameters

Name | Type | Description
--- | --- | ---
$q | boolean |

`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.