# tasks/system/CvsTask.php

## \CvsTask
jump to top

Package: phing\tasks\system

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.

Parent(s)
  \Task < \ProjectComponent
Author
  Hans Lellelid (Phing)
Author
  costin@dnt.ro (Ant)
Author
  stefano@apache.org (Ant)
Author
  Wolfgang Werner (Ant)
Author
  Kevin Ross (Ant)
Version
  $Revision: 1311 $

### Constants

`DEFAULT_COMPRESSION_LEVEL = 3`

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

### Properties

`$cmd= ''`
Details

Type
  n/a

`$command= 'null'`

the CVS command to execute.

Default value `null` Details

Type
  n/a

`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
  n/a

`$cvsModule= ''`

the package/module to check out.

Details

Type
  n/a

`$cvsRoot= ''`

the CVSROOT variable.

Details

Type
  n/a

`$cvsRsh= ''`

the CVS_RSH variable.

Details

Type
  n/a

`$default_command= '"checkout"'`
static

the default command.

Default value`"checkout"`Details

Type
  n/a

`\File $dest= ''`

the directory where the checked out files should be placed.

Details

Type
  \File

`$error= ''`
Details

Type
  n/a

`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
  n/a

`$output= ''`
Details

Type
  n/a

`\File $passFile= 'null'`

CVS password file

Default value `null` Details

Type
  \File

`$port= '0'`

CVS port

Default value `0` Details

Type
  n/a

`$quiet= 'false'`

suppress information messages.

Default value `false` Details

Type
  n/a

### Methods

`addConfiguredCommandline( \insertAtStart $c, $insertAtStart = false ) : void`

Configures and adds the given Commandline.

Parameters

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

`appendCommandArgument( $arg ) : void`

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( ) : void`

`getCvsRoot( ) : void`

`getCvsRsh( ) : void`

`getDescription( ) : void`

`getDest( ) : void`

`getLocation( ) : void`

`getModule( ) : void`

`getOwningTarget( ) : void`

`getPassFile( ) : \File`

Returns

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

`getPort( ) : int`

Returns

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

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`log( ) : void`

`main( ) : void`

Throws

Exception | Description
--- | ---
\BuildException |

`maybeConfigure( ) : void`

`perform( ) : void`

`removeCommandline( $c ) : void`

Parameters

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

`runCommand( \Commandline $toExecute ) : void`

Sets up the environment for toExecute and then runs it.

Parameters

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

Throws

Exception | Description
--- | ---
\BuildException |

`setCommand( string $c ) : void`

The CVS command to execute.

Parameters

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

`setCompression( boolean $usecomp ) : void`

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 ) : void`

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 ) : void`

The CVSROOT variable.

Parameters

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

`setCvsRsh( $rsh ) : void`

The CVS_RSH variable.

Parameters

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

`setDate( $p ) : void`

Use the most recent revision no later than the given date.

Parameters

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

`setDescription( ) : void`

`setDest( \PhingFile $dest ) : void`

The directory where the checked out files should be placed.

Parameters

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

`setError( $f ) : void`

File to which error output should be written.

Parameters

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

`setFailOnError( boolean $failOnError ) : void`

Stop the build process if the command exits with a return code other than 0.

Defaults to false.

Parameters

Name | Type | Description
--- | --- | ---
$failOnError | boolean |

`setLocation( ) : void`

`setModule( $m ) : void`

The package/module to operate upon.

Parameters

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

`setNoexec( boolean $ne ) : void`

If true, report only and don't change any files.

Parameters

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

`setOutput( $f ) : void`

File to which output should be written.

Parameters

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

`setOwningTarget( ) : void`

`setPassfile( $passFile ) : void`

Password file to read passwords from.

Parameters

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

`setPort( int $port ) : void`

Port used by CVS to communicate with the server.

Parameters

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

`setProject( ) : void`

`setQuiet( boolean $q ) : void`

If true, suppress informational messages.

Parameters

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

`setRuntimeConfigurableWrapper( ) : void`

`setTag( string $p ) : void`

The tag of the package/module to operate upon.

Parameters

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

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.