[Pkg-symfony-commits] [SCM] Phing repository under the pkg-symfony Debian group branch, master, updated. upstream/2.4.1-8-gfa8ee43
Nicolas Roudaire
nikrou77 at gmail.com
Sun Mar 6 19:34:47 UTC 2011
The following commit has been merged in the master branch:
commit b8c77d0af04461e7d503e3e5eb13ef68f4ad95f4
Author: Nicolas Roudaire <nikrou77 at gmail.com>
Date: Sat Mar 5 21:44:31 2011 +0100
Imported Upstream version 2.4.5
diff --git a/.buildpath b/.buildpath
new file mode 100644
index 0000000..b9daa88
--- /dev/null
+++ b/.buildpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<buildpath>
+ <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
+ <buildpathentry kind="src" path="bin"/>
+ <buildpathentry kind="src" path="classes/phing"/>
+ <buildpathentry kind="src" path="test"/>
+</buildpath>
diff --git a/.project b/.project
new file mode 100644
index 0000000..52ce256
--- /dev/null
+++ b/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Phing Trunk</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.dltk.core.scriptbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.php.core.PHPNature</nature>
+ </natures>
+</projectDescription>
diff --git a/.settings/org.eclipse.php.core.prefs b/.settings/org.eclipse.php.core.prefs
new file mode 100644
index 0000000..90650a5
--- /dev/null
+++ b/.settings/org.eclipse.php.core.prefs
@@ -0,0 +1,5 @@
+#Fri Oct 29 17:43:13 CEST 2010
+eclipse.preferences.version=1
+include_path=0;/Phing Trunk
+org.eclipse.php.core.phpForamtterIndentationSize=4
+org.eclipse.php.core.phpForamtterUseTabs=false
diff --git a/.settings/org.eclipse.php.ui.prefs b/.settings/org.eclipse.php.ui.prefs
new file mode 100644
index 0000000..5188332
--- /dev/null
+++ b/.settings/org.eclipse.php.ui.prefs
@@ -0,0 +1,3 @@
+#Fri Oct 29 17:43:13 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.php.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
diff --git a/CHANGELOG b/CHANGELOG
index 7d74eaa..56286f6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,87 @@
_________________________
P H I N G
+Mar. 3, 2011 - Phing 2.4.5
+
+This release fixes several issues, and reverts the changes
+that introduced the ComponentHelper class.
+
+[657] Wrong example of creating task in stable documentation.
+[656] Many erratas on the "Getting Started"-page.
+[651] Messages of ReplaceTokens should be verbose
+[641] 2.4.4 packages contains .rej and .orig files in release tarball
+[640] "phing -q" does not work: "Unknown argument: -q"
+[634] php print() statement outputting to stdout
+[624] PDOSQLExec fails with Fatal error: Class 'LogWriter' not found in [...]/PDOSQLExecFormatterElement
+[623] 2.4.5RC1 requires PHPUnit erroneously
+[621] PhpLintTask outputs all messages (info and errors) to same loglevel
+[614] phpcodesniffer task changes Phing build working directory
+[610] BUG: AdhocTaskdefTask fails when creating a task that extends from an existing task
+[607] v 2.4.4 broke taskdef for tasks following PEAR naming standard
+[603] Add support to PostgreSQL in DbDeployTask
+[601] Add HTTP_Request2 to optional dependencies
+[600] typo in ReplaceRegexpTask
+[598] Wrong version for optional Services_Amazon_S3 dependency
+[596] PhpDependTask no more compatible with PDepend since 0.10RC1
+[593] Ssh/scp task: Move ssh2_connect checking from init to main
+[564] command line "-D" switch not handled correctly under windows
+[544] Wrong file set when exclude test/**/** is used
+
+Dec. 2, 2010 - Phing 2.4.4
+
+This release fixes several issues.
+
+[595] FilterChain without ReplaceTokensWithFile creator
+[594] Taskdef in phing 2.4.3 was broken!
+[590] PhpLintTask don't flag files that can't be parsed as bad files
+[589] Mail Task don't show recipients list on log
+[588] Add (optional) dependency to VersionControl_Git and Services_Amazon_S3 packages
+[585] Same line comments in property files are included in the property value
+[570] XmlLintTask - check well-formedness only
+[568] Boolean properties get incorrectly expanded
+[544] Wrong file set when exclude test/**/** is used
+[536] DbDeployTask: Undo script wrongly generated
+
+Nov. 12, 2010 - Phing 2.4.3
+
+This release adds tasks to interface with Git and Amazon S3, adds support for PHPUnit 3.5,
+and fixes numerous issues.
+
+[583] UnixFileSystem::compare() is broken
+[582] Add haltonerror attribute to copy/move tasks
+[581] XmlProperty creating wrong properties
+[577] SVN commands fail on Windows XP
+[575] xmlproperty - misplaced xml attributes
+[574] Task "phpcodesniffer" broken, no output
+[572] ImportTask don't skipp file if optional is set to true
+[560] [PATCH] Compatibility with PHPUnit 3.5.
+[559] UpToDate not override value of property when target is called by phingcall
+[555] STRICT Declaration of UnixFileSystem::getBooleanAttributes() should be compatible with that of FileSystem::getBooleanAttributes()
+[554] Patch to force PhpDocumentor to log using phing
+[551] SVN Switch Task
+[550] Ability to convert encoding of files
+[549] ScpTask doesn't finish the transfer properly
+[547] The new attribute version does not work
+[543] d51PearPkg2Task: Docs link wrong
+[542] JslLintTask: wrap conf parameter with escapeshellarg
+[537] Install documentation incorrect/incomplete
+[536] DbDeployTask: Undo script wrongly generated
+[534] Task for downloading a file through HTTP
+[531] cachefile parameter of PhpLintTask also caches erroneous files
+[530] XmlLintTask does not stop buid process when schema validation fails
+[529] d51pearpkg2: setOptions() call does not check return value
+[526] pearpkg2: extdeps and replacements mappings not documented
+[525] pearpkg2: minimal version on dependency automatically set max and recommended
+[524] pearpkg2: maintainers mapping does not support "active" tag
+[520] Need SvnLastChangedRevisionTask to grab the last changed revision for the current working directory
+[518] [PHP Error] file_put_contents(): Filename cannot be empty in phpcpdesniffer task
+[513] Version tag doesn't increment bugfix portion of the version
+[511] Properties not being set on subsequent sets.
+[510] to show test name when testing fails
+[501] formatter type "clover" of task "phpunit" doesn't generate coverage according to task "coverage-setup"
+[488] FtpDeployTask is very silent, error messages are not clear
+[455] Should be able to ignore a task when listing them from CLI
+[369] Add Git Support
Jul. 28, 2010 - Phing 2.4.2
@@ -485,4 +566,4 @@ March 06 2003 - Phing 1.0-rc1
October 15 2002 - Phing 1.0-pre1
* Initial pre-release
---$Id: CHANGELOG 804 2010-07-27 12:21:41Z mrook $
+--$Id: CHANGELOG 1059 2011-03-03 20:18:27Z mrook $
diff --git a/CREDITS b/CREDITS
index c8a9f50..fd1d771 100644
--- a/CREDITS
+++ b/CREDITS
@@ -28,6 +28,7 @@
Knut Urdalen <knut.urdalen at gmail.com>
Mike Wittje <mw at mike.wittje.de>
Benjamin Schultz <bschultz at proqrent.de>
+ Andrei Serdeliuc <andrei at serdeliuc.ro>
If you've done work on phing and you are not listed here, please feel free
to add yourself.
@@ -62,4 +63,4 @@
(c) Josh Barger <joshb at npt.com>
http://phpclasses.upperdesign.com/browse.html/package/529.html
- --$Id: CREDITS 723 2010-02-10 23:26:55Z bschultz $
+ --$Id: CREDITS 944 2010-10-21 00:07:19Z extraordinaire $
diff --git a/UPGRADE b/UPGRADE
deleted file mode 100755
index 27086f5..0000000
--- a/UPGRADE
+++ /dev/null
@@ -1,56 +0,0 @@
- _________________________
- P H I N G
-
-
-
- Upgrading to 2.4.0
- ------------------
-
- This release of Phing contains numerous significant enhancements over
- previous versions, such as new tasks (SSH, SCP, JsMin, SVN and many
- more), documentation fixes and various bug fixes.
-
- There were also some changes that might break backwards compatibility,
- or change the behavior of Phing in such a way that requires changes
- to your build file(s).
-
- Backwards compatibility
- -----------------------
-
- This release drops or introduces functionality, which may have
- impact on your build process and require changes to your build files:
-
- * The way the "basedir" attribute (part of the "project" element in
- a build file) has changed. Phing now uses the current directory
- (getcwd()) to resolve relative base directories (such as ".").
- When the attribute is not present, the parent directory of the
- build file is used instead.
-
- * PHPUnit2 compatibility is dropped, Phing now requires at least
- PHPUnit 3.4 to run tests
-
- * The way Phing treats symbolic links was changed. Phing now considers
- symbolic links to be files, regardless of whether they point to an
- existing file or directory. Consequently, directory operations on
- symbolic links will fail.
-
- * By default, Phing no longer automatically de-references symbolic
- links. In other words, the CopyTask will now copy symbolic links
- "as is", not duplicate the contents as with previous versions of Phing.
-
- To emulate the old behavior, the <fileset> element now accepts the
- boolean argument 'expandsymboliclinks'.
-
- PEAR package
- ------------
-
- This release splits the PEAR package in two packages, the existing
- 'phing' and the new (and optional) 'phingdocs'. The latter package
- is listed as an optional dependency in the 'phing' package, and allows
- installation on deployment/production machines without the additional
- footprint of the documentation.
-
- More information
- ----------------
-
- For more information, please refer to the 'CHANGELOG' file.
diff --git a/bin/phing b/bin/phing
old mode 100755
new mode 100644
diff --git a/classes/phing/IntrospectionHelper.php b/classes/phing/IntrospectionHelper.php
index 9bc5550..195179d 100644
--- a/classes/phing/IntrospectionHelper.php
+++ b/classes/phing/IntrospectionHelper.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: IntrospectionHelper.php 611 2009-10-25 13:55:11Z mrook $
+ * $Id: IntrospectionHelper.php 930 2010-10-13 19:03:28Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -36,8 +36,8 @@ include_once 'phing/util/StringHelper.php';
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @copyright © 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 611 $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 930 $
* @package phing
*/
class IntrospectionHelper {
@@ -178,7 +178,7 @@ class IntrospectionHelper {
} elseif (strpos($name, "create") === 0) {
- if (count($method->getParameters()) > 0) {
+ if ($method->getNumberOfRequiredParameters() > 0) {
throw new BuildException($method->getDeclaringClass()->getName()."::".$method->getName()."() may not take any parameters.");
}
diff --git a/classes/phing/Phing.php b/classes/phing/Phing.php
index b6270a2..052e371 100644
--- a/classes/phing/Phing.php
+++ b/classes/phing/Phing.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: Phing.php 790 2010-06-21 07:53:50Z mrook $
+ * $Id: Phing.php 1040 2011-02-22 22:44:40Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -58,7 +58,7 @@ include_once 'phing/system/util/Register.php';
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 790 $
+ * @version $Revision: 1040 $
* @package phing
*/
class Phing {
@@ -296,7 +296,7 @@ class Phing {
// 2) Next pull out stand-alone args.
// Note: The order in which these are executed is important (if multiple of these options are specified)
- if (false !== ($key = array_search('-quiet', $args, true))) {
+ if (false !== ($key = array_search('-quiet', $args, true)) || false !== ($key = array_search('-q', $args, true))) {
self::$msgOutputLevel = Project::MSG_WARN;
unset($args[$key]);
}
@@ -362,7 +362,7 @@ class Phing {
if ($posEq !== false) {
$value = substr($name, $posEq+1);
$name = substr($name, 0, $posEq);
- } elseif ($i < count($args)-1 && !StringHelper::startsWith("-D", $arg)) {
+ } elseif ($i < count($args)-1 && !StringHelper::startsWith("-D", $args[$i + 1])) {
$value = $args[++$i];
}
self::$definedProps->setProperty($name, $value);
@@ -877,6 +877,9 @@ class Phing {
foreach($targets as $currentTarget) {
$targetName = $currentTarget->getName();
$targetDescription = $currentTarget->getDescription();
+ if ($currentTarget->isHidden()) {
+ continue;
+ }
// subtargets are targets w/o descriptions
if ($targetDescription === null) {
diff --git a/classes/phing/Project.php b/classes/phing/Project.php
index 7968b8d..b774d1e 100644
--- a/classes/phing/Project.php
+++ b/classes/phing/Project.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: Project.php 791 2010-06-21 07:56:06Z mrook $
+ * $Id: Project.php 1014 2010-12-17 20:51:26Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -34,7 +34,7 @@ include_once 'phing/input/DefaultInputHandler.php';
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 791 $
+ * @version $Revision: 1014 $
* @package phing
*/
class Project {
@@ -544,7 +544,7 @@ class Project {
}
}
- function &getTaskDefinitions() {
+ function getTaskDefinitions() {
return $this->taskdefs;
}
diff --git a/classes/phing/RuntimeConfigurable.php b/classes/phing/RuntimeConfigurable.php
index 74a92ab..698c19d 100644
--- a/classes/phing/RuntimeConfigurable.php
+++ b/classes/phing/RuntimeConfigurable.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: RuntimeConfigurable.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: RuntimeConfigurable.php 829 2010-08-25 15:14:53Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,7 +28,7 @@
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 526 $
+ * @version $Revision: 829 $
* @package phing
*/
class RuntimeConfigurable {
@@ -95,8 +95,6 @@ class RuntimeConfigurable {
$id = $this->attributes["id"];
}
- $this->attributes = null;
-
if ($this->characters) {
ProjectConfigurator::addText($project, $this->wrappedObject, (string) $this->characters);
$this->characters="";
diff --git a/classes/phing/Target.php b/classes/phing/Target.php
index fc7844c..d900abb 100644
--- a/classes/phing/Target.php
+++ b/classes/phing/Target.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: Target.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: Target.php 915 2010-10-12 02:30:52Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,8 +26,8 @@ include_once 'phing/TaskContainer.php';
* abstract class {@link TaskContainer}
*
* @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 915 $ $Date: 2010-10-12 04:30:52 +0200 (Tue, 12 Oct 2010) $
* @access public
* @see TaskContainer
* @package phing
@@ -52,6 +52,12 @@ class Target implements TaskContainer {
/** description of this target */
private $description;
+
+ /**
+ * Whether to hide target in targets list (-list -p switches)
+ * @var boolean
+ */
+ private $hidden = false;
/** reference to project */
private $project;
@@ -132,6 +138,37 @@ class Target implements TaskContainer {
}
/**
+ * Set target status. If true, target does not come in phing -list
+ *
+ * @return Target
+ */
+ public function setHidden($flag)
+ {
+ $this->hidden = (boolean) $flag;
+ return $this;
+ }
+
+ /**
+ * Get target status. If true, target does not come in phing -list
+ *
+ * @return boolean
+ */
+ public function getHidden()
+ {
+ return $this->hidden;
+ }
+
+ /**
+ * Alias for getHidden()
+ *
+ * @return boolean
+ */
+ public function isHidden()
+ {
+ return $this->getHidden();
+ }
+
+ /**
* Adds a task element to the list of this targets child elements
*
* @param object The task object to add
diff --git a/classes/phing/Task.php b/classes/phing/Task.php
index 0f8ac76..e24b0ce 100644
--- a/classes/phing/Task.php
+++ b/classes/phing/Task.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: Task.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: Task.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,8 +28,8 @@ include_once 'phing/RuntimeConfigurable.php';
* Use {@link Project#createTask} to register a new Task.
*
* @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $
* @see Project#createTask()
* @package phing
*/
diff --git a/classes/phing/filters/IconvFilter.php b/classes/phing/filters/IconvFilter.php
new file mode 100644
index 0000000..cade77b
--- /dev/null
+++ b/classes/phing/filters/IconvFilter.php
@@ -0,0 +1,155 @@
+<?php
+
+/*
+ * $Id: IconvFilter.php 868 2010-09-19 21:18:02Z alexeyshockov $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+*/
+
+include_once 'phing/filters/BaseParamFilterReader.php';
+include_once 'phing/filters/ChainableReader.php';
+
+/**
+ * Encode data from <code>in</code> encoding to <code>out</code> encoding.
+ *
+ * Example:
+ * <pre>
+ * <iconvfilter inputencoding="UTF-8" outputencoding="CP1251" />
+ * </pre>
+ * Or:
+ * <pre>
+ * <filterreader classname="phing.filters.IconvFilter">
+ * <param name="inputencoding" value="UTF-8" />
+ * <param name="outputencoding" value="CP1251" />
+ * </filterreader>
+ * </pre>
+ *
+ * @author Alexey Shockov, <alexey at shockov.com>
+ * @version $Revision: 868 $
+ * @package phing.filters
+ */
+class IconvFilter
+ extends BaseParamFilterReader
+ implements ChainableReader {
+
+ private $_inputEncoding;
+
+ private $_outputEncoding;
+
+ /**
+ * Returns first n lines of stream.
+ * @return the resulting stream, or -1
+ * if the end of the resulting stream has been reached
+ *
+ * @exception IOException if the underlying stream throws an IOException
+ * during reading
+ */
+ function read($len = null) {
+ $this->_initialize();
+
+ // Process whole text at once.
+ $text = null;
+ while (($data = $this->in->read($len)) !== -1) {
+ $text .= $data;
+ }
+
+ // At the end.
+ if (null === $text) {
+ return -1;
+ }
+
+ $this->log(
+ "Encoding " . $this->in->getResource() . " from " . $this->getInputEncoding() . " to " . $this->getOutputEncoding(),
+ Project::MSG_VERBOSE
+ );
+
+ return iconv($this->_inputEncoding, $this->_outputEncoding, $text);
+ }
+
+ /**
+ *
+ * @param string $encoding Input encoding.
+ */
+ public function setInputEncoding($encoding) {
+ $this->_inputEncoding = $encoding;
+ }
+
+ /**
+ *
+ * @return string
+ */
+ public function getInputEncoding() {
+ return $this->_inputEncoding;
+ }
+
+ /**
+ *
+ * @param string $encoding Output encoding.
+ */
+ public function setOutputEncoding($encoding) {
+ $this->_outputEncoding = $encoding;
+ }
+
+ /**
+ *
+ * @return string
+ */
+ public function getOutputEncoding() {
+ return $this->_outputEncoding;
+ }
+
+ /**
+ * Creates a new IconvFilter using the passed in Reader for instantiation.
+ *
+ * @param object A Reader object providing the underlying stream. Must not be <code>null</code>.
+ *
+ * @return object A new filter based on this configuration, but filtering the specified reader.
+ */
+ function chain(Reader $reader) {
+ $filter = new self($reader);
+
+ $filter->setInputEncoding($this->getInputEncoding());
+ $filter->setOutputEncoding($this->getOutputEncoding());
+
+ $filter->setInitialized(true);
+ $filter->setProject($this->getProject());
+
+ return $filter;
+ }
+
+ /**
+ * Configuring object from the parameters list.
+ */
+ private function _initialize() {
+ if ($this->getInitialized()) {
+ return;
+ }
+
+ $params = $this->getParameters();
+ if ($params !== null) {
+ foreach ($params as $param) {
+ if ('in' == $param->getName()) {
+ $this->setInputEncoding($param->getValue());
+ } else if ('out' == $param->getName()) {
+ $this->setOutputEncoding($param->getValue());
+ }
+ }
+ }
+
+ $this->setInitialized(true);
+ }
+}
diff --git a/classes/phing/filters/ReplaceTokens.php b/classes/phing/filters/ReplaceTokens.php
index 71c4fce..ee7c26e 100644
--- a/classes/phing/filters/ReplaceTokens.php
+++ b/classes/phing/filters/ReplaceTokens.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: ReplaceTokens.php 664 2009-12-16 18:40:44Z mrook $
+ * $Id: ReplaceTokens.php 1039 2011-02-20 19:19:21Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -43,7 +43,7 @@ include_once 'phing/filters/ChainableReader.php';
*
* @author <a href="mailto:yl at seasonfive.com">Yannick Lecaillez</a>
* @author hans lellelid, hans at velum.net
- * @version $Revision: 664 $ $Date: 2009-12-16 19:40:44 +0100 (Wed, 16 Dec 2009) $
+ * @version $Revision: 1039 $ $Date: 2011-02-20 20:19:21 +0100 (Sun, 20 Feb 2011) $
* @access public
* @see BaseParamFilterReader
* @package phing.filters
@@ -142,7 +142,7 @@ class ReplaceTokens extends BaseParamFilterReader implements ChainableReader {
$replaceWith = $this->_beginToken . $key . $this->_endToken;
$this->log("No token defined for key \"".$this->_beginToken . $key . $this->_endToken."\"");
} else {
- $this->log("Replaced \"".$this->_beginToken . $key . $this->_endToken ."\" with \"".$replaceWith."\"");
+ $this->log("Replaced \"".$this->_beginToken . $key . $this->_endToken ."\" with \"".$replaceWith."\"", Project::MSG_VERBOSE);
}
return $replaceWith;
diff --git a/classes/phing/filters/ReplaceTokensWithFile.php b/classes/phing/filters/ReplaceTokensWithFile.php
index d38911b..7db682a 100644
--- a/classes/phing/filters/ReplaceTokensWithFile.php
+++ b/classes/phing/filters/ReplaceTokensWithFile.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: ReplaceTokensWithFile.php 770 2010-04-21 14:21:36Z mrook $
+ * $Id: ReplaceTokensWithFile.php 1002 2010-11-24 11:21:48Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -48,7 +48,7 @@ include_once 'phing/filters/ChainableReader.php';
* </filterreader></pre>
*
* @author johan persson, johanp at aditus.nu
- * @version $Id: ReplaceTokensWithFile.php 770 2010-04-21 14:21:36Z mrook $
+ * @version $Id: ReplaceTokensWithFile.php 1002 2010-11-24 11:21:48Z mrook $
* @access public
* @see ReplaceTokensWithFile
* @package phing.filters
@@ -128,6 +128,13 @@ class ReplaceTokensWithFile extends BaseParamFilterReader implements ChainableRe
}
/**
+ * Returns the drectory where to look for the files to use for token replacement
+ */
+ function getTranslateHTML() {
+ return $this->_translatehtml;
+ }
+
+ /**
* Sets the drectory where to look for the files to use for token replacement
*
* @param string $dir
@@ -137,6 +144,13 @@ class ReplaceTokensWithFile extends BaseParamFilterReader implements ChainableRe
}
/**
+ * Returns the drectory where to look for the files to use for token replacement
+ */
+ function getDir() {
+ return $this->_dir;
+ }
+
+ /**
* Sets the prefix that is prepended to the token in order to create the file
* name. For example if the token is 01 and the prefix is "example" then
* the filename to look for will be "example01"
@@ -147,6 +161,15 @@ class ReplaceTokensWithFile extends BaseParamFilterReader implements ChainableRe
$this->_prefix = (string) $prefix;
}
+ /*
+ * Returns the prefix that is prepended to the token in order to create the file
+ * name. For example if the token is 01 and the prefix is "example" then
+ * the filename to look for will be "example01"
+ */
+ function getPrefix() {
+ return $this->_prefix;
+ }
+
/**
* Sets the postfix that is added to the token in order to create the file
* name. For example if the token is 01 and the postfix is ".php" then
@@ -159,6 +182,15 @@ class ReplaceTokensWithFile extends BaseParamFilterReader implements ChainableRe
}
/**
+ * Returns the postfix that is added to the token in order to create the file
+ * name. For example if the token is 01 and the postfix is ".php" then
+ * the filename to look for will be "01.php"
+ */
+ function getPostfix() {
+ return $this->_postfix;
+ }
+
+ /**
* Sets the "begin token" character.
*
* @param string $beginToken the character used to denote the beginning of a token.
@@ -277,6 +309,9 @@ class ReplaceTokensWithFile extends BaseParamFilterReader implements ChainableRe
function chain(Reader $reader) {
$newFilter = new ReplaceTokensWithFile($reader);
$newFilter->setProject($this->getProject());
+ $newFilter->setTranslateHTML($this->getTranslateHTML());
+ $newFilter->setDir($this->getDir());
+ $newFilter->setPrefix($this->getPrefix());
$newFilter->setBeginToken($this->getBeginToken());
$newFilter->setEndToken($this->getEndToken());
$newFilter->setInitialized(true);
diff --git a/classes/phing/listener/DefaultLogger.php b/classes/phing/listener/DefaultLogger.php
index 9db68bf..60ccf30 100644
--- a/classes/phing/listener/DefaultLogger.php
+++ b/classes/phing/listener/DefaultLogger.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: DefaultLogger.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: DefaultLogger.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -29,8 +29,8 @@ include_once 'phing/BuildEvent.php';
* any messages that get logged.
*
* @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $ $Date: 2010-10-12 03:08:31 +0200 (Tue, 12 Oct 2010) $
* @see BuildEvent
* @package phing.listener
*/
diff --git a/classes/phing/listener/NoBannerLogger.php b/classes/phing/listener/NoBannerLogger.php
index 03658f0..060d6d3 100644
--- a/classes/phing/listener/NoBannerLogger.php
+++ b/classes/phing/listener/NoBannerLogger.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: NoBannerLogger.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: NoBannerLogger.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,8 +25,8 @@ require_once 'phing/listener/DefaultLogger.php';
* Extends DefaultLogger to strip out empty targets.
*
* @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $ $Date: 2010-10-12 03:08:31 +0200 (Tue, 12 Oct 2010) $
* @package phing.listener
*/
class NoBannerLogger extends DefaultLogger {
diff --git a/classes/phing/listener/defaults.properties b/classes/phing/listener/defaults.properties
old mode 100755
new mode 100644
diff --git a/classes/phing/parser/AbstractSAXParser.php b/classes/phing/parser/AbstractSAXParser.php
index 124712b..1f9d7a5 100644
--- a/classes/phing/parser/AbstractSAXParser.php
+++ b/classes/phing/parser/AbstractSAXParser.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: AbstractSAXParser.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: AbstractSAXParser.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -27,8 +27,8 @@
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $
* @package phing.parser
*/
abstract class AbstractSAXParser {
diff --git a/classes/phing/parser/ProjectConfigurator.php b/classes/phing/parser/ProjectConfigurator.php
old mode 100755
new mode 100644
index caf7783..4a025f5
--- a/classes/phing/parser/ProjectConfigurator.php
+++ b/classes/phing/parser/ProjectConfigurator.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ProjectConfigurator.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: ProjectConfigurator.php 1000 2010-11-24 10:28:55Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -33,9 +33,9 @@ include_once 'phing/IntrospectionHelper.php';
* This class handles the occurance of registered datatype tags like
* FileSet
*
- * @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $
+ * @author Andreas Aderhold <andi at binarycloud.com>
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 1000 $ $Date: 2010-11-24 11:28:55 +0100 (wo, 24 nov 2010) $
* @access public
* @package phing.parser
*/
@@ -355,7 +355,18 @@ class ProjectConfigurator {
} else {
self::$propReplaceProject->log('Property ${'.$propertyName.'} => ' . self::$propReplaceProperties[$propertyName], Project::MSG_DEBUG);
}
- return self::$propReplaceProperties[$propertyName];
+
+ $propertyValue = self::$propReplaceProperties[$propertyName];
+
+ if (is_bool($propertyValue)) {
+ if ($propertyValue === true) {
+ $propertyValue = "true";
+ } else {
+ $propertyValue = "false";
+ }
+ }
+
+ return $propertyValue;
}
/**
diff --git a/classes/phing/parser/TargetHandler.php b/classes/phing/parser/TargetHandler.php
index af9e2e0..62b0a2d 100644
--- a/classes/phing/parser/TargetHandler.php
+++ b/classes/phing/parser/TargetHandler.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: TargetHandler.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: TargetHandler.php 914 2010-10-12 02:27:34Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -29,7 +29,7 @@ require_once 'phing/parser/AbstractHandler.php';
*
* @author Andreas Aderhold <andi at binarycloud.com>
* @copyright 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 526 $
+ * @version $Revision: 914 $
* @package phing.parser
*/
class TargetHandler extends AbstractHandler {
@@ -82,6 +82,7 @@ class TargetHandler extends AbstractHandler {
$unlessCond = null;
$id = null;
$description = null;
+ $isHidden = false;
foreach($attrs as $key => $value) {
if ($key==="name") {
@@ -94,6 +95,8 @@ class TargetHandler extends AbstractHandler {
$unlessCond = (string) $value;
} else if ($key==="id") {
$id = (string) $value;
+ } else if ($key==="hidden") {
+ $isHidden = ($value == 'true' || $value == '1') ? true : false;
} else if ($key==="description") {
$description = (string)$value;
} else {
@@ -116,6 +119,7 @@ class TargetHandler extends AbstractHandler {
$this->target = new Target();
$this->target->setName($name);
+ $this->target->setHidden($isHidden);
$this->target->setIf($ifCond);
$this->target->setUnless($unlessCond);
$this->target->setDescription($description);
diff --git a/classes/phing/parser/TaskHandler.php b/classes/phing/parser/TaskHandler.php
old mode 100755
new mode 100644
index 35b0ad1..6f17da3
--- a/classes/phing/parser/TaskHandler.php
+++ b/classes/phing/parser/TaskHandler.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: TaskHandler.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: TaskHandler.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,9 +28,9 @@ include_once 'phing/UnknownElement.php';
* nested tags (datatypes and tasks) that may be unknown off bat and are
* initialized on the fly.
*
- * @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $
+ * @author Andreas Aderhold <andi at binarycloud.com>
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $
* @package phing.parser
*/
class TaskHandler extends AbstractHandler {
diff --git a/classes/phing/system/io/FileSystem.php b/classes/phing/system/io/FileSystem.php
index 1d38867..002fa17 100644
--- a/classes/phing/system/io/FileSystem.php
+++ b/classes/phing/system/io/FileSystem.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: FileSystem.php 761 2010-04-11 13:35:59Z mrook $
+ * $Id: FileSystem.php 909 2010-10-07 19:29:08Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -35,7 +35,7 @@
*
* @author Charlie Killian <charlie at tizac.com>
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 761 $
+ * @version $Revision: 909 $
* @package phing.system.io
*/
abstract class FileSystem {
@@ -219,7 +219,7 @@ abstract class FileSystem {
$mtime = @filemtime($strPath);
if (false === $mtime) {
// FAILED. Log and return err.
- $msg = "FileSystem::Filemtime() FAILED. Cannot can not get modified time of $strPath. $php_errormsg";
+ $msg = "FileSystem::Filemtime() FAILED. Can not get modified time of $strPath. $php_errormsg";
throw new Exception($msg);
} else {
return (int) $mtime;
diff --git a/classes/phing/system/io/UnixFileSystem.php b/classes/phing/system/io/UnixFileSystem.php
index 7116f14..1da520d 100644
--- a/classes/phing/system/io/UnixFileSystem.php
+++ b/classes/phing/system/io/UnixFileSystem.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: UnixFileSystem.php 678 2010-01-02 22:48:11Z mrook $
+ * $Id: UnixFileSystem.php 984 2010-11-11 10:52:50Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -39,7 +39,7 @@ include_once 'phing/system/io/FileSystem.php';
* - Error handling reduced to min, error are handled by PhingFile mainly
*
* @author Andreas Aderhold, andi at binarycloud.com
- * @version $Revision: 678 $
+ * @version $Revision: 984 $
* @package phing.system.io
*/
class UnixFileSystem extends FileSystem {
@@ -191,7 +191,7 @@ class UnixFileSystem extends FileSystem {
/* -- most of the following is mapped to the php natives wrapped by FileSystem */
/* -- Attribute accessors -- */
- function getBooleanAttributes(&$f) {
+ function getBooleanAttributes($f) {
//$rv = getBooleanAttributes0($f);
$name = $f->getName();
$hidden = (strlen($name) > 0) && ($name{0} == '.');
@@ -207,7 +207,7 @@ class UnixFileSystem extends FileSystem {
$perms = (int) (@fileperms($strPath) & 0444);
return FileSystem::Chmod($strPath, $perms);
} else {
- throw new Exception("IllegalArgutmentType: Argument is not File");
+ throw new Exception("IllegalArgumentType: Argument is not File");
}
}
@@ -218,9 +218,9 @@ class UnixFileSystem extends FileSystem {
if ( ($f1 instanceof PhingFile) && ($f2 instanceof PhingFile) ) {
$f1Path = $f1->getPath();
$f2Path = $f2->getPath();
- return (boolean) strcmp((string) $f1Path, (string) $f2Path);
+ return strcmp((string) $f1Path, (string) $f2Path);
} else {
- throw new Exception("IllegalArgutmentType: Argument is not PhingFile");
+ throw new Exception("IllegalArgumentType: Argument is not PhingFile");
}
}
diff --git a/classes/phing/system/util/Properties.php b/classes/phing/system/util/Properties.php
index 721fdd6..2f6b992 100644
--- a/classes/phing/system/util/Properties.php
+++ b/classes/phing/system/util/Properties.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: Properties.php 634 2009-11-25 20:20:53Z mrook $
+ * $Id: Properties.php 997 2010-11-23 15:03:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -30,11 +30,25 @@ include_once 'phing/system/io/FileWriter.php';
* - Add support for arrays (separated by ',')
*
* @package phing.system.util
- * @version $Revision: 634 $
+ * @version $Revision: 997 $
*/
class Properties {
private $properties = array();
+
+ /**
+ * Constructor
+ *
+ * @param array $properties
+ */
+ function __construct($properties = NULL)
+ {
+ if (is_array($properties)) {
+ foreach ($properties as $key => $value) {
+ $this->setProperty($key, $value);
+ }
+ }
+ }
/**
* Load properties from a file.
@@ -75,21 +89,17 @@ class Properties {
$sec_name = "";
foreach($lines as $line) {
+ // strip comments and leading/trailing spaces
+ $line = trim(preg_replace("/[;#]\s.+$/", "", $line));
- $line = trim($line);
-
- if($line == "")
- continue;
-
- if ($line{0} == '#' or $line{0} == ';') {
- // it's a comment, so continue to next line
+ if (empty($line) || $line[0] == ';' || $line[0] == '#') {
continue;
- } else {
- $pos = strpos($line, '=');
- $property = trim(substr($line, 0, $pos));
- $value = trim(substr($line, $pos + 1));
- $this->properties[$property] = $this->inVal($value);
}
+
+ $pos = strpos($line, '=');
+ $property = trim(substr($line, 0, $pos));
+ $value = trim(substr($line, $pos + 1));
+ $this->properties[$property] = $this->inVal($value);
} // for each line
}
diff --git a/classes/phing/tasks/defaults.properties b/classes/phing/tasks/defaults.properties
index 008b924..bcb836f 100644
--- a/classes/phing/tasks/defaults.properties
+++ b/classes/phing/tasks/defaults.properties
@@ -66,8 +66,20 @@ svnlastrevision=phing.tasks.ext.svn.SvnLastRevisionTask
svncheckout=phing.tasks.ext.svn.SvnCheckoutTask
svnexport=phing.tasks.ext.svn.SvnExportTask
svnupdate=phing.tasks.ext.svn.SvnUpdateTask
+svnswitch=phing.tasks.ext.svn.SvnSwitchTask
svncopy=phing.tasks.ext.svn.SvnCopyTask
svncommit=phing.tasks.ext.svn.SvnCommitTask
+gitinit=phing.tasks.ext.git.GitInitTask
+gitclone=phing.tasks.ext.git.GitCloneTask
+gitgc=phing.tasks.ext.git.GitGcTask
+gitbranch=phing.tasks.ext.git.GitBranchTask
+gitfetch=phing.tasks.ext.git.GitFetchTask
+gitmerge=phing.tasks.ext.git.GitMergeTask
+gitcheckout=phing.tasks.ext.git.GitCheckoutTask
+gitpull=phing.tasks.ext.git.GitPullTask
+gitpush=phing.tasks.ext.git.GitPushTask
+gitlog=phing.tasks.ext.git.GitLogTask
+gittag=phing.tasks.ext.git.GitTagTask
phpunit3=phing.tasks.ext.phpunit.PHPUnitTask
phpunit3report=phing.tasks.ext.phpunit.PHPUnitReportTask
phpunit=phing.tasks.ext.phpunit.PHPUnitTask
@@ -104,4 +116,11 @@ filesize=phing.tasks.ext.FileSizeTask
xmlproperty=phing.tasks.ext.XmlPropertyTask
exportproperties=phing.tasks.ext.ExportPropertiesTask
http-request=phing.tasks.ext.HttpRequestTask
+httpget=phing.tasks.ext.HttpGetTask
patch=phing.tasks.ext.PatchTask
+dbdeploy=phing.tasks.ext.dbdeploy.DbDeployTask
+symlink=phing.tasks.ext.SymlinkTask
+s3get=phing.tasks.ext.Service.Amazon.S3.S3GetTask
+s3put=phing.tasks.ext.Service.Amazon.S3.S3PutTask
+zendguardencode=phing.tasks.ext.zendguard.ZendGuardEncodeTask
+zendguardlicense=phing.tasks.ext.zendguard.ZendGuardLicenseTask
diff --git a/classes/phing/tasks/ext/CapsuleTask.php b/classes/phing/tasks/ext/CapsuleTask.php
index ac6f610..8b5fc06 100644
--- a/classes/phing/tasks/ext/CapsuleTask.php
+++ b/classes/phing/tasks/ext/CapsuleTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: CapsuleTask.php 557 2009-08-29 13:54:38Z mrook $
+ * $Id: CapsuleTask.php 843 2010-09-02 14:39:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -31,7 +31,7 @@ include_once 'phing/util/StringHelper.php';
* This is based on the interface to TexenTask from Apache's Velocity engine.
*
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Id: CapsuleTask.php 557 2009-08-29 13:54:38Z mrook $
+ * @version $Id: CapsuleTask.php 843 2010-09-02 14:39:13Z mrook $
* @package phing.tasks.ext
*/
class CapsuleTask extends Task {
@@ -461,19 +461,19 @@ class AssignedVar {
private $name;
private $value;
- function setName($v) {
+ public function setName($v) {
$this->name = $v;
}
- function setValue($v) {
+ public function setValue($v) {
$this->value = $v;
}
- function getName() {
+ public function getName() {
return $this->name;
}
- function getValue() {
+ public function getValue() {
return $this->value;
}
diff --git a/classes/phing/tasks/ext/FtpDeployTask.php b/classes/phing/tasks/ext/FtpDeployTask.php
index 1c03e81..af31a5a 100644
--- a/classes/phing/tasks/ext/FtpDeployTask.php
+++ b/classes/phing/tasks/ext/FtpDeployTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: FtpDeployTask.php 748 2010-03-10 09:39:01Z mrook $
+ * $Id: FtpDeployTask.php 967 2010-11-04 21:22:16Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -40,7 +40,7 @@ require_once 'phing/Task.php';
* </ftpdeploy>
*
* @author Jorrit Schippers <jorrit at ncode dot nl>
- * @version $Id: FtpDeployTask.php 748 2010-03-10 09:39:01Z mrook $
+ * @version $Id: FtpDeployTask.php 967 2010-11-04 21:22:16Z mrook $
* @since 2.3.1
* @package phing.tasks.ext
*/
@@ -56,6 +56,8 @@ class FtpDeployTask extends Task
private $mode = FTP_BINARY;
private $clearFirst = false;
private $passive = false;
+
+ protected $logLevel = Project::MSG_VERBOSE;
public function __construct() {
$this->filesets = array();
@@ -103,12 +105,28 @@ class FtpDeployTask extends Task
$this->clearFirst = (bool) $clearFirst;
}
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
/**
+ * Set level of log messages generated (default = info)
+ * @param string $level
+ */
+ public function setLevel($level)
+ {
+ switch ($level)
+ {
+ case "error": $this->logLevel = Project::MSG_ERR; break;
+ case "warning": $this->logLevel = Project::MSG_WARN; break;
+ case "info": $this->logLevel = Project::MSG_INFO; break;
+ case "verbose": $this->logLevel = Project::MSG_VERBOSE; break;
+ case "debug": $this->logLevel = Project::MSG_DEBUG; break;
+ }
+ }
+
+ /**
* The init method: check if Net_FTP is available
*/
public function init() {
@@ -135,18 +153,18 @@ class FtpDeployTask extends Task
if(@PEAR::isError($ret)) {
throw new BuildException('Could not connect to FTP server '.$this->host.' on port '.$this->port.': '.$ret->getMessage());
} else {
- $this->log('Connected to FTP server ' . $this->host . ' on port ' . $this->port, Project::MSG_VERBOSE);
+ $this->log('Connected to FTP server ' . $this->host . ' on port ' . $this->port, $this->logLevel);
}
$ret = $ftp->login($this->username, $this->password);
if(@PEAR::isError($ret)) {
throw new BuildException('Could not login to FTP server '.$this->host.' on port '.$this->port.' with username '.$this->username.': '.$ret->getMessage());
} else {
- $this->log('Logged in to FTP server with username ' . $this->username, Project::MSG_VERBOSE);
+ $this->log('Logged in to FTP server with username ' . $this->username, $this->logLevel);
}
if ($this->passive) {
- $this->log('Setting passive mode', Project::MSG_INFO);
+ $this->log('Setting passive mode', $this->logLevel);
$ret = $ftp->setPassive();
if(@PEAR::isError($ret)) {
$ftp->disconnect();
@@ -159,7 +177,7 @@ class FtpDeployTask extends Task
if($this->clearFirst) {
// TODO change to a loop through all files and directories within current directory
- $this->log('Clearing directory '.$dir, Project::MSG_INFO);
+ $this->log('Clearing directory '.$dir, $this->logLevel);
$ftp->rm($dir, true);
}
@@ -175,7 +193,7 @@ class FtpDeployTask extends Task
$ftp->disconnect();
throw new BuildException('Could not change to directory '.$dir.': '.$ret->getMessage());
} else {
- $this->log('Changed directory ' . $dir, Project::MSG_VERBOSE);
+ $this->log('Changed directory ' . $dir, $this->logLevel);
}
$fs = FileSystem::getFileSystem();
@@ -189,7 +207,7 @@ class FtpDeployTask extends Task
foreach($srcDirs as $dirname) {
if($convert)
$dirname = str_replace('\\', '/', $dirname);
- $this->log('Will create directory '.$dirname, Project::MSG_VERBOSE);
+ $this->log('Will create directory '.$dirname, $this->logLevel);
$ret = $ftp->mkdir($dirname, true);
if(@PEAR::isError($ret)) {
$ftp->disconnect();
@@ -200,7 +218,7 @@ class FtpDeployTask extends Task
$file = new PhingFile($fromDir->getAbsolutePath(), $filename);
if($convert)
$filename = str_replace('\\', '/', $filename);
- $this->log('Will copy '.$file->getCanonicalPath().' to '.$filename, Project::MSG_VERBOSE);
+ $this->log('Will copy '.$file->getCanonicalPath().' to '.$filename, $this->logLevel);
$ret = $ftp->put($file->getCanonicalPath(), $filename, true, $this->mode);
if(@PEAR::isError($ret)) {
$ftp->disconnect();
@@ -210,7 +228,7 @@ class FtpDeployTask extends Task
}
$ftp->disconnect();
- $this->log('Disconnected from FTP server', Project::MSG_VERBOSE);
+ $this->log('Disconnected from FTP server', $this->logLevel);
}
}
?>
diff --git a/classes/phing/tasks/ext/HttpGetTask.php b/classes/phing/tasks/ext/HttpGetTask.php
new file mode 100644
index 0000000..398abc5
--- /dev/null
+++ b/classes/phing/tasks/ext/HttpGetTask.php
@@ -0,0 +1,114 @@
+<?php
+/*
+ * $Id: HttpGetTask.php 843 2010-09-02 14:39:13Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+
+/**
+ * A HTTP request task.
+ * Making an HTTP request and try to match the response against an provided
+ * regular expression.
+ *
+ * @package phing.tasks.ext
+ * @author Ole Markus With <o.with at sportradar.com>
+ * @version $Id: HttpGetTask.php 843 2010-09-02 14:39:13Z mrook $
+ */
+class HttpGetTask extends Task
+{
+ /**
+ * Holds the request URL
+ *
+ * @var string
+ */
+ protected $url = null;
+
+ /**
+ * Holds the save location
+ *
+ * @var string
+ */
+ protected $dir = null;
+
+
+ /**
+ * Load the necessary environment for running this task.
+ *
+ * @throws BuildException
+ */
+ public function init()
+ {
+ require_once 'HTTP/Request2.php';
+ }
+
+
+ /**
+ * Make the GET request
+ *
+ * @throws BuildException
+ */
+ public function main()
+ {
+ if (!isset($this->url)) {
+ throw new BuildException("Missing attribute 'url'");
+ }
+
+ if (!isset($this->dir)) {
+ throw new BuildException("Missing attribute 'dir'");
+ }
+
+ $this->log("Fetching " . $this->url);
+
+ $request = new HTTP_Request2($this->url);
+ $response = $request->send();
+ if ($response->getStatus() != 200) {
+ throw new BuildException("Request unsuccessfull. Response from server: " . $response->getStatus() . " " . $response->getReasonPhrase());
+ }
+ $content = $response->getBody();
+ if ($this->filename) {
+ $filename = $this->filename;
+ } elseif ($disposition = $response->getHeader('content-disposition')
+ && 0 == strpos($disposition, 'attachment')
+ && preg_match('/filename="([^"]+)"/', $disposition, $m)) {
+ $filename = basename($m[1]);
+ } else {
+ $filename = basename(parse_url($this->url, PHP_URL_PATH));
+ }
+
+ if (!is_writable($this->dir)) {
+ throw new BuildException("Cannot write to directory: " . $this->dir);
+ }
+ $filename = $this->dir . "/" . $filename;
+ file_put_contents($filename, $content);
+ $this->log("Contents from " . $this->url . " saved to $filename");
+ }
+
+ public function setUrl($url) {
+ $this->url = $url;
+ }
+
+ public function setFilename($filename) {
+ $this->filename = $filename;
+ }
+
+ public function setDir($dir) {
+ $this->dir = $dir;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/JslLintTask.php b/classes/phing/tasks/ext/JslLintTask.php
index 6618fac..e1734b6 100644
--- a/classes/phing/tasks/ext/JslLintTask.php
+++ b/classes/phing/tasks/ext/JslLintTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: JslLintTask.php 774 2010-05-11 11:37:17Z mrook $
+ * $Id: JslLintTask.php 863 2010-09-15 13:05:15Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,7 +28,7 @@ require_once 'phing/util/DataStore.php';
* This class is based on Knut Urdalen's PhpLintTask.
*
* @author Stefan Priebsch <stefan.priebsch at e-novative.de>
- * @version $Id: JslLintTask.php 774 2010-05-11 11:37:17Z mrook $
+ * @version $Id: JslLintTask.php 863 2010-09-15 13:05:15Z victor $
* @package phing.tasks.ext
*/
class JslLintTask extends Task
@@ -103,7 +103,7 @@ require_once 'phing/util/DataStore.php';
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
@@ -147,7 +147,7 @@ require_once 'phing/util/DataStore.php';
$command = $this->executable . ' -output-format ' . escapeshellarg('file:__FILE__;line:__LINE__;message:__ERROR__') . ' ';
if (isset($this->conf)) {
- $command .= '-conf ' . $this->conf->getPath() . ' ';
+ $command .= '-conf ' . escapeshellarg($this->conf->getPath()) . ' ';
}
$command .= '-process ';
@@ -224,11 +224,11 @@ require_once 'phing/util/DataStore.php';
$this->hasErrors = true;
} else if (!$this->showWarnings || $warningCount == 0) {
$this->log($file . ': No syntax errors detected', Project::MSG_INFO);
- }
-
- if ($this->cache)
- {
- $this->cache->put($file, filemtime($file));
+
+ if ($this->cache)
+ {
+ $this->cache->put($file, filemtime($file));
+ }
}
} else {
throw new BuildException('Permission denied: '.$file);
diff --git a/classes/phing/tasks/ext/MailTask.php b/classes/phing/tasks/ext/MailTask.php
index 5ae472a..f931280 100644
--- a/classes/phing/tasks/ext/MailTask.php
+++ b/classes/phing/tasks/ext/MailTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: MailTask.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: MailTask.php 992 2010-11-16 12:28:11Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -22,56 +22,104 @@
include_once 'phing/Task.php';
/**
- * Send a message by mail()
+ * Send an e-mail message
*
- * <mail to="user at example.org" subject="build complete">The build process is a success...</mail>
+ * <mail tolist="user at example.org" subject="build complete">The build process is a success...</mail>
*
* @author Francois Harvey at SecuriWeb (http://www.securiweb.net)
- * @version $Id: MailTask.php 526 2009-08-11 12:11:17Z mrook $
+ * @version $Id: MailTask.php 992 2010-11-16 12:28:11Z mrook $
* @package phing.tasks.ext
*/
-class MailTask extends Task {
-
- protected $recipient;
-
- protected $subject;
+class MailTask extends Task
+{
+ protected $tolist = null;
+ protected $subject = null;
+ protected $msg = null;
+ protected $from = null;
- protected $msg;
-
- function main() {
- $this->log('Sending mail to ' . $this->recipient );
- mail($this->recipient, $this->subject, $this->msg);
+ protected $filesets = array();
+
+ public function main()
+ {
+ if (empty($this->from)) {
+ throw new BuildException('Missing "from" attribute');
+ }
+
+ $this->log('Sending mail to ' . $this->tolist);
+ mail($this->tolist, $this->subject, $this->msg);
}
- /** setter for message */
- function setMsg($msg) {
+ /**
+ * Setter for message
+ */
+ public function setMsg($msg)
+ {
$this->setMessage($msg);
}
- /** alias setter */
- function setMessage($msg) {
+ /**
+ * Alias setter
+ */
+ public function setMessage($msg)
+ {
$this->msg = (string) $msg;
}
- /** setter for subject **/
- function setSubject($subject) {
- $this->subject = (string) $subject;
+ /**
+ * Setter for subject
+ */
+ public function setSubject($subject)
+ {
+ $this->subject = (string) $subject;
}
- /** setter for recipient **/
- function setRecipient($recipient) {
- $this->recipient = (string) $recipient;
+ /**
+ * Setter for tolist
+ */
+ public function setToList($tolist)
+ {
+ $this->tolist = $tolist;
+ }
+
+ /**
+ * Alias for (deprecated) recipient
+ */
+ public function setRecipient($recipient)
+ {
+ $this->tolist = (string) $recipient;
}
- /** alias for recipient **/
- function setTo($recipient) {
- $this->recipient = (string) $recipient;
+ /**
+ * Alias for to
+ */
+ public function setTo($to)
+ {
+ $this->tolist = (string) $to;
}
- /** Supporting the <mail>Message</mail> syntax. */
- function addText($msg)
+ /**
+ * Supports the <mail>Message</mail> syntax.
+ */
+ public function addText($msg)
{
$this->msg = (string) $msg;
}
+
+ /**
+ * Sets email address of sender
+ */
+ public function setFrom($from)
+ {
+ $this->from = $from;
+ }
+
+ /**
+ * Adds a fileset
+ */
+ public function createFileSet()
+ {
+ $fileset = new FileSet();
+ $this->filesets[] = $fileset;
+ return $this->fileset;
+ }
}
-
diff --git a/classes/phing/tasks/ext/PatchTask.php b/classes/phing/tasks/ext/PatchTask.php
old mode 100755
new mode 100644
diff --git a/classes/phing/tasks/ext/PearPackage2Task.php b/classes/phing/tasks/ext/PearPackage2Task.php
index 2f536f3..8c45936 100644
--- a/classes/phing/tasks/ext/PearPackage2Task.php
+++ b/classes/phing/tasks/ext/PearPackage2Task.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: PearPackage2Task.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: PearPackage2Task.php 862 2010-09-15 02:17:59Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -74,6 +74,7 @@ require_once 'phing/tasks/ext/PearPackageTask.php';
* <element key="name" value="Hans"/>
* <element key="email" value="hans at xmpl.org"/>
* <element key="role" value="lead"/>
+ * <element key="active" value="yes"/>
* </element>
* </mapping>
* </pearpkg2>
@@ -85,7 +86,7 @@ require_once 'phing/tasks/ext/PearPackageTask.php';
* @author Stuart Binge <stuart.binge at complinet.com>
* @author Hans Lellelid <hans at xmpl.org>
* @package phing.tasks.ext
- * @version $Id: PearPackage2Task.php 552 2009-08-29 12:18:13Z mrook $
+ * @version $Id: PearPackage2Task.php 862 2010-09-15 02:17:59Z victor $
*/
class PearPackage2Task extends PearPackageTask {
@@ -172,8 +173,8 @@ class PearPackage2Task extends PearPackageTask {
foreach ($deps as $dep) {
$type = isset($dep['optional']) ? 'optional' : 'required';
$min = isset($dep['min']) ? $dep['min'] : $dep['version'];
- $max = isset($dep['max']) ? $dep['max'] : $dep['version'];
- $rec = isset($dep['recommended']) ? $dep['recommended'] : $dep['version'];
+ $max = isset($dep['max']) ? $dep['max'] : null;
+ $rec = isset($dep['recommended']) ? $dep['recommended'] : null;
$channel = isset($dep['channel']) ? $dep['channel'] : false;
$uri = isset($dep['uri']) ? $dep['uri'] : false;
@@ -209,6 +210,8 @@ class PearPackage2Task extends PearPackageTask {
foreach ($maintainers as $maintainer) {
if (!isset($maintainer['active'])) {
$maintainer['active'] = 'yes';
+ } else {
+ $maintainer['active'] = $maintainer['active'] === false ? 'no' : 'yes';
}
$this->pkg->addMaintainer(
$maintainer['role'],
diff --git a/classes/phing/tasks/ext/PearPackageTask.php b/classes/phing/tasks/ext/PearPackageTask.php
index 485f29e..2c8ad5a 100644
--- a/classes/phing/tasks/ext/PearPackageTask.php
+++ b/classes/phing/tasks/ext/PearPackageTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: PearPackageTask.php 557 2009-08-29 13:54:38Z mrook $
+ * $Id: PearPackageTask.php 843 2010-09-02 14:39:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -74,7 +74,7 @@ include_once 'phing/types/FileSet.php';
*
* @author Hans Lellelid <hans at xmpl.org>
* @package phing.tasks.ext
- * @version $Id: PearPackageTask.php 557 2009-08-29 13:54:38Z mrook $
+ * @version $Id: PearPackageTask.php 843 2010-09-02 14:39:13Z mrook $
*/
class PearPackageTask extends MatchingTask {
@@ -246,7 +246,7 @@ class PearPackageTask extends MatchingTask {
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
@@ -289,7 +289,7 @@ class PearPackageTask extends MatchingTask {
/**
* Handles nested generic <option> elements.
*/
- function createOption() {
+ public function createOption() {
$o = new PearPkgOption();
$this->options[] = $o;
return $o;
@@ -298,7 +298,7 @@ class PearPackageTask extends MatchingTask {
/**
* Handles nested generic <option> elements.
*/
- function createMapping() {
+ public function createMapping() {
$o = new PearPkgMapping();
$this->mappings[] = $o;
return $o;
diff --git a/classes/phing/tasks/ext/PhpCodeSnifferTask.php b/classes/phing/tasks/ext/PhpCodeSnifferTask.php
index f2b980c..bdf3e59 100644
--- a/classes/phing/tasks/ext/PhpCodeSnifferTask.php
+++ b/classes/phing/tasks/ext/PhpCodeSnifferTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: PhpCodeSnifferTask.php 801 2010-07-21 14:08:47Z mrook $
+ * $Id: PhpCodeSnifferTask.php 1024 2011-01-04 13:02:07Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,7 +25,7 @@ require_once 'phing/Task.php';
* A PHP code sniffer task. Checking the style of one or more PHP source files.
*
* @author Dirk Thomas <dirk.thomas at 4wdmedia.de>
- * @version $Id: PhpCodeSnifferTask.php 801 2010-07-21 14:08:47Z mrook $
+ * @version $Id: PhpCodeSnifferTask.php 1024 2011-01-04 13:02:07Z mrook $
* @package phing.tasks.ext
*/
class PhpCodeSnifferTask extends Task {
@@ -102,7 +102,7 @@ class PhpCodeSnifferTask extends Task {
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
@@ -320,7 +320,7 @@ class PhpCodeSnifferTask extends Task {
* Sets the haltonerror flag
* @param boolean $value
*/
- function setHaltonerror($value)
+ public function setHaltonerror($value)
{
$this->haltonerror = $value;
}
@@ -329,7 +329,7 @@ class PhpCodeSnifferTask extends Task {
* Sets the haltonwarning flag
* @param boolean $value
*/
- function setHaltonwarning($value)
+ public function setHaltonwarning($value)
{
$this->haltonwarning = $value;
}
@@ -368,6 +368,7 @@ class PhpCodeSnifferTask extends Task {
}
}
+ $cwd = getcwd();
$codeSniffer = new PHP_CodeSniffer($this->verbosity, $this->tabWidth);
$codeSniffer->setAllowedFileExtensions($this->allowedFileExtensions);
if (is_array($this->ignorePatterns)) $codeSniffer->setIgnorePatterns($this->ignorePatterns);
@@ -381,6 +382,7 @@ class PhpCodeSnifferTask extends Task {
} else {
$codeSniffer->process($fileList, $this->standard, $this->sniffs, $this->noSubdirectories);
}
+ chdir($cwd);
$report = $this->printErrorReport($codeSniffer);
@@ -455,14 +457,28 @@ class PhpCodeSnifferTask extends Task {
ob_start();
}
- $reporting->printReport(
- $fe->getType(),
- $filesViolations,
- $this->showWarnings,
- $this->showSources,
- $reportFile,
- $this->reportWidth
- );
+ // Determine number of parameters required to
+ // ensure backwards compatibility
+ $rm = new ReflectionMethod('PHP_CodeSniffer_Reporting', 'printReport');
+
+ if ($rm->getNumberOfParameters() == 5) {
+ $reporting->printReport(
+ $fe->getType(),
+ $filesViolations,
+ $this->showSources,
+ $reportFile,
+ $this->reportWidth
+ );
+ } else {
+ $reporting->printReport(
+ $fe->getType(),
+ $filesViolations,
+ $this->showWarnings,
+ $this->showSources,
+ $reportFile,
+ $this->reportWidth
+ );
+ }
// reporting class uses ob_end_flush(), but we don't want
// an output if we use a file
diff --git a/classes/phing/tasks/ext/PhpLintTask.php b/classes/phing/tasks/ext/PhpLintTask.php
index 2ba08a3..e80dac1 100644
--- a/classes/phing/tasks/ext/PhpLintTask.php
+++ b/classes/phing/tasks/ext/PhpLintTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: PhpLintTask.php 749 2010-03-10 11:18:41Z mrook $
+ * $Id: PhpLintTask.php 1020 2011-01-03 15:49:08Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,7 +28,7 @@ require_once 'phing/system/io/FileWriter.php';
*
* @author Knut Urdalen <knut.urdalen at telio.no>
* @author Stefan Priebsch <stefan.priebsch at e-novative.de>
- * @version $Id: PhpLintTask.php 749 2010-03-10 11:18:41Z mrook $
+ * @version $Id: PhpLintTask.php 1020 2011-01-03 15:49:08Z mrook $
* @package phing.tasks.ext
*/
class PhpLintTask extends Task {
@@ -117,7 +117,7 @@ class PhpLintTask extends Task {
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
@@ -208,39 +208,39 @@ class PhpLintTask extends Task {
}
$messages = array();
+ $errorCount = 0;
+
exec($command.'"'.$file.'" 2>&1', $messages);
- if(!preg_match('/^No syntax errors detected/', $messages[0])) {
- if (count($messages) < 2 ) {
- $this->log("Could not parse file", Project::MSG_ERR);
- } else {
- for ($i = 0; $i < count($messages) - 1; $i++) {
- $message = $messages[$i];
- if (trim($message) == '') {
- continue;
- }
-
- if (!preg_match('/^(.*)Deprecated:/', $message) || $this->deprecatedAsError) {
- $this->log($message, $this->logLevel);
-
- if ($this->errorProperty) {
- $this->project->setProperty($this->errorProperty, $message);
- }
-
- if (!isset($this->badFiles[$file])) {
- $this->badFiles[$file] = $message;
- }
+
+ for ($i = 0; $i < count($messages) - 1; $i++) {
+ $message = $messages[$i];
+ if (trim($message) == '') {
+ continue;
+ }
+
+ if ((!preg_match('/^(.*)Deprecated:/', $message) || $this->deprecatedAsError) && !preg_match('/^No syntax errors detected/', $message)) {
+ $this->log($message, Project::MSG_ERR);
- $this->hasErrors = true;
- }
+ if ($this->errorProperty) {
+ $this->project->setProperty($this->errorProperty, $message);
}
+
+ if (!isset($this->badFiles[$file])) {
+ $this->badFiles[$file] = $message;
+ }
+
+ $this->hasErrors = true;
+ $errorCount++;
}
- } else {
- $this->log($file.': No syntax errors detected', $this->logLevel);
}
-
- if ($this->cache)
- {
- $this->cache->put($file, filemtime($file));
+
+ if (!$errorCount) {
+ $this->log($file.': No syntax errors detected', $this->logLevel);
+
+ if ($this->cache)
+ {
+ $this->cache->put($file, filemtime($file));
+ }
}
} else {
throw new BuildException('Permission denied: '.$file);
diff --git a/classes/phing/tasks/ext/ReplaceRegexpTask.php b/classes/phing/tasks/ext/ReplaceRegexpTask.php
index 0b1e666..b72e460 100644
--- a/classes/phing/tasks/ext/ReplaceRegexpTask.php
+++ b/classes/phing/tasks/ext/ReplaceRegexpTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ReplaceRegexpTask.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: ReplaceRegexpTask.php 1010 2010-12-04 17:20:34Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -33,7 +33,7 @@ require_once 'phing/Task.php';
* </code>
*
* @author Jonathan Bond-Caron <jbondc at openmv.com>
- * @version $Id: ReplaceRegexpTask.php 552 2009-08-29 12:18:13Z mrook $
+ * @version $Id: ReplaceRegexpTask.php 1010 2010-12-04 17:20:34Z mrook $
* @package phing.tasks.system
* @see <http://ant.apache.org/manual/OptionalTasks/replaceregexp.html>
*/
@@ -57,7 +57,7 @@ class ReplaceRegexpTask extends Task {
*
* @param string $path
*/
- function setFile(PhingFile $path)
+ public function setFile(PhingFile $path)
{
$this->file = $path;
}
@@ -67,7 +67,7 @@ class ReplaceRegexpTask extends Task {
*
* @param string $regexp
*/
- function setMatch( $regexp )
+ public function setMatch( $regexp )
{
$this->_regexp->setPattern( $regexp );
}
@@ -75,7 +75,7 @@ class ReplaceRegexpTask extends Task {
/**
* @see setMatch()
*/
- function setPattern( $regexp )
+ public function setPattern( $regexp )
{
$this->setMatch( $regexp );
}
@@ -85,7 +85,7 @@ class ReplaceRegexpTask extends Task {
*
* @param string $string
*/
- function setReplace( $string )
+ public function setReplace( $string )
{
$this->_regexp->setReplace( $string );
}
@@ -95,7 +95,7 @@ class ReplaceRegexpTask extends Task {
*
* @param string $flags
*/
- function setFlags( $flags )
+ public function setFlags( $flags )
{
// TODO... $this->_regexp->setFlags( $flags );
}
@@ -105,24 +105,24 @@ class ReplaceRegexpTask extends Task {
*
* @param bool $yesNo
*/
- function setByline( $yesNo )
+ public function setByline( $yesNo )
{
// TODO... $this->_regexp->
}
/** Nested creator, adds a set of files (nested fileset attribute). */
- function createFileSet()
+ public function createFileSet()
{
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
- function init()
+ public function init()
{
$this->_regexp = new RegularExpression;
}
- function main()
+ public function main()
{
if ($this->file === null && empty($this->filesets)) {
throw new BuildException("You must specify a file or fileset(s) for the <ReplaceRegexp> task.");
@@ -183,7 +183,7 @@ class ReplaceRegexpTask extends Task {
$in->close();
} catch (Exception $e) {
if ($in) $in->close();
- $this->log("Erorr reading file: " . $e->getMessage(), Project::MSG_WARN);
+ $this->log("Error reading file: " . $e->getMessage(), Project::MSG_WARN);
}
try {
diff --git a/classes/phing/tasks/ext/ScpTask.php b/classes/phing/tasks/ext/ScpTask.php
index ba9c622..94fa0c6 100644
--- a/classes/phing/tasks/ext/ScpTask.php
+++ b/classes/phing/tasks/ext/ScpTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ScpTask.php 741 2010-02-24 13:14:10Z mrook $
+ * $Id: ScpTask.php 1030 2011-01-12 14:49:51Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,7 +26,7 @@ require_once 'phing/Task.php';
*
* @author Michiel Rook <mrook at php.net>
* @author Johan Van den Brande <johan at vandenbrande.com>
- * @version $Id: ScpTask.php 741 2010-02-24 13:14:10Z mrook $
+ * @version $Id: ScpTask.php 1030 2011-01-12 14:49:51Z mrook $
* @package phing.tasks.ext
*/
@@ -259,14 +259,14 @@ class ScpTask extends Task
public function init()
{
- if (!function_exists('ssh2_connect')) {
- throw new BuildException("To use ScpTask, you need to install the SSH extension.");
- }
- return true;
}
public function main()
{
+ if (!function_exists('ssh2_connect')) {
+ throw new BuildException("To use ScpTask, you need to install the PHP SSH2 extension.");
+ }
+
if ($this->file == "" && empty($this->filesets)) {
throw new BuildException("Missing either a nested fileset or attribute 'file'");
}
@@ -314,6 +314,9 @@ class ScpTask extends Task
}
$this->log("Copied " . $this->counter . " file(s) " . ($this->fetch ? "from" : "to") . " '" . $this->host . "'");
+
+ // explicitly close ssh connection
+ @ssh2_exec($this->connection, 'exit');
}
protected function copyFile($local, $remote)
diff --git a/classes/phing/tasks/ext/Service/Amazon.php b/classes/phing/tasks/ext/Service/Amazon.php
new file mode 100644
index 0000000..81e9d8c
--- /dev/null
+++ b/classes/phing/tasks/ext/Service/Amazon.php
@@ -0,0 +1,120 @@
+<?php
+
+/*
+ * $Id$
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once "phing/Task.php";
+
+/**
+ * Abstract Service_Amazon class.
+ *
+ * Implements common methods & properties used by all Amazon services
+ *
+ * @extends Task
+ * @version $ID$
+ * @package phing.tasks.ext
+ * @author Andrei Serdeliuc <andrei at serdeliuc.ro>
+ * @abstract
+ */
+abstract class Service_Amazon extends Task
+{
+ /**
+ * Collection of set options
+ *
+ * We set these magically so we can also load then from the environment
+ *
+ * (default value: array())
+ *
+ * @var array
+ * @access protected
+ */
+ protected $_options = array();
+
+ public function __set($var, $val)
+ {
+ $this->_options[$var] = $val;
+ }
+
+ /**
+ * Property getter
+ *
+ * If the property hasn't been previously set (through the task call normally),
+ * it will try to load it from the project
+ *
+ * This way, we can define global properties for the "Amazon" service, like key and secret
+ *
+ * @access public
+ * @param mixed $var
+ * @return void
+ */
+ public function __get($var)
+ {
+ if(!isset($this->$var)) {
+ if(!($val = $this->getProject()->getProperty('amazon.' . strtolower($var)))) {
+ return false;
+ } else {
+ return $val;
+ }
+ }
+
+ return $this->_options[$var];
+ }
+
+ public function __isset($var)
+ {
+ return array_key_exists($var, $this->_options);
+ }
+
+ public function setKey($key)
+ {
+ if(empty($key) || !is_string($key)) {
+ throw new BuildException('Key must be a non empty string');
+ }
+
+ $this->key = $key;
+ }
+
+ public function getKey()
+ {
+ if(!($key = $this->key)) {
+ throw new BuildException('Key is not set');
+ }
+
+ return $key;
+ }
+
+ public function setSecret($secret)
+ {
+ if(empty($secret) || !is_string($secret)) {
+ throw new BuildException('Secret must be a non empty string');
+ }
+
+ $this->secret = $secret;
+ }
+
+ public function getSecret()
+ {
+ if(!($secret = $this->secret)) {
+ throw new BuildException('Secret is not set');
+ }
+
+ return $this->secret;
+ }
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/Service/Amazon/S3.php b/classes/phing/tasks/ext/Service/Amazon/S3.php
new file mode 100644
index 0000000..a205dcf
--- /dev/null
+++ b/classes/phing/tasks/ext/Service/Amazon/S3.php
@@ -0,0 +1,188 @@
+<?php
+
+/*
+ * $Id$
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once dirname(dirname(__FILE__)) . "/Amazon.php";
+
+/**
+ * Abstract Service_Amazon_S3 class.
+ *
+ * Provides common methods and properties to all of the S3 tasks
+ *
+ * @extends Service_Amazon
+ * @version $ID$
+ * @package phing.tasks.ext
+ * @author Andrei Serdeliuc <andrei at serdeliuc.ro>
+ * @abstract
+ */
+abstract class Service_Amazon_S3 extends Service_Amazon
+{
+ /**
+ * Services_Amazon_S3 client
+ *
+ * (default value: null)
+ *
+ * @var Services_Amazon_S3
+ * @see Services_Amazon_S3
+ * @access protected
+ */
+ protected $_client = null;
+
+ /**
+ * We only instantiate the client once per task call
+ *
+ * @access public
+ * @return Services_Amazon_S3
+ */
+ public function getClient()
+ {
+ require_once "Services/Amazon/S3.php";
+
+ if($this->_client === null) {
+ $this->_client = Services_Amazon_S3::getAccount($this->getKey(), $this->getSecret());
+ }
+
+ return $this->_client;
+ }
+
+ public function setBucket($bucket)
+ {
+ if(empty($bucket) || !is_string($bucket)) {
+ throw new BuildException('Bucket must be a non-empty string');
+ }
+
+ $this->bucket = (string) $bucket;
+ }
+
+ public function getBucket()
+ {
+ if(!($bucket = $this->bucket)) {
+ throw new BuildException('Bucket is not set');
+ }
+
+ return $this->bucket;
+ }
+
+ /**
+ * Returns an instance of Services_Amazon_S3_Resource_Object
+ *
+ * @access public
+ * @param mixed $object
+ * @return Services_Amazon_S3_Resource_Object
+ */
+ public function getObjectInstance($object)
+ {
+ return $this->getBucketInstance()->getObject($object);
+ }
+
+ /**
+ * Check if the object already exists in the current bucket
+ *
+ * @access public
+ * @param mixed $object
+ * @return bool
+ */
+ public function isObjectAvailable($object)
+ {
+ return (bool) $this->getObjectInstance($object)->load(Services_Amazon_S3_Resource_Object::LOAD_METADATA_ONLY);
+ }
+
+ /**
+ * Returns an instance of Services_Amazon_S3_Resource_Bucket
+ *
+ * @access public
+ * @return Services_Amazon_S3_Resource_Bucket
+ */
+ public function getBucketInstance()
+ {
+ return $this->getClient()->getBucket($this->getBucket());
+ }
+
+ /**
+ * Check if the current bucket is available
+ *
+ * @access public
+ * @return bool
+ */
+ public function isBucketAvailable()
+ {
+ return (bool) $this->getBucketInstance($this->getBucket())->load();
+ }
+
+ /**
+ * Get the contents of an object (by it's name)
+ *
+ * @access public
+ * @param string $object
+ * @return mixed
+ */
+ public function getObjectContents($object)
+ {
+ if(!$this->isBucketAvailable($this->getBucket())) {
+ throw new BuildException('Bucket doesn\'t exist or wrong permissions');
+ }
+
+ $bucket = $this->getClient()->getBucket($this->getBucket());
+ if(!$this->isObjectAvailable($object)) {
+ throw new BuildException('Object not available: ' . $object);
+ }
+
+ $object = $this->getObjectInstance($object);
+ $object->load();
+ return $object->data;
+ }
+
+ /**
+ * Create a bucket
+ *
+ * @access public
+ * @return void
+ */
+ public function createBucket()
+ {
+ $bucket = $this->getBucketInstance();
+ $bucket->name = $this->getBucket();
+ $bucket->save();
+
+ return $this->isBucketAvailable();
+ }
+
+ /**
+ * Main entry point, doesn't do anything
+ *
+ * @access public
+ * @final
+ * @return void
+ */
+ final public function main()
+ {
+ $this->execute();
+ }
+
+ /**
+ * Entry point to children tasks
+ *
+ * @access public
+ * @abstract
+ * @return void
+ */
+ abstract public function execute();
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/Service/Amazon/S3/S3GetTask.php b/classes/phing/tasks/ext/Service/Amazon/S3/S3GetTask.php
new file mode 100644
index 0000000..b178dbf
--- /dev/null
+++ b/classes/phing/tasks/ext/Service/Amazon/S3/S3GetTask.php
@@ -0,0 +1,108 @@
+<?php
+
+/*
+ * $Id$
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once dirname(dirname(__FILE__)) . '/S3.php';
+
+/**
+ * Downloads an object off S3
+ *
+ * @version $ID$
+ * @package phing.tasks.ext
+ * @author Andrei Serdeliuc <andrei at serdeliuc.ro>
+ * @extends Service_Amazon_S3
+ */
+class S3GetTask extends Service_Amazon_S3
+{
+ /**
+ * This is where we'll store the object
+ *
+ * (default value: null)
+ *
+ * @var mixed
+ * @access protected
+ */
+ protected $_target = null;
+
+ /**
+ * The S3 object we're working with
+ *
+ * (default value: null)
+ *
+ * @var mixed
+ * @access protected
+ */
+ protected $_object = null;
+
+ public function setObject($object)
+ {
+ if(empty($object) || !is_string($object)) {
+ throw new BuildException('Object must be a non-empty string');
+ }
+
+ $this->_object = $object;
+ }
+
+ public function getObject()
+ {
+ if($this->_object === null) {
+ throw new BuildException('Object is not set');
+ }
+
+ return $this->_object;
+ }
+
+ public function setTarget($target)
+ {
+ if(!is_file($target) && !is_dir($target) && !is_link($target)) {
+ if(!is_writable(dirname($target))) {
+ throw new BuildException('Target is not writable: ' . $target);
+ }
+ } else {
+ if(!is_writable($target)) {
+ throw new BuildException('Target is not writable: ' . $target);
+ }
+ }
+
+ $this->_target = $target;
+ }
+
+ public function getTarget()
+ {
+ if($this->_target === null) {
+ throw new BuildException('Target is not set');
+ }
+
+ return $this->_target;
+ }
+
+ public function execute()
+ {
+ $target = $this->getTarget();
+
+ // Use the object name as the target if the current target is a directory
+ if(is_dir($target)) {
+ $target = rtrim($target, '/') . '/' . $this->getObject();
+ }
+
+ file_put_contents($target, $this->getObjectContents($this->getObject()));
+ }
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/Service/Amazon/S3/S3PutTask.php b/classes/phing/tasks/ext/Service/Amazon/S3/S3PutTask.php
new file mode 100644
index 0000000..53ae7d5
--- /dev/null
+++ b/classes/phing/tasks/ext/Service/Amazon/S3/S3PutTask.php
@@ -0,0 +1,215 @@
+<?php
+require_once dirname(dirname(__FILE__)) . '/S3.php';
+
+class S3PutTask extends Service_Amazon_S3
+{
+ /**
+ * File we're trying to upload
+ *
+ * (default value: null)
+ *
+ * @var string
+ * @access protected
+ */
+ protected $_source = null;
+
+ /**
+ * Content we're trying to upload
+ *
+ * The user can specify either a file to upload or just a bit of content
+ *
+ * (default value: null)
+ *
+ * @var mixed
+ * @access protected
+ */
+ protected $_content = null;
+
+ /**
+ * Collection of filesets
+ * Used for uploading multiple files
+ *
+ * (default value: array())
+ *
+ * @var array
+ * @access protected
+ */
+ protected $_filesets = array();
+
+ /**
+ * Wether to try to create buckets or not
+ *
+ * (default value: false)
+ *
+ * @var bool
+ * @access protected
+ */
+ protected $_createBuckets = false;
+
+ public function setSource($source)
+ {
+ if(!is_readable($source)) {
+ throw new BuildException('Source is not readable: ' . $source);
+ }
+
+ $this->_source = $source;
+ }
+
+ public function getSource()
+ {
+ if($this->_source === null) {
+ throw new BuildException('Source is not set');
+ }
+
+ return $this->_source;
+ }
+
+ public function setContent($content)
+ {
+ if(empty($content) || !is_string($content)) {
+ throw new BuildException('Content must be a non-empty string');
+ }
+
+ $this->_content = $content;
+ }
+
+ public function getContent()
+ {
+ if($this->_content === null) {
+ throw new BuildException('Content is not set');
+ }
+
+ return $this->_content;
+ }
+
+ public function setObject($object)
+ {
+ if(empty($object) || !is_string($object)) {
+ throw new BuildException('Object must be a non-empty string');
+ }
+
+ $this->_object = $object;
+ }
+
+ public function getObject()
+ {
+ if($this->_object === null) {
+ throw new BuildException('Object is not set');
+ }
+
+ return $this->_object;
+ }
+
+ public function setCreateBuckets($createBuckets)
+ {
+ $this->_createBuckets = (bool) $createBuckets;
+ }
+
+ public function getCreateBuckets()
+ {
+ return (bool) $this->_createBuckets;
+ }
+
+ /**
+ * creator for _filesets
+ *
+ * @access public
+ * @return FileSet
+ */
+ public function createFileset()
+ {
+ $num = array_push($this->_filesets, new FileSet());
+ return $this->_filesets[$num-1];
+ }
+
+ /**
+ * getter for _filesets
+ *
+ * @access public
+ * @return array
+ */
+ public function getFilesets()
+ {
+ return $this->_filesets;
+ }
+
+ /**
+ * Determines what we're going to store in the object
+ *
+ * If _content has been set, this will get stored,
+ * otherwise, we read from _source
+ *
+ * @access public
+ * @return string
+ */
+ public function getObjectData()
+ {
+ try {
+ $content = $this->getContent();
+ } catch(BuildException $e) {
+ $source = $this->getSource();
+
+ if(!is_file($source)) {
+ throw new BuildException('Currently only files can be used as source');
+ }
+
+ $content = file_get_contents($source);
+ }
+
+ return $content;
+ }
+
+ /**
+ * Store the object on S3
+ *
+ * @access public
+ * @return void
+ */
+ public function execute()
+ {
+ if(!$this->isBucketAvailable()) {
+ if(!$this->getCreateBuckets()) {
+ throw new BuildException('Bucket doesn\'t exist and createBuckets not specified');
+ } else{
+ if(!$this->createBucket()) {
+ throw new BuildException('Bucket cannot be created');
+ }
+ }
+ }
+
+ // Filesets take precedence
+ if(!empty($this->_filesets)) {
+ $objects = array();
+
+ foreach($this->_filesets as $fs) {
+ if(!($fs instanceof FileSet)) {
+ continue;
+ }
+
+ $ds = $fs->getDirectoryScanner($this->getProject());
+ $objects = array_merge($objects, $ds->getIncludedFiles());
+ }
+
+ $fromDir = $fs->getDir($this->getProject())->getAbsolutePath();
+
+ foreach($objects as $object) {
+ $this->saveObject($object, file_get_contents($fromDir . DIRECTORY_SEPARATOR . $object));
+ }
+
+ return true;
+ }
+
+ $this->saveObject($this->getObject(), $this->getObjectData());
+ }
+
+ protected function saveObject($object, $data)
+ {
+ $object = $this->getObjectInstance($object);
+ $object->data = $data;
+ $object->save();
+
+ if(!$this->isObjectAvailable($object->key)) {
+ throw new BuildException('Upload failed');
+ }
+ }
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/SshTask.php b/classes/phing/tasks/ext/SshTask.php
index 557f5bc..311d3a7 100644
--- a/classes/phing/tasks/ext/SshTask.php
+++ b/classes/phing/tasks/ext/SshTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: SshTask.php 741 2010-02-24 13:14:10Z mrook $
+ * $Id: SshTask.php 1030 2011-01-12 14:49:51Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,7 +25,7 @@ require_once 'phing/Task.php';
* Execute commands on a remote host using ssh.
*
* @author Johan Van den Brande <johan at vandenbrande.com>
- * @version $Id: SshTask.php 741 2010-02-24 13:14:10Z mrook $
+ * @version $Id: SshTask.php 1030 2011-01-12 14:49:51Z mrook $
* @package phing.tasks.ext
*/
@@ -140,14 +140,14 @@ class SshTask extends Task {
public function init()
{
- if (!function_exists('ssh2_connect')) {
- throw new BuildException("To use SshTask, you need to install the SSH extension.");
- }
- return TRUE;
}
public function main()
{
+ if (!function_exists('ssh2_connect')) {
+ throw new BuildException("To use SshTask, you need to install the PHP SSH2 extension.");
+ }
+
$this->connection = ssh2_connect($this->host, $this->port);
if (is_null($this->connection)) {
throw new BuildException("Could not establish connection to " . $this->host . ":" . $this->port . "!");
diff --git a/classes/phing/tasks/ext/SymlinkTask.php b/classes/phing/tasks/ext/SymlinkTask.php
new file mode 100644
index 0000000..20167e1
--- /dev/null
+++ b/classes/phing/tasks/ext/SymlinkTask.php
@@ -0,0 +1,262 @@
+<?php
+
+/*
+ * $Id$
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once "phing/Task.php";
+
+/**
+ * Generates symlinks based on a target / link combination.
+ * Can also symlink contents of a directory, individually
+ *
+ * Single target symlink example:
+ * <code>
+ * <symlink target="/some/shared/file" link="${project.basedir}/htdocs/my_file" />
+ * </code>
+ *
+ * Symlink entire contents of directory
+ *
+ * This will go through the contents of "/my/shared/library/*"
+ * and create a symlink for each entry into ${project.basedir}/library/
+ * <code>
+ * <symlink link="${project.basedir}/library">
+ * <fileset dir="/my/shared/library">
+ * <include name="*" />
+ * </fileset>
+ * </symlink>
+ * </code>
+ *
+ * @author Andrei Serdeliuc <andrei at serdeliuc.ro>
+ * @extends Task
+ * @version $ID$
+ * @package phing.tasks.ext
+ */
+class SymlinkTask extends Task
+{
+ /**
+ * What we're symlinking from
+ *
+ * (default value: null)
+ *
+ * @var string
+ * @access private
+ */
+ private $_target = null;
+
+ /**
+ * Symlink location
+ *
+ * (default value: null)
+ *
+ * @var string
+ * @access private
+ */
+ private $_link = null;
+
+ /**
+ * Collection of filesets
+ * Used when linking contents of a directory
+ *
+ * (default value: array())
+ *
+ * @var array
+ * @access private
+ */
+ private $_filesets = array();
+
+ /**
+ * setter for _target
+ *
+ * @access public
+ * @param string $target
+ * @return void
+ */
+ public function setTarget($target)
+ {
+ $this->_target = $target;
+ }
+
+ /**
+ * setter for _link
+ *
+ * @access public
+ * @param string $link
+ * @return void
+ */
+ public function setLink($link)
+ {
+ $this->_link = $link;
+ }
+
+ /**
+ * creator for _filesets
+ *
+ * @access public
+ * @return FileSet
+ */
+ public function createFileset()
+ {
+ $num = array_push($this->_filesets, new FileSet());
+ return $this->_filesets[$num-1];
+ }
+
+ /**
+ * getter for _target
+ *
+ * @access public
+ * @return string
+ */
+ public function getTarget()
+ {
+ if($this->_target === null) {
+ throw new BuildException('Target not set');
+ }
+
+ return $this->_target;
+ }
+
+ /**
+ * getter for _link
+ *
+ * @access public
+ * @return string
+ */
+ public function getLink()
+ {
+ if($this->_link === null) {
+ throw new BuildException('Link not set');
+ }
+
+ return $this->_link;
+ }
+
+ /**
+ * getter for _filesets
+ *
+ * @access public
+ * @return array
+ */
+ public function getFilesets()
+ {
+ return $this->_filesets;
+ }
+
+ /**
+ * Generates an array of directories / files to be linked
+ * If _filesets is empty, returns getTarget()
+ *
+ * @access protected
+ * @return array|string
+ */
+ protected function getMap()
+ {
+ $fileSets = $this->getFilesets();
+
+ // No filesets set
+ // We're assuming single file / directory
+ if(empty($fileSets)) {
+ return $this->getTarget();
+ }
+
+ $targets = array();
+
+ foreach($fileSets as $fs) {
+ if(!($fs instanceof FileSet)) {
+ continue;
+ }
+
+ // We need a directory to store the links
+ if(!is_dir($this->getLink())) {
+ throw new BuildException('Link must be an existing directory when using fileset');
+ }
+
+ $fromDir = $fs->getDir($this->getProject())->getAbsolutePath();
+
+ if(!is_dir($fromDir)) {
+ $this->log('Directory doesn\'t exist: ' . $fromDir, Project::MSG_WARN);
+ continue;
+ }
+
+ $fsTargets = array();
+
+ $ds = $fs->getDirectoryScanner($this->getProject());
+
+ $fsTargets = array_merge(
+ $fsTargets,
+ $ds->getIncludedDirectories(),
+ $ds->getIncludedFiles()
+ );
+
+ // Add each target to the map
+ foreach($fsTargets as $target) {
+ if(!empty($target)) {
+ $targets[$target] = $fromDir . DIRECTORY_SEPARATOR . $target;
+ }
+ }
+ }
+
+ return $targets;
+ }
+
+ /**
+ * Main entry point for task
+ *
+ * @access public
+ * @return bool
+ */
+ public function main()
+ {
+ $map = $this->getMap();
+
+ // Single file symlink
+ if(is_string($map)) {
+ return $this->symlink($map, $this->getLink());
+ }
+
+ // Multiple symlinks
+ foreach($map as $name => $targetPath) {
+ $this->symlink($targetPath, $this->getLink() . DIRECTORY_SEPARATOR . $name);
+ }
+
+ return true;
+ }
+
+ /**
+ * Create the actual link
+ *
+ * @access protected
+ * @param string $target
+ * @param string $link
+ * @return bool
+ */
+ protected function symlink($target, $link)
+ {
+ if(file_exists($link)) {
+ $this->log('Link exists: ' . $link, Project::MSG_ERR);
+ return false;
+ }
+
+ $fs = FileSystem::getFileSystem();
+
+ $this->log('Linking: ' . $target . ' to ' . $link, Project::MSG_INFO);
+
+ return $fs->symlink($target, $link);
+ }
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/TarTask.php b/classes/phing/tasks/ext/TarTask.php
index b6b1e62..4d483af 100644
--- a/classes/phing/tasks/ext/TarTask.php
+++ b/classes/phing/tasks/ext/TarTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: TarTask.php 624 2009-11-23 12:36:31Z mrook $
+ * $Id: TarTask.php 843 2010-09-02 14:39:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -31,7 +31,7 @@ include_once 'phing/util/StringHelper.php';
* @author Stefano Mazzocchi <stefano at apache.org> (Ant)
* @author Stefan Bodewig <stefan.bodewig at epost.de> (Ant)
* @author Magesh Umasankar
- * @version $Id: TarTask.php 624 2009-11-23 12:36:31Z mrook $
+ * @version $Id: TarTask.php 843 2010-09-02 14:39:13Z mrook $
* @package phing.tasks.ext
*/
class TarTask extends MatchingTask {
@@ -121,7 +121,7 @@ class TarTask extends MatchingTask {
* @return void
* @access public
*/
- function setIncludeEmptyDirs($bool) {
+ public function setIncludeEmptyDirs($bool) {
$this->includeEmpty = (boolean) $bool;
}
diff --git a/classes/phing/tasks/ext/VersionTask.php b/classes/phing/tasks/ext/VersionTask.php
index 1dcef03..43b67ac 100644
--- a/classes/phing/tasks/ext/VersionTask.php
+++ b/classes/phing/tasks/ext/VersionTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: VersionTask.php 559 2009-09-02 08:28:08Z mwittje $
+ * $Id: VersionTask.php 819 2010-08-13 17:28:01Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -30,7 +30,7 @@ require_once 'phing/Task.php';
* Resulting version number is also published under supplied property.
*
* @author Mike Wittje <mw at mike.wittje.de>
- * @version $Id: VersionTask.php 559 2009-09-02 08:28:08Z mwittje $ $Rev $Revision: 559 $ $Date: 2009-09-02 10:28:08 +0200 (Wed, 02 Sep 2009) $ $Author: mwittje $
+ * @version $Id: VersionTask.php 819 2010-08-13 17:28:01Z mrook $ $Rev $Revision: 819 $ $Date: 2010-08-13 19:28:01 +0200 (Fri, 13 Aug 2010) $ $Author: mrook $
* @package phing.tasks.ext
*/
class VersionTask extends Task
@@ -100,13 +100,13 @@ class VersionTask extends Task
$this->checkProperty();
// read file
- $filecontent = file_get_contents($this->file);
+ $filecontent = trim(file_get_contents($this->file));
// get new version
$newVersion = $this->getVersion($filecontent);
// write new Version to file
- file_put_contents($this->file, $newVersion);
+ file_put_contents($this->file, $newVersion . "\n");
// publish new version number as property
$this->project->setProperty($this->property, $newVersion);
diff --git a/classes/phing/tasks/ext/XmlLintTask.php b/classes/phing/tasks/ext/XmlLintTask.php
index d343b6b..2bb5134 100644
--- a/classes/phing/tasks/ext/XmlLintTask.php
+++ b/classes/phing/tasks/ext/XmlLintTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: XmlLintTask.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: XmlLintTask.php 1001 2010-11-24 10:40:05Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -25,7 +25,7 @@ require_once 'phing/Task.php';
* A XML lint task. Checking syntax of one or more XML files against an XML Schema using the DOM extension.
*
* @author Knut Urdalen <knut.urdalen at telio.no>
- * @version $Id: XmlLintTask.php 552 2009-08-29 12:18:13Z mrook $
+ * @version $Id: XmlLintTask.php 1001 2010-11-24 10:40:05Z mrook $
* @package phing.tasks.ext
*/
class XmlLintTask extends Task {
@@ -33,6 +33,8 @@ class XmlLintTask extends Task {
protected $file; // the source file (from xml attribute)
protected $schema; // the schema file (from xml attribute)
protected $filesets = array(); // all fileset objects assigned to this task
+
+ protected $haltonfailure = true;
/**
* File to be performed syntax check on
@@ -57,21 +59,26 @@ class XmlLintTask extends Task {
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
+
+ /**
+ * Sets the haltonfailure attribute
+ *
+ * @param bool $haltonfailure
+ */
+ public function setHaltonfailure($haltonfailure) {
+ $this->haltonfailure = (bool) $haltonfailure;
+ }
/**
* Execute lint check against PhingFile or a FileSet
*/
public function main() {
- if(!isset($this->schema)) {
- throw new BuildException("Missing attribute 'schema'");
- }
- $schema = $this->schema->getPath();
- if(!file_exists($schema)) {
- throw new BuildException("File not found: ".$schema);
+ if(isset($this->schema) && !file_exists($this->schema->getPath())) {
+ throw new BuildException("Schema file not found: ".$this->schema->getPath());
}
if(!isset($this->file) and count($this->filesets) == 0) {
throw new BuildException("Missing either a nested fileset or attribute 'file' set");
@@ -93,6 +100,14 @@ class XmlLintTask extends Task {
}
restore_error_handler();
}
+
+ protected function logError($message) {
+ if ($this->haltonfailure) {
+ throw new BuildException($message);
+ } else {
+ $this->log($message, Project::MSG_ERR);
+ }
+ }
/**
* Performs validation
@@ -103,18 +118,26 @@ class XmlLintTask extends Task {
protected function lint($file) {
if(file_exists($file)) {
if(is_readable($file)) {
- $dom = new DOMDocument();
- $dom->load($file);
- if($dom->schemaValidate($this->schema->getPath())) {
- $this->log($file.' validated', Project::MSG_INFO);
- } else {
- $this->log($file.' fails to validate (See messages above)', Project::MSG_ERR);
- }
+ $dom = new DOMDocument();
+ if ($dom->load($file) === false) {
+ $error = libxml_get_last_error();
+ $this->logError($file.' is not well-formed (See messages above)');
+ } else {
+ if(isset($this->schema)) {
+ if($dom->schemaValidate($this->schema->getPath())) {
+ $this->log($file.' validated', Project::MSG_INFO);
+ } else {
+ $this->logError($file.' fails to validate (See messages above)');
+ }
+ } else {
+ $this->log($file.' is well-formed', Project::MSG_INFO);
+ }
+ }
} else {
- throw new BuildException('Permission denied: '.$file);
+ $this->logError('Permission denied: '.$file);
}
} else {
- throw new BuildException('File not found: '.$file);
+ $this->logError('File not found: '.$file);
}
}
diff --git a/classes/phing/tasks/ext/XmlPropertyTask.php b/classes/phing/tasks/ext/XmlPropertyTask.php
index ce914e0..a579cf7 100644
--- a/classes/phing/tasks/ext/XmlPropertyTask.php
+++ b/classes/phing/tasks/ext/XmlPropertyTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: XmlPropertyTask.php 634 2009-11-25 20:20:53Z mrook $
+ * $Id: XmlPropertyTask.php 971 2010-11-08 21:13:11Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,7 +26,7 @@ include_once 'phing/tasks/system/PropertyTask.php';
* Task for setting properties from an XML file in buildfiles.
*
* @author Jonathan Bond-Caron <jbondc at openmv.com>
- * @version $Revision: 634 $
+ * @version $Revision: 971 $
* @package phing.tasks.ext
* @since 2.4.0
* @see http://ant.apache.org/manual/CoreTasks/xmlproperty.html
@@ -38,7 +38,7 @@ class XmlPropertyTask extends PropertyTask {
private $_delimiter = ',';
/** Set a file to use as the source for properties. */
- function setFile($file) {
+ public function setFile($file) {
if (is_string($file)) {
$file = new PhingFile($file);
}
@@ -46,7 +46,7 @@ class XmlPropertyTask extends PropertyTask {
}
/** Get the PhingFile that is being used as property source. */
- function getFile() {
+ public function getFile() {
return $this->file;
}
@@ -57,7 +57,7 @@ class XmlPropertyTask extends PropertyTask {
* @return void
* @since 2.0
*/
- function setPrefix($prefix) {
+ public function setPrefix($prefix) {
$this->prefix = $prefix;
if (!StringHelper::endsWith(".", $prefix)) {
$this->prefix .= ".";
@@ -68,7 +68,7 @@ class XmlPropertyTask extends PropertyTask {
* @return string
* @since 2.0
*/
- function getPrefix() {
+ public function getPrefix() {
return $this->prefix;
}
@@ -77,14 +77,14 @@ class XmlPropertyTask extends PropertyTask {
*
* @param bool $yesNo
*/
- function setKeepRoot($yesNo) {
+ public function setKeepRoot($yesNo) {
$this->_keepRoot = (bool)$yesNo;
}
/**
* @return bool
*/
- function getKeepRoot() {
+ public function getKeepRoot() {
return $this->_keepRoot;
}
@@ -93,14 +93,14 @@ class XmlPropertyTask extends PropertyTask {
*
* @param bool $yesNo
*/
- function setCollapseAttributes($yesNo) {
+ public function setCollapseAttributes($yesNo) {
$this->_collapseAttr = (bool)$yesNo;
}
/**
* @return bool
*/
- function getCollapseAttributes() {
+ public function getCollapseAttributes() {
return $this->_collapseAttr;
}
@@ -109,14 +109,14 @@ class XmlPropertyTask extends PropertyTask {
*
* @param string $d
*/
- function setDelimiter($d) {
+ public function setDelimiter($d) {
$this->_delimiter = $d;
}
/**
* @return string
*/
- function getDelimiter() {
+ public function getDelimiter() {
return $this->_delimiter;
}
@@ -125,7 +125,7 @@ class XmlPropertyTask extends PropertyTask {
* if the task was give a file or env attribute
* here is where it is loaded
*/
- function main() {
+ public function main() {
if ($this->file === null ) {
throw new BuildException("You must specify file to load properties from", $this->getLocation());
@@ -182,6 +182,19 @@ class XmlPropertyTask extends PropertyTask {
if($this->_keepRoot) {
$path[] = dom_import_simplexml($xml)->tagName;
+
+ $prefix = implode('.', $path);
+
+ if (!empty($prefix))
+ $prefix .= '.';
+
+ // Check for attributes
+ foreach($xml->attributes() as $attribute => $val) {
+ if($this->_collapseAttr)
+ $prop->setProperty($prefix . "$attribute", (string)$val);
+ else
+ $prop->setProperty($prefix . "($attribute)", (string)$val);
+ }
}
$this->_addNode($xml, $path, $prop);
@@ -199,33 +212,25 @@ class XmlPropertyTask extends PropertyTask {
* @return void
*/
protected function _addNode($node, $path, $prop) {
-
foreach($node as $tag => $value) {
$prefix = implode('.', $path);
+ if (!empty($prefix) > 0)
+ $prefix .= '.';
// Check for attributes
foreach($value->attributes() as $attribute => $val) {
-
if($this->_collapseAttr)
- $prop->setProperty($prefix . ".$attribute", (string)$val);
+ $prop->setProperty($prefix . "$tag.$attribute", (string)$val);
else
- $prop->setProperty($prefix . "($attribute)", (string)$val);
+ $prop->setProperty($prefix . "$tag($attribute)", (string)$val);
}
- //echo "\r\nCHILDREN ". count($value->children()). is_array($value);
// Add tag
if(count($value->children())) {
-
- //echo "\r\nOBJECT $prefix.$tag ";
-
- $path[] = $tag;
- $this->_addNode($value, $path, $prop);
-
+ $this->_addNode($value, array_merge($path, array($tag)), $prop);
} else {
- //echo "\r\nADD $prefix.$tag";
-
$val = (string)$value;
/* Check for * and ** on 'exclude' and 'include' tag / ant seems to do this? could use FileSet here
@@ -239,7 +244,7 @@ class XmlPropertyTask extends PropertyTask {
// </project>
//
// Would be come project.exclude = file/a.php,file/a.php
- $p = empty($prefix) ? $tag : $prefix . ".$tag";
+ $p = empty($prefix) ? $tag : $prefix . $tag;
$prop->append($p, (string)$val, $this->_delimiter);
}
}
diff --git a/classes/phing/tasks/ext/ZendCodeAnalyzerTask.php b/classes/phing/tasks/ext/ZendCodeAnalyzerTask.php
index 72111f4..36755aa 100644
--- a/classes/phing/tasks/ext/ZendCodeAnalyzerTask.php
+++ b/classes/phing/tasks/ext/ZendCodeAnalyzerTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ZendCodeAnalyzerTask.php 539 2009-08-26 08:36:05Z mrook $
+ * $Id: ZendCodeAnalyzerTask.php 843 2010-09-02 14:39:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -59,7 +59,7 @@ require_once 'phing/Task.php';
* <b>expr-unused</b> - Expression result is never used
*
* @author Knut Urdalen <knut.urdalen at gmail.com>
- * @version $Id: ZendCodeAnalyzerTask.php 539 2009-08-26 08:36:05Z mrook $
+ * @version $Id: ZendCodeAnalyzerTask.php 843 2010-09-02 14:39:13Z mrook $
* @package phing.tasks.ext
*/
class ZendCodeAnalyzerTask extends Task
@@ -113,7 +113,7 @@ class ZendCodeAnalyzerTask extends Task
* Sets the haltonwarning flag
* @param boolean $value
*/
- function setHaltonwarning($value)
+ public function setHaltonwarning($value)
{
$this->haltonwarning = $value;
}
@@ -123,7 +123,7 @@ class ZendCodeAnalyzerTask extends Task
*
* @return FileSet The created fileset object
*/
- function createFileSet() {
+ public function createFileSet() {
$num = array_push($this->filesets, new FileSet());
return $this->filesets[$num-1];
}
diff --git a/classes/phing/tasks/ext/ZipTask.php b/classes/phing/tasks/ext/ZipTask.php
index 3ef3923..abb259d 100644
--- a/classes/phing/tasks/ext/ZipTask.php
+++ b/classes/phing/tasks/ext/ZipTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ZipTask.php 758 2010-04-06 14:47:07Z mrook $
+ * $Id: ZipTask.php 843 2010-09-02 14:39:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,7 +28,7 @@ include_once 'phing/util/StringHelper.php';
* Creates a zip archive using PHP ZipArchive extension/
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: ZipTask.php 758 2010-04-06 14:47:07Z mrook $
+ * @version $Id: ZipTask.php 843 2010-09-02 14:39:13Z mrook $
* @package phing.tasks.ext
* @since 2.1.0
*/
@@ -102,7 +102,7 @@ class ZipTask extends MatchingTask {
* @return void
* @access public
*/
- function setIncludeEmptyDirs($bool) {
+ public function setIncludeEmptyDirs($bool) {
$this->includeEmpty = (boolean) $bool;
}
diff --git a/classes/phing/tasks/ext/coverage/CoverageSetupTask.php b/classes/phing/tasks/ext/coverage/CoverageSetupTask.php
index e14af53..79a787c 100644
--- a/classes/phing/tasks/ext/coverage/CoverageSetupTask.php
+++ b/classes/phing/tasks/ext/coverage/CoverageSetupTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: CoverageSetupTask.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: CoverageSetupTask.php 980 2010-11-10 13:01:40Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -29,7 +29,7 @@ require_once 'phing/tasks/ext/coverage/CoverageMerger.php';
* Initializes a code coverage database
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: CoverageSetupTask.php 552 2009-08-29 12:18:13Z mrook $
+ * @version $Id: CoverageSetupTask.php 980 2010-11-10 13:01:40Z mrook $
* @package phing.tasks.ext.coverage
* @since 2.1.0
*/
@@ -115,6 +115,18 @@ class CoverageSetupTask extends Task
function main()
{
+ /**
+ * Whitelist files when using PHPUnit > 3.5
+ */
+ @include_once 'PHPUnit/Runner/Version.php';
+
+ if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0') >= 0) {
+ $newFilter = true;
+ } else {
+ $newFilter = false;
+ @include_once 'PHPUnit/Util/Filter.php';
+ }
+
$files = $this->getFilenames();
$this->log("Setting up coverage database for " . count($files) . " files");
@@ -127,6 +139,12 @@ class CoverageSetupTask extends Task
$filename = $file['key'];
$props->setProperty($filename, serialize(array('fullname' => $fullname, 'coverage' => array())));
+
+ if ($newFilter) {
+ PHP_CodeCoverage_Filter::getInstance()->addFileToWhiteList($file['fullname']);
+ } else {
+ PHPUnit_Util_Filter::addFileToWhitelist($file['fullname']);
+ }
}
$dbfile = new PhingFile($this->database);
diff --git a/classes/phing/tasks/ext/dbdeploy/DbDeployTask.php b/classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
index 207bd33..82d7141 100644
--- a/classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
+++ b/classes/phing/tasks/ext/dbdeploy/DbDeployTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: DbDeployTask.php 636 2009-12-03 10:08:37Z mrook $
+ * $Id: DbDeployTask.php 1004 2010-12-02 09:28:41Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -29,7 +29,7 @@ require_once 'phing/tasks/ext/dbdeploy/DbmsSyntaxFactory.php';
* <dbdeploy url="mysql:host=localhost;dbname=test" userid="dbdeploy" password="dbdeploy" dir="db" outputfile="">
*
* @author Luke Crouch at SourceForge (http://sourceforge.net)
- * @version $Revision: 636 $
+ * @version $Revision: 1004 $
* @package phing.tasks.ext.dbdeploy
*/
@@ -130,7 +130,11 @@ class DbDeployTask extends Task {
$fullFileName = $this->dir . '/' . $fileName;
$fh = fopen($fullFileName, 'r');
$contents = fread($fh, filesize($fullFileName));
- $undoSQLFromFile = substr($contents,strpos($contents, '-- //@UNDO')+10);
+ // allow construct with and without space added
+ $undoSQLFromFileSplit = strpos($contents, '-- //@UNDO');
+ if ($undoSQLFromFileSplit === false)
+ $undoSQLFromFileSplit = strpos($contents, '--//@UNDO');
+ $undoSQLFromFile = substr($contents,$undoSQLFromFileSplit+10);
$sqlToPerformUndo .= $undoSQLFromFile;
$sqlToPerformUndo .= 'DELETE FROM ' . DbDeployTask::$TABLE_NAME . ' WHERE change_number = ' . $fileChangeNumber . ' AND delta_set = \'' . $this->deltaSet . '\';' . "\n";
$sqlToPerformUndo .= '-- Fragment ends: ' . $fileChangeNumber . ' --' . "\n";
diff --git a/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxFactory.php b/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxFactory.php
index ffa601e..3e75450 100644
--- a/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxFactory.php
+++ b/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxFactory.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: DbmsSyntaxFactory.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: DbmsSyntaxFactory.php 1019 2010-12-22 09:22:55Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,7 +26,7 @@ require_once 'phing/tasks/ext/dbdeploy/DbmsSyntax.php';
* Factory for generating dbms-specific syntax-generating objects
*
* @author Luke Crouch at SourceForge (http://sourceforge.net)
- * @version $Revision: 552 $
+ * @version $Revision: 1019 $
* @package phing.tasks.ext.dbdeploy
*/
@@ -51,6 +51,9 @@ class DbmsSyntaxFactory
case('mssql'):
require_once 'phing/tasks/ext/dbdeploy/DbmsSyntaxMsSql.php';
return new DbmsSyntaxMsSql();
+ case('pgsql'):
+ require_once 'phing/tasks/ext/dbdeploy/DbmsSyntaxPgSQL.php';
+ return new DbmsSyntaxPgSQL();
default:
throw new Exception($this->dbms . ' is not supported by dbdeploy task.');
}
diff --git a/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxPgSQL.php b/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxPgSQL.php
new file mode 100644
index 0000000..eb6bdc9
--- /dev/null
+++ b/classes/phing/tasks/ext/dbdeploy/DbmsSyntaxPgSQL.php
@@ -0,0 +1,36 @@
+<?php
+/*
+ * $Id: DbmsSyntaxPgSQL.php 1027 2011-01-06 15:52:45Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+/**
+ * Utility class for generating necessary server-specific SQL commands
+ *
+ * @author Rémy BREUILS
+ * @version $Revision: 1027 $
+ * @package phing.tasks.ext.dbdeploy
+ */
+class DbmsSyntaxPgSQL extends DbmsSyntax
+{
+ public function generateTimestamp()
+ {
+ return "NOW()";
+ }
+}
+
diff --git a/classes/phing/tasks/ext/git/GitBaseTask.php b/classes/phing/tasks/ext/git/GitBaseTask.php
new file mode 100644
index 0000000..ee50db9
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitBaseTask.php
@@ -0,0 +1,134 @@
+<?php
+/*
+ * $Id: GitBaseTask.php 848 2010-09-04 18:36:34Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/BuildException.php';
+
+/**
+ * Base class for Git tasks
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitBaseTask.php 848 2010-09-04 18:36:34Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+abstract class GitBaseTask extends Task
+{
+ /**
+ * Bath to git binary
+ * @var string
+ */
+ private $gitPath = '/usr/bin/git';
+
+ /**
+ * @var VersionControl_Git
+ */
+ private $gitClient = null;
+
+ /**
+ * Current repository directory
+ * @var string
+ */
+ private $repository;
+
+ /**
+ * Initialize Task.
+ * Check and include necessary libraries.
+ */
+ public function init()
+ {
+ require_once 'VersionControl/Git.php';
+ if (false == class_exists('VersionControl_Git')) {
+ throw new Exception("The Git tasks depend on PEAR\'s "
+ . "VersionControl_Git package.");
+ }
+ }
+
+ /**
+ * Set repository directory
+ *
+ * @param string $repository Repo directory
+ * @return GitBaseTask
+ */
+ public function setRepository($repository)
+ {
+ $this->repository = $repository;
+ return $this;
+ }
+
+ /**
+ * Get repository directory
+ *
+ * @return string
+ */
+ public function getRepository()
+ {
+ return $this->repository;
+ }
+
+ /**
+ * Set path to git executable
+ *
+ * @param string $gitPath New path to git repository
+ * @return GitBaseTask
+ */
+ public function setGitPath($gitPath)
+ {
+ $this->gitPath = $gitPath;
+ return $this;
+ }
+
+ /**
+ * Get path to git executable
+ *
+ * @return string
+ */
+ public function getGitPath()
+ {
+ return $this->gitPath;
+ }
+
+ protected function getGitClient($reset = false, $repository = null)
+ {
+ $this->gitClient = ($reset === true) ? null : $this->gitClient;
+ $repository = (null === $repository)
+ ? $this->getRepository()
+ : $repository;
+
+ if(null === $this->gitClient) {
+ try {
+ $this->gitClient = new VersionControl_Git($repository);
+ } catch (VersionControl_Git_Exception $e) {
+ // re-package
+ throw new BuildException(
+ 'You must specify readable directory as repository.');
+
+ }
+ }
+ $this->gitClient->setGitCommandPath($this->getGitPath());
+
+ return $this->gitClient;
+ }
+}
+
+
+
diff --git a/classes/phing/tasks/ext/git/GitBranchTask.php b/classes/phing/tasks/ext/git/GitBranchTask.php
new file mode 100644
index 0000000..2374931
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitBranchTask.php
@@ -0,0 +1,296 @@
+<?php
+/*
+ * $Id: GitBranchTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-branch
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitBranchTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitBranchTask extends GitBaseTask
+{
+ /**
+ * Branch name
+ * @var string
+ */
+ private $branchname;
+
+ /**
+ * New Branch name for git-branch -m | -M
+ * @var string
+ */
+ private $newbranch;
+
+ /**
+ * If not HEAD, specify starting point
+ * @var string
+ */
+ private $startPoint;
+
+ /**
+ * --set-upstream key to git-branch
+ * @var boolean
+ */
+ private $setUpstream = false;
+
+ /**
+ * --track key to git-branch
+ * @var boolean
+ */
+ private $track = false;
+
+ /**
+ * --no-track key to git-branch
+ * @var boolean
+ */
+ private $noTrack = false;
+
+ /**
+ * --force, -f key to git-branch
+ * @var boolean
+ */
+ private $force = false;
+
+ /**
+ * -d, -D, -m, -M options to git-branch
+ * Respective task options:
+ * delete, forceDelete, move, forceMove
+ * @var array
+ */
+ private $extraOptions = array(
+ 'd' => false,
+ 'D' => false,
+ 'm' => false,
+ 'M' => false,
+ );
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+ if (null === $this->getBranchname()) {
+ throw new BuildException('"branchname" is required parameter');
+ }
+
+ // if we are moving branch, we need to know new name
+ if ($this->isMove() || $this->isForceMove()) {
+ if (null === $this->getNewbranch()) {
+ throw new BuildException('"newbranch" is required parameter');
+ }
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('branch');
+ $command
+ ->setOption('set-upstream', $this->isSetUpstream())
+ ->setOption('no-track', $this->isNoTrack())
+ ->setOption('force', $this->isForce());
+ if ($this->isNoTrack() == false) {
+ $command->setOption('track', $this->getTrack());
+ }
+
+ // check extra options (delete, move)
+ foreach ($this->extraOptions as $option => $flag) {
+ if ($flag) {
+ $command->setOption($option, true);
+ }
+ }
+
+ $command->addArgument($this->getBranchname());
+
+ if (null !== $this->getStartPoint()) {
+ $command->addArgument($this->getStartPoint());
+ }
+
+ if (null !== $this->getNewbranch()) {
+ $command->addArgument($this->getNewbranch());
+ }
+
+ $this->log('git-branch command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log(
+ sprintf('git-branch: branch "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ $this->log('git-branch output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setSetUpstream($flag)
+ {
+ $this->setUpstream = $flag;
+ }
+
+ public function getSetUpstream()
+ {
+ return $this->setUpstream;
+ }
+
+ public function isSetUpstream()
+ {
+ return $this->getSetUpstream();
+ }
+
+ public function setTrack($flag)
+ {
+ $this->track = $flag;
+ }
+
+ public function getTrack()
+ {
+ return $this->track;
+ }
+
+ public function isTrack()
+ {
+ return $this->getTrack();
+ }
+
+ public function setNoTrack($flag)
+ {
+ $this->noTrack = $flag;
+ }
+
+ public function getNoTrack()
+ {
+ return $this->noTrack;
+ }
+
+ public function isNoTrack()
+ {
+ return $this->getNoTrack();
+ }
+
+ public function setForce($flag)
+ {
+ $this->force = $flag;
+ }
+
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ public function isForce()
+ {
+ return $this->getForce();
+ }
+
+ public function setBranchname($branchname)
+ {
+ $this->branchname = $branchname;
+ }
+
+ public function getBranchname()
+ {
+ return $this->branchname;
+ }
+
+ public function setStartPoint($startPoint)
+ {
+ $this->startPoint = $startPoint;
+ }
+
+ public function getStartPoint()
+ {
+ return $this->startPoint;
+ }
+
+ public function setDelete($flag)
+ {
+ $this->extraOptions['d'] = $flag;
+ }
+
+ public function getDelete()
+ {
+ return $this->extraOptions['d'];
+ }
+
+ public function isDelete()
+ {
+ return $this->getDelete();
+ }
+
+ public function setForceDelete($flag)
+ {
+ $this->extraOptions['D'] = $flag;
+ }
+
+ public function getForceDelete()
+ {
+ return $this->extraOptions['D'];
+ }
+
+ public function setMove($flag)
+ {
+ $this->extraOptions['m'] = $flag;
+ }
+
+ public function getMove()
+ {
+ return $this->extraOptions['m'];
+ }
+
+ public function isMove()
+ {
+ return $this->getMove();
+ }
+
+ public function setForceMove($flag)
+ {
+ $this->extraOptions['M'] = $flag;
+ }
+
+ public function getForceMove()
+ {
+ return $this->extraOptions['M'];
+ }
+
+ public function isForceMove()
+ {
+ return $this->getForceMove();
+ }
+
+ public function setNewBranch($name)
+ {
+ $this->newbranch = $name;
+ }
+
+ public function getNewBranch()
+ {
+ return $this->newbranch;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitCheckoutTask.php b/classes/phing/tasks/ext/git/GitCheckoutTask.php
new file mode 100644
index 0000000..7291d9a
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitCheckoutTask.php
@@ -0,0 +1,256 @@
+<?php
+/*
+ * $Id: GitCheckoutTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+/**
+ * Wrapper around git-checkout
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitCheckoutTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitCheckoutTask extends GitBaseTask
+{
+ /**
+ * Branch name
+ * @var string
+ */
+ private $branchname;
+
+ /**
+ * If not HEAD, specify starting point
+ * @var string
+ */
+ private $startPoint;
+
+ /**
+ * --force, -f key to git-checkout
+ * @var boolean
+ */
+ private $force = false;
+
+ /**
+ * --quiet, -q key to git-checkout
+ * @var boolean
+ */
+ private $quiet = false;
+
+ /**
+ * When creating a new branch, set up "upstream" configuration.
+ * --track key to git-checkout
+ * @var boolean
+ */
+ private $track = false;
+
+ /**
+ * Do not set up "upstream" configuration
+ * --no-track key to git-checkout
+ * @var boolean
+ */
+ private $noTrack = false;
+
+ /**
+ * -b, -B, -m options to git-checkout
+ * Respective task options:
+ * create, forceCreate, merge
+ * @var array
+ */
+ private $extraOptions = array(
+ 'b' => false,
+ 'B' => false,
+ 'm' => false,
+ );
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+ if (null === $this->getBranchname()) {
+ throw new BuildException('"branchname" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('checkout');
+ $command
+ ->setOption('no-track', $this->isNoTrack())
+ ->setOption('q', $this->isQuiet())
+ ->setOption('force', $this->isForce())
+ ->setOption('b', $this->isCreate())
+ ->setOption('B', $this->isForceCreate())
+ ->setOption('m', $this->isMerge());
+ if ($this->isNoTrack()) {
+ $command->setOption('track', $this->isTrack());
+ }
+
+ $command->addArgument($this->getBranchname());
+
+ if (null !== $this->getStartPoint()) {
+ $command->addArgument($this->getStartPoint());
+ }
+
+ $this->log('git-checkout command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log(
+ sprintf('git-checkout: checkout "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ $this->log('git-checkout output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setBranchname($branchname)
+ {
+ $this->branchname = $branchname;
+ }
+
+ public function getBranchname()
+ {
+ return $this->branchname;
+ }
+
+ public function setStartPoint($startPoint)
+ {
+ $this->startPoint = $startPoint;
+ }
+
+ public function getStartPoint()
+ {
+ return $this->startPoint;
+ }
+
+ public function setForce($flag)
+ {
+ $this->force = $flag;
+ }
+
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ public function isForce()
+ {
+ return $this->getForce();
+ }
+
+ public function setQuiet($flag)
+ {
+ $this->quiet = $flag;
+ }
+
+ public function getQuiet()
+ {
+ return $this->quiet;
+ }
+
+ public function isQuiet()
+ {
+ return $this->getQuiet();
+ }
+
+ public function setTrack($flag)
+ {
+ $this->track = $flag;
+ }
+
+ public function getTrack()
+ {
+ return $this->track;
+ }
+
+ public function isTrack()
+ {
+ return $this->getTrack();
+ }
+
+ public function setNoTrack($flag)
+ {
+ $this->noTrack = $flag;
+ }
+
+ public function getNoTrack()
+ {
+ return $this->noTrack;
+ }
+
+ public function isNoTrack()
+ {
+ return $this->getNoTrack();
+ }
+
+ public function setCreate($flag)
+ {
+ $this->extraOptions['b'] = $flag;
+ }
+
+ public function getCreate()
+ {
+ return $this->extraOptions['b'];
+ }
+
+ public function isCreate()
+ {
+ return $this->getCreate();
+ }
+
+ // -B flag is not found in all versions of git
+ // --force is present everywhere
+ public function setForceCreate($flag)
+ {
+ $this->setForce($flag);
+ }
+
+ public function getForceCreate()
+ {
+ return $this->extraOptions['B'];
+ }
+
+ public function isForceCreate()
+ {
+ return $this->getForceCreate();
+ }
+
+ public function setMerge($flag)
+ {
+ $this->extraOptions['m'] = $flag;
+ }
+
+ public function getMerge()
+ {
+ return $this->extraOptions['m'];
+ }
+
+ public function isMerge()
+ {
+ return $this->getMerge();
+ }
+}
diff --git a/classes/phing/tasks/ext/git/GitCloneTask.php b/classes/phing/tasks/ext/git/GitCloneTask.php
new file mode 100644
index 0000000..ba612be
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitCloneTask.php
@@ -0,0 +1,128 @@
+<?php
+/*
+ * $Id: GitCloneTask.php 904 2010-10-05 09:15:19Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+/**
+ * Wrapper around git-clone
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitCloneTask.php 904 2010-10-05 09:15:19Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitCloneTask extends GitBaseTask
+{
+ /**
+ * Whether --bare key should be set for git-init
+ * @var string
+ */
+ private $isBare = false;
+
+ /**
+ * Path to target directory
+ * @var string
+ */
+ private $targetPath;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ if (null === $this->getTargetPath()) {
+ throw new BuildException('"targetPath" is required parameter');
+ }
+
+ $files = @scandir($this->getTargetPath());
+ if (isset($files) && is_array($files) && (count($files) > 2)) {
+ throw new BuildException(
+ sprintf(
+ '"%s" target directory is not empty',
+ $this->getTargetPath())
+ );
+ }
+
+ $client = $this->getGitClient(false, $this->getTargetPath());
+
+ try {
+ $client->createClone(
+ $this->getRepository(),
+ $this->isBare(),
+ $this->getTargetPath());
+ } catch (Exception $e) {
+ throw new BuildException('The remote end hung up unexpectedly');
+ }
+
+ $msg = 'git-clone: cloning '
+ . ($this->isBare() ? '(bare) ' : '')
+ . '"' . $this->getRepository() .'" repository'
+ . ' to "' . $this->getTargetPath() .'" directory';
+ $this->log($msg, Project::MSG_INFO);
+ }
+
+ /**
+ * Get path to target direcotry repo
+ *
+ * @return string
+ */
+ public function getTargetPath()
+ {
+ return $this->targetPath;
+ }
+
+ /**
+ * Set path to source repo
+ *
+ * @param string $targetPath Path to repository used as source
+ * @return void
+ */
+ public function setTargetPath($targetPath)
+ {
+ $this->targetPath = $targetPath;
+ }
+
+ /**
+ * Alias @see getBare()
+ *
+ * @return string
+ */
+ public function isBare()
+ {
+ return $this->getBare();
+ }
+
+ public function getBare()
+ {
+ return $this->isBare;
+ }
+
+ public function setBare($flag)
+ {
+ $this->isBare = (bool)$flag;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitFetchTask.php b/classes/phing/tasks/ext/git/GitFetchTask.php
new file mode 100644
index 0000000..223b2ba
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitFetchTask.php
@@ -0,0 +1,284 @@
+<?php
+/*
+ * $Id: GitFetchTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-fetch
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitFetchTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitFetchTask extends GitBaseTask
+{
+ /**
+ * --force, -f key to git-fetch
+ * @var boolean
+ */
+ private $force = false;
+
+ /**
+ * --quiet, -q key to git-fetch
+ * @var boolean
+ */
+ private $quiet = false;
+
+ /**
+ * Fetch all remotes
+ * --all key to git-fetch
+ * @var boolean
+ */
+ private $allRemotes = false;
+
+ /**
+ * Keep downloaded pack
+ * --keep key to git-fetch
+ * @var boolean
+ */
+ private $keepFiles = false;
+
+ /**
+ * After fetching, remove any remote tracking branches which no longer
+ * exist on the remote.
+ * --prune key to git fetch
+ * @var boolean
+ */
+ private $prune = false;
+
+ /**
+ * Disable/enable automatic tag following
+ * --no-tags key to git-fetch
+ * @var boolean
+ */
+ private $noTags = false;
+
+ /**
+ * Fetch all tags (even not reachable from branch heads)
+ * --tags key to git-fetch
+ * @var boolean
+ */
+ private $tags = false;
+
+ /**
+ * <group> argument to git-fetch
+ * @var string
+ */
+ private $group;
+
+ /**
+ * <repository> argument to git-fetch
+ * @var string
+ */
+ private $source = 'origin';
+
+ /**
+ * <refspec> argument to git-fetch
+ * @var string
+ */
+ private $refspec;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('fetch');
+ $command
+ ->setOption('tags', $this->isTags())
+ ->setOption('no-tags', $this->isNoTags())
+ ->setOption('prune', $this->isPrune())
+ ->setOption('keep', $this->isKeepFiles())
+ ->setOption('q', $this->isQuiet())
+ ->setOption('force', $this->isForce());
+
+ // set operation target
+ if ($this->isAllRemotes()) { // --all
+ $command->setOption('all', true);
+ } elseif ($this->getGroup()) { // <group>
+ $command->addArgument($this->getGroup());
+ } elseif ($this->getSource()) { // <repository> [<refspec>]
+ $command->addArgument($this->getSource());
+ if ($this->getRefspec()) {
+ $command->addArgument($this->getRefspec());
+ }
+ } else {
+ throw new BuildException('No remote repository specified');
+ }
+
+ $this->log('git-fetch command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log(
+ sprintf('git-fetch: branch "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ $this->log('git-fetch output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setForce($flag)
+ {
+ $this->force = $flag;
+ }
+
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ public function isForce()
+ {
+ return $this->getForce();
+ }
+
+ public function setQuiet($flag)
+ {
+ $this->quiet = $flag;
+ }
+
+ public function getQuiet()
+ {
+ return $this->quiet;
+ }
+
+ public function isQuiet()
+ {
+ return $this->getQuiet();
+ }
+
+ public function setAll($flag)
+ {
+ $this->allRemotes = $flag;
+ }
+
+ public function getAll()
+ {
+ return $this->allRemotes;
+ }
+
+ public function isAllRemotes()
+ {
+ return $this->getAll();
+ }
+
+ public function setKeep($flag)
+ {
+ $this->keepFiles = $flag;
+ }
+
+ public function getKeep()
+ {
+ return $this->keepFiles;
+ }
+
+ public function isKeepFiles()
+ {
+ return $this->getKeep();
+ }
+
+ public function setPrune($flag)
+ {
+ $this->prune = $flag;
+ }
+
+ public function getPrune()
+ {
+ return $this->prune;
+ }
+
+ public function isPrune()
+ {
+ return $this->getPrune();
+ }
+
+ public function setNoTags($flag)
+ {
+ $this->noTags = $flag;
+ }
+
+ public function getNoTags()
+ {
+ return $this->noTags;
+ }
+
+ public function isNoTags()
+ {
+ return $this->getNoTags();
+ }
+
+ public function setTags($flag)
+ {
+ $this->tags = $flag;
+ }
+
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ public function isTags()
+ {
+ return $this->getTags();
+ }
+
+ public function setSource($source)
+ {
+ $this->source = $source;
+ }
+
+ public function getSource()
+ {
+ return $this->source;
+ }
+
+ public function setRefspec($spec)
+ {
+ $this->refspec = $spec;
+ }
+
+ public function getRefspec()
+ {
+ return $this->refspec;
+ }
+
+ public function setGroup($group)
+ {
+ $this->group = $group;
+ }
+
+ public function getGroup()
+ {
+ return $this->group;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitGcTask.php b/classes/phing/tasks/ext/git/GitGcTask.php
new file mode 100644
index 0000000..1a3823d
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitGcTask.php
@@ -0,0 +1,158 @@
+<?php
+/*
+ * $Id: GitGcTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+/**
+ * Wrapper around git-gc
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitGcTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitGcTask extends GitBaseTask
+{
+ /**
+ * --aggressive key to git-gc
+ * @var boolean
+ */
+ private $isAggressive = false;
+
+ /**
+ * --auto key to git-gc
+ * @var boolean
+ */
+ private $isAuto = false;
+
+ /**
+ * --no-prune key to git-gc
+ * @var boolean
+ */
+ private $noPrune = false;
+
+ /**
+ * --prune=<date>option of git-gc
+ * @var string
+ */
+ private $prune = '2.weeks.ago';
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('gc');
+ $command
+ ->setOption('aggressive', $this->isAggressive())
+ ->setOption('auto', $this->isAuto())
+ ->setOption('no-prune', $this->isNoPrune());
+ if ($this->isNoPrune() == false) {
+ $command->setOption('prune', $this->getPrune());
+ }
+
+ // suppress output
+ $command->setOption('q');
+
+ $this->log('git-gc command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed');
+ }
+
+ $this->log(
+ sprintf('git-gc: cleaning up "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ }
+
+ /**
+ * @see getAggressive()
+ */
+ public function isAggressive()
+ {
+ return $this->getAggressive();
+ }
+
+ public function getAggressive()
+ {
+ return $this->isAggressive;
+ }
+
+ public function setAggressive($flag)
+ {
+ $this->isAggressive = (bool)$flag;
+ }
+
+ /**
+ * @see getAuto()
+ */
+ public function isAuto()
+ {
+ return $this->getAuto();
+ }
+
+ public function getAuto()
+ {
+ return $this->isAuto;
+ }
+
+ public function setAuto($flag)
+ {
+ $this->isAuto = (bool)$flag;
+ }
+
+ /**
+ * @see NoPrune()
+ */
+ public function isNoPrune()
+ {
+ return $this->getNoPrune();
+ }
+
+ public function getNoPrune()
+ {
+ return $this->noPrune;
+ }
+
+ public function setNoPrune($flag)
+ {
+ $this->noPrune = (bool)$flag;
+ }
+
+ public function getPrune()
+ {
+ return $this->prune;
+ }
+
+ public function setPrune($date)
+ {
+ $this->prune = $date;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitInitTask.php b/classes/phing/tasks/ext/git/GitInitTask.php
new file mode 100644
index 0000000..6de280d
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitInitTask.php
@@ -0,0 +1,81 @@
+<?php
+/*
+ * $Id: GitInitTask.php 847 2010-09-03 23:43:33Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/BuildException.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Repository initialization task
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitInitTask.php 847 2010-09-03 23:43:33Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitInitTask extends GitBaseTask
+{
+
+ /**
+ * Whether --bare key should be set for git-init
+ * @var string
+ */
+ private $isBare = false;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient();
+ $client->initRepository($this->isBare());
+
+ $msg = 'git-init: initializing '
+ . ($this->isBare() ? '(bare) ' : '')
+ . '"' . $this->getRepository() .'" repository';
+ $this->log($msg, Project::MSG_INFO);
+ }
+
+ /**
+ * Alias @see getBare()
+ *
+ * @return string
+ */
+ public function isBare()
+ {
+ return $this->getBare();
+ }
+
+ public function getBare()
+ {
+ return $this->isBare;
+ }
+
+ public function setBare($flag)
+ {
+ $this->isBare = (bool)$flag;
+ }
+}
diff --git a/classes/phing/tasks/ext/git/GitLogTask.php b/classes/phing/tasks/ext/git/GitLogTask.php
new file mode 100644
index 0000000..fdceff1
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitLogTask.php
@@ -0,0 +1,270 @@
+<?php
+/*
+ * $Id: GitLogTask.php 1047 2011-03-02 16:54:32Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-log
+ *
+ * @author Evan Kaufman <evan at digitalflophouse.com>
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitLogTask.php 1047 2011-03-02 16:54:32Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.5
+ */
+class GitLogTask extends GitBaseTask
+{
+ /**
+ * Generate a diffstat. See --stat of git-log
+ * @var string|boolean
+ */
+ private $stat = false;
+
+ /**
+ * Names + status of changed files. See --name-status of git-log
+ * @var boolean
+ */
+ private $nameStatus = false;
+
+ /**
+ * Number of commits to show. See -<n>|-n|--max-count of git-log
+ * @var integer
+ */
+ private $maxCount;
+
+ /**
+ * Don't show commits with more than one parent. See --no-merges of git-log
+ * @var boolean
+ */
+ private $noMerges = false;
+
+ /**
+ * Commit format. See --format of git-log
+ * @var string
+ */
+ private $format = 'medium';
+
+ /**
+ * Date format. See --date of git-log
+ * @var string
+ */
+ private $date;
+
+ /**
+ * <since> argument to git-log
+ * @var string
+ */
+ private $sinceCommit;
+
+ /**
+ * <until> argument to git-log
+ * @var string
+ */
+ private $untilCommit = 'HEAD';
+
+ /**
+ * <path> arguments to git-log
+ * Accepts one or more paths delimited by PATH_SEPARATOR
+ * @var string
+ */
+ private $paths;
+
+ /**
+ * Property name to set with output value from git-log
+ * @var string
+ */
+ private $outputProperty;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('log');
+ $command
+ ->setOption('stat', $this->getStat())
+ ->setOption('name-status', $this->isNameStatus())
+ ->setOption('no-merges', $this->isNoMerges())
+ ->setOption('format', $this->getFormat());
+
+ if (null !== $this->getMaxCount()) {
+ $command->setOption('max-count', $this->getMaxCount());
+ }
+
+ if (null !== $this->getDate()) {
+ $command->setOption('date', $this->getDate());
+ }
+
+ if (null !== $this->getSince()) {
+ $command->setOption('since', $this->getSince());
+ }
+ $command->setOption('until', $this->getUntil());
+
+ $command->addDoubleDash(true);
+ if (null !== $this->getPaths()) {
+ $command->addDoubleDash(false);
+ $paths = explode(PATH_SEPARATOR, $this->getPaths());
+ foreach ($paths as $path) {
+ $command->addArgument($path);
+ }
+ }
+
+ $this->log('git-log command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed');
+ }
+
+ if (null !== $this->outputProperty) {
+ $this->project->setProperty($this->outputProperty, $output);
+ }
+
+ $this->log(
+ sprintf('git-log: commit log for "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ $this->log('git-log output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setStat($stat)
+ {
+ $this->stat = $stat;
+ }
+
+ public function getStat()
+ {
+ return $this->stat;
+ }
+
+ public function setNameStatus($flag)
+ {
+ $this->nameStatus = (boolean)$flag;
+ }
+
+ public function getNameStatus()
+ {
+ return $this->nameStatus;
+ }
+
+ public function isNameStatus()
+ {
+ return $this->getNameStatus();
+ }
+
+ public function setMaxCount($count)
+ {
+ $this->maxCount = (int)$count;
+ }
+
+ public function getMaxCount()
+ {
+ return $this->maxCount;
+ }
+
+ public function setNoMerges($flag)
+ {
+ $this->noMerges = (bool)$flag;
+ }
+
+ public function getNoMerges()
+ {
+ return $this->noMerges;
+ }
+
+ public function isNoMerges()
+ {
+ return $this->getNoMerges();
+ }
+
+ public function setFormat($format)
+ {
+ $this->format = $format;
+ }
+
+ public function getFormat()
+ {
+ return $this->format;
+ }
+
+ public function setDate($date)
+ {
+ $this->date = $date;
+ }
+
+ public function getDate()
+ {
+ return $this->date;
+ }
+
+ public function setSince($since)
+ {
+ $this->sinceCommit = $since;
+ }
+
+ public function getSince()
+ {
+ return $this->sinceCommit;
+ }
+
+ public function setAfter($after)
+ {
+ $this->setSince($after);
+ }
+
+ public function setUntil($until)
+ {
+ $this->untilCommit = $until;
+ }
+
+ public function getUntil()
+ {
+ return $this->untilCommit;
+ }
+
+ public function setBefore($before)
+ {
+ $this->setUntil($before);
+ }
+
+ public function setPaths($paths)
+ {
+ $this->paths = $paths;
+ }
+
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ public function setOutputProperty($prop)
+ {
+ $this->outputProperty = $prop;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitMergeTask.php b/classes/phing/tasks/ext/git/GitMergeTask.php
new file mode 100644
index 0000000..a8e3e95
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitMergeTask.php
@@ -0,0 +1,258 @@
+<?php
+/*
+ * $Id: GitMergeTask.php 1050 2011-03-02 19:39:58Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-merge
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitMergeTask.php 1050 2011-03-02 19:39:58Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ * @link http://www.kernel.org/pub/software/scm/git/docs/git-merge.html
+ */
+class GitMergeTask extends GitBaseTask
+{
+ /**
+ * <commit> of git-merge
+ * @var
+ */
+ private $remote;
+
+ /**
+ * Commit message
+ * @var string
+ */
+ private $message;
+
+ /**
+ * Merge strategy. See -s <strategy> of git-merge
+ * Available strategies are: octopus ours recursive resolve subtree
+ * @var string
+ */
+ private $strategy;
+
+ /**
+ * -X or --strategy-option of git-merge
+ * @var string
+ */
+ private $strategyOption;
+
+ /**
+ * --commit key of git-merge
+ * @var boolean
+ */
+ private $commit = false;
+
+ /**
+ * --no-commit key of git-merge
+ * @var boolean
+ */
+ private $noCommit = false;
+
+ /**
+ * --ff --no-ff keys to git-merge
+ * @var boolean
+ */
+ private $fastForwardCommit = false;
+
+ /**
+ * --quiet, -q key to git-merge
+ * @var boolean
+ */
+ private $quiet = false;
+
+ /**
+ * Valid merge strategies
+ * @var array
+ */
+ private $validStrategies = array(
+ 'octopus', 'ours', 'recursive', 'resolve', 'subtree');
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+ $remotes = trim($this->getRemote());
+ if (null === $remotes || '' === $remotes) {
+ throw new BuildException('"remote" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('merge');
+ $command
+ ->setOption('commit', $this->isCommit())
+ ->setOption('q', $this->isQuiet());
+
+ if ($this->getMessage()) {
+ $command->setOption('message', $this->getMessage());
+ }
+
+ if (!$this->isCommit()) {
+ $command->setOption('no-commit', $this->isNoCommit());
+ }
+
+ if ($this->isFastForwardCommit()) {
+ $command->setOption('no-ff', true);
+ }
+
+ $strategy = $this->getStrategy();
+ if ($strategy) {
+ // check if strategy is valid
+ if (false === in_array($strategy, $this->validStrategies)) {
+ throw new BuildException(
+ "Could not find merge strategy '" . $strategy . "'\n".
+ "Available strategies are: " . implode(', ', $this->validStrategies));
+ }
+ $command->setOption('strategy', $strategy);
+ if ($this->getStrategyOption()) {
+ $command->setOption(
+ 'strategy-option', $this->getStrategyOption());
+ }
+ }
+
+ $remotes = explode(' ', $this->getRemote());
+ foreach ($remotes as $remote) {
+ $command->addArgument($remote);
+ }
+
+ $this->log('git-merge command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log(
+ sprintf('git-merge: replaying "%s" commits', $this->getRemote()),
+ Project::MSG_INFO);
+ $this->log('git-merge output: ' . trim($output), Project::MSG_INFO);
+
+ }
+
+ public function setRemote($remote)
+ {
+ $this->remote = $remote;
+ }
+
+ public function getRemote()
+ {
+ return $this->remote;
+ }
+
+ public function setMessage($message)
+ {
+ $this->message = $message;
+ }
+
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ public function setStrategy($strategy)
+ {
+ $this->strategy = $strategy;
+ }
+
+ public function getStrategy()
+ {
+ return $this->strategy;
+ }
+
+ public function setStrategyOption($strategyOption)
+ {
+ $this->strategyOption = $strategyOption;
+ }
+
+ public function getStrategyOption()
+ {
+ return $this->strategyOption;
+ }
+
+ public function setQuiet($flag)
+ {
+ $this->quiet = $flag;
+ }
+
+ public function getQuiet()
+ {
+ return $this->quiet;
+ }
+
+ public function isQuiet()
+ {
+ return $this->getQuiet();
+ }
+
+ public function setCommit($flag)
+ {
+ $this->commit = (boolean)$flag;
+ }
+
+ public function getCommit()
+ {
+ return $this->commit;
+ }
+
+ public function isCommit()
+ {
+ return $this->getCommit();
+ }
+
+ public function setNoCommit($flag)
+ {
+ $this->noCommit = (boolean)$flag;
+ }
+
+ public function getNoCommit()
+ {
+ return $this->noCommit;
+ }
+
+ public function isNoCommit()
+ {
+ return $this->getNoCommit();
+ }
+
+ public function setFastForwardCommit($flag)
+ {
+ $this->fastForwardCommit = $flag;
+ }
+
+ public function getFastForwardCommit()
+ {
+ return $this->fastForwardCommit;
+ }
+
+ public function isFastForwardCommit()
+ {
+ return $this->getFastForwardCommit();
+ }
+}
diff --git a/classes/phing/tasks/ext/git/GitPullTask.php b/classes/phing/tasks/ext/git/GitPullTask.php
new file mode 100644
index 0000000..68e805d
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitPullTask.php
@@ -0,0 +1,373 @@
+<?php
+/*
+ * $Id: GitPullTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-pull
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitPullTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ */
+class GitPullTask extends GitBaseTask
+{
+ /**
+ * <repository> argument to git-pull
+ * @var string
+ */
+ private $source = 'origin';
+
+ /**
+ * <refspec> argument to git-pull
+ * @var string
+ */
+ private $refspec;
+
+ /**
+ * --rebase key to git-pull
+ * @boolean
+ */
+ private $rebase = false;
+
+ /**
+ * --no-rebase key to git-pull
+ * Allow to override --rebase (if set to default true in configuration)
+ * @boolean
+ */
+ private $noRebase = false;
+
+ /**
+ * Merge strategy. See -s <strategy> of git-pull
+ * @var string
+ */
+ private $strategy;
+
+ /**
+ * -X or --strategy-option of git-pull
+ * @var string
+ */
+ private $strategyOption;
+
+ /**
+ * Fetch all remotes
+ * --all key to git-pull
+ * @var boolean
+ */
+ private $allRemotes = false;
+
+ /**
+ * --append key to git-pull
+ * @var boolean
+ */
+ private $append = false;
+
+ /**
+ * Keep downloaded pack
+ * --keep key to git-pull
+ * @var boolean
+ */
+ private $keepFiles = false;
+
+ /**
+ * Disable/enable automatic tag following
+ * --no-tags key to git-pull
+ * @var boolean
+ */
+ private $noTags = false;
+
+ /**
+ * Fetch all tags (even not reachable from branch heads)
+ * --tags key to git-pull
+ * @var boolean
+ */
+ private $tags = false;
+
+ /**
+ * --quiet, -q key to git-pull
+ * @var boolean
+ */
+ private $quiet = true;
+
+ /**
+ * --force, -f key to git-pull
+ * @var boolean
+ */
+ private $force = false;
+
+ /**
+ * Valid merge strategies
+ * @var array
+ */
+ private $validStrategies = array(
+ 'octopus', 'ours', 'recursive', 'resolve', 'subtree');
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('pull');
+ $command
+ ->setOption('rebase', $this->isRebase());
+
+ if (!$this->isRebase()) {
+ $command->setOption('no-rebase', $this->isNoRebase());
+ }
+
+ $strategy = $this->getStrategy();
+ if ($strategy) {
+ // check if strategy is valid
+ if (false === in_array($strategy, $this->validStrategies)) {
+ throw new BuildException(
+ "Could not find merge strategy '" . $strategy . "'\n".
+ "Available strategies are: " . implode(', ', $this->validStrategies));
+ }
+ $command->setOption('strategy', $strategy);
+ if ($this->getStrategyOption()) {
+ $command->setOption(
+ 'strategy-option', $this->getStrategyOption());
+ }
+ }
+
+ // order of arguments is important
+ $command
+ ->setOption('tags', $this->isTags())
+ ->setOption('no-tags', $this->isNoTags())
+ ->setOption('keep', $this->isKeepFiles())
+ ->setOption('append', $this->isAppend())
+ ->setOption('q', $this->isQuiet())
+ ->setOption('force', $this->isForce());
+
+ // set operation target
+ if ($this->isAllRemotes()) { // --all
+ $command->setOption('all', true);
+ $this->log('git-pull: fetching from all remotes', Project::MSG_INFO);
+ } elseif ($this->getSource()) { // <repository> [<refspec>]
+ $command->addArgument($this->getSource());
+ if ($this->getRefspec()) {
+ $command->addArgument($this->getRefspec());
+ }
+ $this->log(
+ sprintf('git-pull: pulling from %s %s',
+ $this->getSource(), $this->getRefspec()),
+ Project::MSG_INFO);
+ } else {
+ throw new BuildException('No source repository specified');
+ }
+
+ $this->log('git-pull command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log('git-pull: complete', Project::MSG_INFO);
+ $this->log('git-pull output: ' . trim($output), Project::MSG_INFO);
+
+ }
+
+ public function setStrategy($strategy)
+ {
+ $this->strategy = $strategy;
+ }
+
+ public function getStrategy()
+ {
+ return $this->strategy;
+ }
+
+ public function setStrategyOption($strategyOption)
+ {
+ $this->strategyOption = $strategyOption;
+ }
+
+ public function getStrategyOption()
+ {
+ return $this->strategyOption;
+ }
+
+ public function setSource($source)
+ {
+ $this->source = $source;
+ }
+
+ public function getSource()
+ {
+ return $this->source;
+ }
+
+ public function setRefspec($spec)
+ {
+ $this->refspec = $spec;
+ }
+
+ public function getRefspec()
+ {
+ return $this->refspec;
+ }
+
+ public function setAll($flag)
+ {
+ $this->allRemotes = $flag;
+ }
+
+ public function getAll()
+ {
+ return $this->allRemotes;
+ }
+
+ public function isAllRemotes()
+ {
+ return $this->getAll();
+ }
+
+ public function setAppend($flag)
+ {
+ $this->append = (boolean)$flag;
+ }
+
+ public function getAppend()
+ {
+ return $this->append;
+ }
+
+ public function isAppend()
+ {
+ return $this->getAppend();
+ }
+
+ public function setKeep($flag)
+ {
+ $this->keepFiles = $flag;
+ }
+
+ public function getKeep()
+ {
+ return $this->keepFiles;
+ }
+
+ public function isKeepFiles()
+ {
+ return $this->getKeep();
+ }
+
+ public function setNoTags($flag)
+ {
+ $this->noTags = $flag;
+ }
+
+ public function getNoTags()
+ {
+ return $this->noTags;
+ }
+
+ public function isNoTags()
+ {
+ return $this->getNoTags();
+ }
+
+ public function setTags($flag)
+ {
+ $this->tags = $flag;
+ }
+
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ public function isTags()
+ {
+ return $this->getTags();
+ }
+
+ public function setQuiet($flag)
+ {
+ $this->quiet = $flag;
+ }
+
+ public function getQuiet()
+ {
+ return $this->quiet;
+ }
+
+ public function isQuiet()
+ {
+ return $this->getQuiet();
+ }
+
+ public function setRebase($flag)
+ {
+ $this->rebase = (boolean)$flag;
+ }
+
+ public function getRebase()
+ {
+ return $this->rebase;
+ }
+
+ public function isRebase()
+ {
+ return $this->getRebase();
+ }
+
+ public function setNoRebase($flag)
+ {
+ $this->noRebase = (boolean)$flag;
+ }
+
+ public function getNoRebase()
+ {
+ return $this->noRebase;
+ }
+
+ public function isNoRebase()
+ {
+ return $this->getNoRebase();
+ }
+
+ public function setForce($flag)
+ {
+ $this->force = $flag;
+ }
+
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ public function isForce()
+ {
+ return $this->getForce();
+ }
+
+}
diff --git a/classes/phing/tasks/ext/git/GitPushTask.php b/classes/phing/tasks/ext/git/GitPushTask.php
new file mode 100644
index 0000000..6bc5574
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitPushTask.php
@@ -0,0 +1,255 @@
+<?php
+/*
+ * $Id: GitPushTask.php 1051 2011-03-02 19:40:51Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper aroung git-push
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitPushTask.php 1051 2011-03-02 19:40:51Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.3
+ * @link http://www.kernel.org/pub/software/scm/git/docs/git-push.html
+ */
+class GitPushTask extends GitBaseTask
+{
+ /**
+ * Instead of naming each ref to push, specifies that all refs
+ * --all key to git-push
+ * @var boolean
+ */
+ private $allRemotes = false;
+
+ /**
+ * Mirror to remote repository
+ * --mirror key to git-push
+ * @var boolean
+ */
+ private $mirror = false;
+
+ /**
+ * Same as prefixing repos with colon
+ * --delete argument to git-push
+ * @var string
+ */
+ private $delete = false;
+
+ /**
+ * Push all refs under refs/tags
+ * --tags key to git-fetch
+ * @var boolean
+ */
+ private $tags = false;
+
+ /**
+ * <repository> argument to git-push
+ * @var string
+ */
+ private $destination = 'origin';
+
+ /**
+ * <refspec> argument to git-push
+ * @var string
+ */
+ private $refspec;
+
+ /**
+ * --force, -f key to git-push
+ * @var boolean
+ */
+ private $force = false;
+
+ /**
+ * --quiet, -q key to git-push
+ * @var boolean
+ */
+ private $quiet = true;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('push');
+ $command
+ ->setOption('tags', $this->isTags())
+ ->setOption('mirror', $this->isMirror())
+ ->setOption('delete', $this->isDelete())
+ ->setOption('q', $this->isQuiet())
+ ->setOption('force', $this->isForce());
+
+ // set operation target
+ if ($this->isAllRemotes()) { // --all
+ $command->setOption('all', true);
+ $this->log('git-push: push to all refs', Project::MSG_INFO);
+ } elseif ($this->isMirror()) { // <repository> [<refspec>]
+ $command->setOption('mirror', true);
+ $this->log('git-push: mirror all refs', Project::MSG_INFO);
+ } elseif ($this->getDestination()) { // <repository> [<refspec>]
+ $command->addArgument($this->getDestination());
+ if ($this->getRefspec()) {
+ $command->addArgument($this->getRefspec());
+ }
+ $this->log(
+ sprintf('git-push: pushing to %s %s',
+ $this->getDestination(), $this->getRefspec()),
+ Project::MSG_INFO);
+ } else {
+ throw new BuildException('At least one destination must be provided');
+ }
+
+ $this->log('git-push command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ throw new BuildException('Task execution failed.');
+ }
+
+ $this->log('git-push: complete', Project::MSG_INFO);
+ if ($this->isDelete()) {
+ $this->log('git-push: branch delete requested', Project::MSG_INFO);
+ }
+ $this->log('git-push output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setAll($flag)
+ {
+ $this->allRemotes = $flag;
+ }
+
+ public function getAll()
+ {
+ return $this->allRemotes;
+ }
+
+ public function isAllRemotes()
+ {
+ return $this->getAll();
+ }
+
+ public function setMirror($flag)
+ {
+ $this->mirror = (boolean)$flag;
+ }
+
+ public function getMirror()
+ {
+ return $this->mirror;
+ }
+
+ public function isMirror()
+ {
+ return $this->getMirror();
+ }
+
+ public function setDelete($flag)
+ {
+ $this->delete = (boolean)$flag;
+ }
+
+ public function getDelete()
+ {
+ return $this->delete;
+ }
+
+ public function isDelete()
+ {
+ return $this->getDelete();
+ }
+
+ public function setTags($flag)
+ {
+ $this->tags = $flag;
+ }
+
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ public function isTags()
+ {
+ return $this->getTags();
+ }
+
+ public function setDestination($destination)
+ {
+ $this->destination = $destination;
+ }
+
+ public function getDestination()
+ {
+ return $this->destination;
+ }
+
+ public function setRefspec($spec)
+ {
+ $this->refspec = $spec;
+ }
+
+ public function getRefspec()
+ {
+ return $this->refspec;
+ }
+
+ public function setForce($flag)
+ {
+ $this->force = $flag;
+ }
+
+ public function getForce()
+ {
+ return $this->force;
+ }
+
+ public function isForce()
+ {
+ return $this->getForce();
+ }
+
+ public function setQuiet($flag)
+ {
+ $this->quiet = $flag;
+ }
+
+ public function getQuiet()
+ {
+ return $this->quiet;
+ }
+
+ public function isQuiet()
+ {
+ return $this->getQuiet();
+ }
+
+
+
+
+}
diff --git a/classes/phing/tasks/ext/git/GitTagTask.php b/classes/phing/tasks/ext/git/GitTagTask.php
new file mode 100644
index 0000000..49b3971
--- /dev/null
+++ b/classes/phing/tasks/ext/git/GitTagTask.php
@@ -0,0 +1,406 @@
+<?php
+/*
+ * $Id: GitTagTask.php 1052 2011-03-02 20:33:54Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * Wrapper around git-tag
+ *
+ * @author Evan Kaufman <evan at digitalflophouse.com>
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitTagTask.php 1052 2011-03-02 20:33:54Z victor $
+ * @package phing.tasks.ext.git
+ * @see VersionControl_Git
+ * @since 2.4.5
+ */
+class GitTagTask extends GitBaseTask
+{
+ /**
+ * Make unsigned, annotated tag object. See -a of git-tag
+ * @var boolean
+ */
+ private $annotate = false;
+
+ /**
+ * Make GPG-signed tag. See -s of git-tag
+ * @var boolean
+ */
+ private $sign = false;
+
+ /**
+ * Make GPG-signed tag, using given key. See -u of git-tag
+ * @var string
+ */
+ private $keySign;
+
+ /**
+ * Replace existing tag with given name. See -f of git-tag
+ * @var boolean
+ */
+ private $replace = false;
+
+ /**
+ * Delete existing tags with given names. See -d of git-tag
+ * @var boolean
+ */
+ private $delete = false;
+
+ /**
+ * Verify gpg signature of given tag names. See -v of git-tag
+ * @var boolean
+ */
+ private $verify = false;
+
+ /**
+ * List tags with names matching given pattern. See -l of git-tag
+ * @var boolean
+ */
+ private $list = false;
+
+ /**
+ * <num> specifies how many lines from the annotation, if any, are printed
+ * when using -l. See -n of git-tag
+ * @var int
+ */
+ private $num;
+
+ /**
+ * Only list tags containing specified commit. See --contains of git-tag
+ * @var string
+ */
+ private $contains;
+
+ /**
+ * Use given tag message. See -m of git-tag
+ * @var string
+ */
+ private $message;
+
+ /**
+ * Take tag message from given file. See -F of git-tag
+ * @var string
+ */
+ private $file;
+
+ /**
+ * <tagname> argument to git-tag
+ * @var string
+ */
+ private $name;
+
+ /**
+ * <commit> argument to git-tag
+ * @var string
+ */
+ private $commit;
+
+ /**
+ * <object> argument to git-tag
+ * @var string
+ */
+ private $object;
+
+ /**
+ * <pattern> argument to git-tag
+ * @var string
+ */
+ private $pattern;
+
+ /**
+ * Property name to set with output value from git-tag
+ * @var string
+ */
+ private $outputProperty;
+
+ /**
+ * The main entry point for the task
+ */
+ public function main()
+ {
+ if (null === $this->getRepository()) {
+ throw new BuildException('"repository" is required parameter');
+ }
+
+ $client = $this->getGitClient(false, $this->getRepository());
+ $command = $client->getCommand('tag');
+ $command
+ ->setOption('a', $this->isAnnotate())
+ ->setOption('s', $this->isSign())
+ ->setOption('f', $this->isReplace())
+ ->setOption('d', $this->isDelete())
+ ->setOption('v', $this->isVerify())
+ ->setOption('l', $this->isList());
+
+ if (null !== $this->getKeySign()) {
+ $command->setOption('u', $this->getKeySign());
+ }
+
+ if (null !== $this->getMessage()) {
+ $command->setOption('m', $this->getMessage());
+ }
+
+ if (null !== $this->getFile()) {
+ $command->setOption('F', $this->getFile());
+ }
+
+ // Use 'name' arg, if relevant
+ if (null != $this->getName() && false == $this->isList()) {
+ $command->addArgument($this->getName());
+ }
+
+ if (null !== $this->getKeySign() || $this->isAnnotate() || $this->isSign()) {
+ // Require a tag message or file
+ if (null === $this->getMessage() && null === $this->getFile()) {
+ throw new BuildException('"message" or "file" required to make a tag');
+ }
+ }
+
+ // Use 'commit' or 'object' args, if relevant
+ if (null !== $this->getCommit()) {
+ $command->addArgument($this->getCommit());
+ } else if (null !== $this->getObject()) {
+ $command->addArgument($this->getObject());
+ }
+
+ // Customize list (-l) options
+ if ($this->isList()) {
+ if (null !== $this->getContains()) {
+ $command->setOption('contains', $this->getContains());
+ }
+ if (null !== $this->getPattern()) {
+ $command->addArgument($this->getPattern());
+ }
+ if (null != $this->getNum()) {
+ $command->setOption('n', $this->getNum());
+ }
+ }
+
+ $this->log('git-tag command: ' . $command->createCommandString(), Project::MSG_INFO);
+
+ try {
+ $output = $command->execute();
+ } catch (Exception $e) {
+ $this->log($e->getMessage(), Project::MSG_ERR);
+ throw new BuildException('Task execution failed. ' . $e->getMessage());
+ }
+
+ if (null !== $this->outputProperty) {
+ $this->project->setProperty($this->outputProperty, $output);
+ }
+
+ $this->log(
+ sprintf('git-tag: tags for "%s" repository', $this->getRepository()),
+ Project::MSG_INFO);
+ $this->log('git-tag output: ' . trim($output), Project::MSG_INFO);
+ }
+
+ public function setAnnotate($flag)
+ {
+ $this->annotate = (bool)$flag;
+ }
+
+ public function getAnnotate()
+ {
+ return $this->annotate;
+ }
+
+ public function isAnnotate()
+ {
+ return $this->getAnnotate();
+ }
+
+ public function setSign($flag)
+ {
+ $this->sign = (bool)$flag;
+ }
+
+ public function getSign()
+ {
+ return $this->sign;
+ }
+
+ public function isSign()
+ {
+ return $this->getSign();
+ }
+
+ public function setKeySign($keyId)
+ {
+ $this->keySign = $keyId;
+ }
+
+ public function getKeySign()
+ {
+ return $this->keySign;
+ }
+
+ public function setReplace($flag)
+ {
+ $this->replace = (bool)$flag;
+ }
+
+ public function getReplace()
+ {
+ return $this->replace;
+ }
+
+ public function isReplace()
+ {
+ return $this->getReplace();
+ }
+
+ public function setForce($flag)
+ {
+ return $this->setReplace($flag);
+ }
+
+ public function setDelete($flag)
+ {
+ $this->delete = (bool)$flag;
+ }
+
+ public function getDelete()
+ {
+ return $this->delete;
+ }
+
+ public function isDelete()
+ {
+ return $this->getDelete();
+ }
+
+ public function setVerify($flag)
+ {
+ $this->verify = (bool)$flag;
+ }
+
+ public function getVerify()
+ {
+ return $this->verify;
+ }
+
+ public function isVerify()
+ {
+ return $this->getVerify();
+ }
+
+ public function setList($flag)
+ {
+ $this->list = (bool)$flag;
+ }
+
+ public function getList()
+ {
+ return $this->list;
+ }
+
+ public function isList()
+ {
+ return $this->getList();
+ }
+
+ public function setNum($num)
+ {
+ $this->num = (int)$num;
+ }
+
+ public function getNum()
+ {
+ return $this->num;
+ }
+
+ public function setContains($commit)
+ {
+ $this->contains = $commit;
+ }
+
+ public function getContains()
+ {
+ return $this->contains;
+ }
+
+ public function setMessage($msg)
+ {
+ $this->message = $msg;
+ }
+
+ public function getMessage()
+ {
+ return $this->message;
+ }
+
+ public function setFile($file)
+ {
+ $this->file = $file;
+ }
+
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ public function setCommit($commit)
+ {
+ $this->commit = $commit;
+ }
+
+ public function getCommit()
+ {
+ return $this->commit;
+ }
+
+ public function setObject($object)
+ {
+ $this->object = $object;
+ }
+
+ public function getObject()
+ {
+ return $this->object;
+ }
+
+ public function setPattern($pattern)
+ {
+ $this->pattern = $pattern;
+ }
+
+ public function getPattern()
+ {
+ return $this->pattern;
+ }
+
+ public function setOutputProperty($prop)
+ {
+ $this->outputProperty = $prop;
+ }
+}
+
diff --git a/classes/phing/tasks/ext/pdepend/PhpDependTask.php b/classes/phing/tasks/ext/pdepend/PhpDependTask.php
index f142f8e..487f0c5 100644
--- a/classes/phing/tasks/ext/pdepend/PhpDependTask.php
+++ b/classes/phing/tasks/ext/pdepend/PhpDependTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: PhpDependTask.php 755 2010-03-24 20:19:08Z bschultz $
+ * $Id: PhpDependTask.php 1038 2011-02-08 12:22:02Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -27,7 +27,7 @@ require_once 'phing/Task.php';
*
* @package phing.tasks.ext.pdepend
* @author Benjamin Schultz <bschultz at proqrent.de>
- * @version $Id: PhpDependTask.php 755 2010-03-24 20:19:08Z bschultz $
+ * @version $Id: PhpDependTask.php 1038 2011-02-08 12:22:02Z mrook $
* @since 2.4.1
*/
class PhpDependTask extends Task
@@ -119,20 +119,6 @@ class PhpDependTask extends Task
protected $_runner = null;
/**
- * Holds the optimization
- *
- * @var string
- */
- protected $_optimization = '';
-
- /**
- * Holds the available optimizations
- *
- * @var array<string>
- */
- private $_optimizations = array();
-
- /**
* Flag that determines whether to halt on error
*
* @var boolean
@@ -160,18 +146,13 @@ class PhpDependTask extends Task
);
}
- $this->_optimizations[] = PHP_Depend_TextUI_Runner::OPTIMZATION_BEST;
- $this->_optimizations[] = PHP_Depend_TextUI_Runner::OPTIMZATION_NONE;
-
/**
* Other dependencies that should only be loaded
* when class is actually used
*/
require_once 'phing/tasks/ext/pdepend/PhpDependLoggerElement.php';
require_once 'phing/tasks/ext/pdepend/PhpDependAnalyzerElement.php';
- require_once 'PHP/Depend/TextUI/ResultPrinter.php';
- require_once 'PHP/Depend/Util/Configuration.php';
- require_once 'PHP/Depend/Util/ConfigurationInstance.php';
+ require_once 'PHP/Depend/Autoload.php';
}
/**
@@ -353,6 +334,9 @@ class PhpDependTask extends Task
*/
public function main()
{
+ $autoload = new PHP_Depend_Autoload();
+ $autoload->register();
+
if (!isset($this->_file) and count($this->_filesets) == 0) {
throw new BuildException(
"Missing either a nested fileset or attribute 'file' set"
@@ -386,6 +370,10 @@ class PhpDependTask extends Task
$this->_runner = new PHP_Depend_TextUI_Runner();
$this->_runner->addProcessListener(new PHP_Depend_TextUI_ResultPrinter());
+ $configurationFactory = new PHP_Depend_Util_Configuration_Factory();
+ $configuration = $configurationFactory->createDefault();
+ $this->_runner->setConfiguration($configuration);
+
$this->_runner->setSourceArguments($filesToParse);
foreach ($this->_loggers as $logger) {
@@ -429,18 +417,6 @@ class PhpDependTask extends Task
$this->_runner->setExcludePackages($this->_excludePackages);
}
- // Check optimization strategy
- if ($this->_optimization !== '') {
- if (in_array($this->_optimization, $this->_optimizations)) {
- // Set optimization strategy
- $this->_runner->setOptimization($this->_optimization);
- } else {
- throw new BuildException(
- 'Invalid optimization "' . $this->_optimization . '" given.'
- );
- }
- }
-
// Check for configuration option
if ($this->_configFile instanceof PhingFile) {
if (file_exists($this->_configFile->__toString()) === false) {
diff --git a/classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php b/classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php
index 4bbcdd7..a37ac99 100644
--- a/classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php
+++ b/classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: PDOSQLExecFormatterElement.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: PDOSQLExecFormatterElement.php 1037 2011-02-08 10:16:34Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -22,6 +22,7 @@
require_once 'phing/system/io/PhingFile.php';
require_once 'phing/tasks/ext/pdo/PlainPDOResultFormatter.php';
require_once 'phing/tasks/ext/pdo/XMLPDOResultFormatter.php';
+require_once 'phing/util/LogWriter.php';
/**
* A class to represent the nested <formatter> element for PDO SQL results.
@@ -152,7 +153,7 @@ class PDOSQLExecFormatterElement
$out = $this->getOutputWriter();
- print "Setting output writer to: " . get_class($out) . "\n";
+ $this->parentTask->log("Setting output writer to: " . get_class($out), Project::MSG_VERBOSE);
$this->formatter->setOutput($out);
if ($this->formatter instanceof PlainPDOResultFormatter) {
diff --git a/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorErrorTracker.php b/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorErrorTracker.php
new file mode 100644
index 0000000..f842d76
--- /dev/null
+++ b/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorErrorTracker.php
@@ -0,0 +1,97 @@
+<?php
+/**
+ * $Id: PhingPhpDocumentorErrorTracker.php 899 2010-10-04 21:33:02Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+/**
+ * Phing subclass of the ErrorTracker class provided with PhpDocumentor to work around limitations in PhpDocumentor API.
+ *
+ * This class is necessary because PhpDocumentor does directly output errors and
+ * warnings occured during testing for undocumented elements to stdout.
+ * This class is injected globally to force PhpDocumentor to use phing's logging
+ * mechanism.
+ *
+ * Obviously this is far from ideal, but there's also no solution given the inflexibility of the
+ * PhpDocumentor design.
+ *
+ * @author Timo A. Hummel <privat at timohummel.com> @author felicitus
+ * @version $Id: PhingPhpDocumentorErrorTracker.php 899 2010-10-04 21:33:02Z mrook $
+ * @package phing.tasks.ext.phpdoc
+ */
+
+class PhingPhpDocumentorErrorTracker extends ErrorTracker {
+
+ /*
+ * @var object Reference to the task we're called with
+ */
+ private $task;
+
+ /**
+ * Outputs a warning. This is an almost 1:1 copy from PhpDocumentor,
+ * we're just processing the warning text and send it to phing's logger.
+ *
+ * @param $num integer Number of parameters
+ * @return nothing
+ */
+ function addWarning ($num) {
+ $a = array('', '', '', '');
+ if (func_num_args()>1) {
+ for ($i=1;$i<func_num_args();$i++) {
+ $a[$i - 1] = func_get_arg($i);
+ }
+ }
+
+ $message = sprintf($GLOBALS['phpDocumentor_warning_descrip'][$num], $a[0], $a[1], $a[2], $a[3]);
+ $this->task->log($message, Project::MSG_WARN);
+
+ }
+
+ /**
+ * Outputs an error. This is an almost 1:1 copy from PhpDocumentor,
+ * we're just processing the error text and send it to phing's logger.
+ *
+ * @param $num integer Number of parameters
+ * @return nothing
+ */
+
+ function addError ($num) {
+ $a = array('', '', '', '');
+ if (func_num_args()>1) {
+ for ($i=1;$i<func_num_args();$i++) {
+ $a[$i - 1] = func_get_arg($i);
+ }
+ }
+
+ $message = sprintf($GLOBALS['phpDocumentor_error_descrip'][$num], $a[0], $a[1], $a[2], $a[3]);
+ $this->task->log($message, Project::MSG_ERR);
+
+ }
+
+ /**
+ * Sets the task we're working with. This is necessary since we need to be
+ * able to call the method "log".
+ *
+ * @param object $task The task we're working with
+ * @return nothing
+ */
+ public function setTask ($task) {
+ $this->task = $task;
+ }
+
+}
\ No newline at end of file
diff --git a/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorSetup.php b/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorSetup.php
index ab96051..de4f47c 100644
--- a/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorSetup.php
+++ b/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorSetup.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: PhingPhpDocumentorSetup.php 656 2009-12-14 14:10:54Z mrook $
+ * $Id: PhingPhpDocumentorSetup.php 899 2010-10-04 21:33:02Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,17 +28,19 @@
* PhpDocumentor design.
*
* @author Hans Lellelid <hans at xmpl.org>@author hans
- * @version $Id: PhingPhpDocumentorSetup.php 656 2009-12-14 14:10:54Z mrook $
+ * @version $Id: PhingPhpDocumentorSetup.php 899 2010-10-04 21:33:02Z mrook $
* @package phing.tasks.ext.phpdoc
*/
+
class PhingPhpDocumentorSetup extends phpDocumentor_setup {
/**
* Constructs a new PhingPhpDocumentorSetup.
*
* @param string $configDir Directory in which to look for configuration files.
+ * @param object $task The task we're working with, so we can pass it on to the ErrorTracker
*/
- public function __construct($configdir = null) {
+ public function __construct($configdir = null, $task) {
global $_phpDocumentor_cvsphpfile_exts, $_phpDocumentor_setting, $_phpDocumentor_phpfile_exts;
$this->setup = new Io();
@@ -59,6 +61,13 @@ class PhingPhpDocumentorSetup extends phpDocumentor_setup {
}
$this->setMemoryLimit();
+
+ include_once 'phing/tasks/ext/phpdoc/PhingPhpDocumentorErrorTracker.php';
+
+ // Inject our own error tracker to PhpDocumentor
+ $GLOBALS['phpDocumentor_errors'] = new PhingPhpDocumentorErrorTracker;
+ $GLOBALS['phpDocumentor_errors']->setTask($task);
+
}
/**
diff --git a/classes/phing/tasks/ext/phpdoc/PhpDocumentorTask.php b/classes/phing/tasks/ext/phpdoc/PhpDocumentorTask.php
index bd238de..9f9b31b 100644
--- a/classes/phing/tasks/ext/phpdoc/PhpDocumentorTask.php
+++ b/classes/phing/tasks/ext/phpdoc/PhpDocumentorTask.php
@@ -1,7 +1,7 @@
<?php
/**
- * $Id: PhpDocumentorTask.php 656 2009-12-14 14:10:54Z mrook $
+ * $Id: PhpDocumentorTask.php 899 2010-10-04 21:33:02Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -27,7 +27,7 @@ require_once 'phing/Task.php';
*
* @author Hans Lellelid <hans at xmpl.org>
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: PhpDocumentorTask.php 656 2009-12-14 14:10:54Z mrook $
+ * @version $Id: PhpDocumentorTask.php 899 2010-10-04 21:33:02Z mrook $
* @package phing.tasks.ext.phpdoc
*/
class PhpDocumentorTask extends Task
@@ -362,7 +362,7 @@ class PhpDocumentorTask extends Task
{
$this->validate();
$configdir = $this->configDir ? $this->configDir->getAbsolutePath() : null;
- $phpdoc = new PhingPhpDocumentorSetup($configdir);
+ $phpdoc = new PhingPhpDocumentorSetup($configdir, $this);
$this->setPhpDocumentorOptions($phpdoc);
//$phpdoc->readCommandLineSettings();
$phpdoc->setupConverters($this->output);
diff --git a/classes/phing/tasks/ext/phpunit/BatchTest.php b/classes/phing/tasks/ext/phpunit/BatchTest.php
index 873c88e..7177ea9 100644
--- a/classes/phing/tasks/ext/phpunit/BatchTest.php
+++ b/classes/phing/tasks/ext/phpunit/BatchTest.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: BatchTest.php 792 2010-06-24 12:56:45Z mrook $
+ * $Id: BatchTest.php 972 2010-11-09 16:06:29Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -19,13 +19,14 @@
* <http://phing.info>.
*/
+require_once 'phing/tasks/ext/phpunit/PHPUnitUtil.php';
require_once 'phing/types/FileSet.php';
/**
* Scans a list of files given by the fileset attribute, extracts valid test cases
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: BatchTest.php 792 2010-06-24 12:56:45Z mrook $
+ * @version $Id: BatchTest.php 972 2010-11-09 16:06:29Z mrook $
* @package phing.tasks.ext.phpunit
* @since 2.1.0
*/
diff --git a/classes/phing/tasks/ext/phpunit/PHPUnitTask.php b/classes/phing/tasks/ext/phpunit/PHPUnitTask.php
index 050f951..1982360 100644
--- a/classes/phing/tasks/ext/phpunit/PHPUnitTask.php
+++ b/classes/phing/tasks/ext/phpunit/PHPUnitTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: PHPUnitTask.php 798 2010-06-29 15:11:00Z mrook $
+ * $Id: PHPUnitTask.php 1029 2011-01-11 13:36:31Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,7 +28,7 @@ require_once 'phing/util/LogWriter.php';
* Runs PHPUnit tests.
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: PHPUnitTask.php 798 2010-06-29 15:11:00Z mrook $
+ * @version $Id: PHPUnitTask.php 1029 2011-01-11 13:36:31Z mrook $
* @package phing.tasks.ext.phpunit
* @see BatchTest
* @since 2.1.0
@@ -86,21 +86,27 @@ class PHPUnitTask extends Task
require_once 'phing/tasks/ext/phpunit/FormatterElement.php';
/**
- * Add some defaults to the PHPUnit filter
+ * point PHPUnit_MAIN_METHOD define to non-existing method
*/
- $pwd = dirname(__FILE__);
-
- require_once 'PHPUnit/Framework.php';
- require_once 'PHPUnit/Util/Filter.php';
-
- // point PHPUnit_MAIN_METHOD define to non-existing method
if (!defined('PHPUnit_MAIN_METHOD'))
{
define('PHPUnit_MAIN_METHOD', 'PHPUnitTask::undefined');
}
+ /**
+ * Add some defaults to the PHPUnit filter
+ */
+ $pwd = dirname(__FILE__);
$path = realpath($pwd . '/../../../');
- PHPUnit_Util_Filter::addDirectoryToFilter($path);
+
+ if (version_compare($version, '3.5.0') >= 0) {
+ PHP_CodeCoverage_Filter::getInstance()->addDirectoryToBlacklist($path);
+ } else {
+ require_once 'PHPUnit/Framework.php';
+ require_once 'PHPUnit/Util/Filter.php';
+
+ PHPUnit_Util_Filter::addDirectoryToFilter($path);
+ }
}
/**
diff --git a/classes/phing/tasks/ext/phpunit/PHPUnitTestRunner.php b/classes/phing/tasks/ext/phpunit/PHPUnitTestRunner.php
index a7194a4..717b05a 100644
--- a/classes/phing/tasks/ext/phpunit/PHPUnitTestRunner.php
+++ b/classes/phing/tasks/ext/phpunit/PHPUnitTestRunner.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: PHPUnitTestRunner.php 792 2010-06-24 12:56:45Z mrook $
+ * $Id: PHPUnitTestRunner.php 957 2010-10-29 15:44:36Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -19,8 +19,15 @@
* <http://phing.info>.
*/
+// phpunit 3.5 ships with autoloader
+// @todo - find out sane model for Phing and PHPUnit autoloaders/hooks co-existense
+if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0') >=0) {
+ require_once 'PHPUnit/Autoload.php';
+}
require_once 'PHPUnit/Util/ErrorHandler.php';
require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Runner/BaseTestRunner.php';
+require_once 'PHPUnit/Framework/TestListener.php';
require_once 'phing/tasks/ext/coverage/CoverageMerger.php';
require_once 'phing/system/util/Timer.php';
@@ -28,7 +35,7 @@ require_once 'phing/system/util/Timer.php';
* Simple Testrunner for PHPUnit that runs all tests of a testsuite.
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: PHPUnitTestRunner.php 792 2010-06-24 12:56:45Z mrook $
+ * @version $Id: PHPUnitTestRunner.php 957 2010-10-29 15:44:36Z mrook $
* @package phing.tasks.ext.phpunit
* @since 2.1.0
*/
@@ -78,8 +85,15 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
public static function handleError($level, $message, $file, $line)
{
- if (!PHPUnit_Util_Filter::isFiltered($file, true, true))
- {
+ $isFiltered = false;
+ if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0') >=0) {
+ $isFiltered = PHP_CodeCoverage::getInstance()->filter()->isFiltered(
+ $file, array(), true
+ );
+ } else {
+ $isFiltered = PHPUnit_Util_Filter::isFiltered($file, true, true);
+ }
+ if (!$isFiltered) {
return PHPUnit_Util_ErrorHandler::handleError($level, $message, $file, $line);
}
}
@@ -124,10 +138,15 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
if ($this->codecoverage)
{
- $coverageInformation = $res->getCodeCoverageInformation();
-
- PHPUnit_Util_CodeCoverage::clearSummary();
- $summary = PHPUnit_Util_CodeCoverage::getSummary($coverageInformation);
+ if (version_compare(PHPUnit_Runner_Version::id(), '3.5.0') >=0) {
+ $coverage = $res->getCodeCoverage();
+
+ $summary = $coverage->getSummary();
+ } else {
+ $coverageInformation = $res->getCodeCoverageInformation();
+ PHPUnit_Util_CodeCoverage::clearSummary();
+ $summary = PHPUnit_Util_CodeCoverage::getSummary($coverageInformation);
+ }
CoverageMerger::merge($this->project, $summary);
}
@@ -159,6 +178,11 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
{
return $this->lastFailureMessage;
}
+
+ protected function composeMessage($message, PHPUnit_Framework_Test $test, Exception $e)
+ {
+ $this->lastFailureMessage = "Test $message (" . $test->getName() . " in class " . get_class($test) . "): " . $e->getMessage();
+ }
/**
* An error occurred.
@@ -169,7 +193,7 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
*/
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time)
{
- $this->lastFailureMessage = "Test ERROR (" . $test->getName() . "): " . $e->getMessage();
+ $this->composeMessage("ERROR", $test, $e);
}
/**
@@ -181,7 +205,7 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
*/
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
{
- $this->lastFailureMessage = "Test FAILURE (" . $test->getName() . "): " . $e->getMessage();
+ $this->composeMessage("FAILURE", $test, $e);
}
/**
@@ -193,7 +217,7 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
*/
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)
{
- $this->lastFailureMessage = "Test INCOMPLETE (" . $test->getName() . "): " . $e->getMessage();
+ $this->composeMessage("INCOMPLETE", $test, $e);
}
/**
@@ -206,7 +230,7 @@ class PHPUnitTestRunner extends PHPUnit_Runner_BaseTestRunner implements PHPUnit
*/
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
{
- $this->lastFailureMessage = "Test SKIPPED (" . $test->getName() . "): " . $e->getMessage();
+ $this->composeMessage("SKIPPED", $test, $e);
}
/**
diff --git a/classes/phing/tasks/ext/phpunit/formatter/CloverPHPUnitResultFormatter.php b/classes/phing/tasks/ext/phpunit/formatter/CloverPHPUnitResultFormatter.php
old mode 100755
new mode 100644
index 62dff0f..aca0ca3
--- a/classes/phing/tasks/ext/phpunit/formatter/CloverPHPUnitResultFormatter.php
+++ b/classes/phing/tasks/ext/phpunit/formatter/CloverPHPUnitResultFormatter.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: CloverPHPUnitResultFormatter.php 796 2010-06-24 14:36:00Z mrook $
+ * $Id: CloverPHPUnitResultFormatter.php 979 2010-11-10 12:42:07Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -19,35 +19,34 @@
* <http://phing.info>.
*/
-require_once 'PHPUnit/Util/Log/JUnit.php';
-require_once 'PHPUnit/Util/Log/CodeCoverage/XML/Clover.php';
require_once 'phing/tasks/ext/phpunit/formatter/PHPUnitResultFormatter.php';
/**
* Prints Clover XML output of the test
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: CloverPHPUnitResultFormatter.php 796 2010-06-24 14:36:00Z mrook $
+ * @version $Id: CloverPHPUnitResultFormatter.php 979 2010-11-10 12:42:07Z mrook $
* @package phing.tasks.ext.formatter
* @since 2.4.0
*/
class CloverPHPUnitResultFormatter extends PHPUnitResultFormatter
{
/**
- * @var PHPUnit_Util_Log_CodeCoverage_XML_Clover
+ * @var PHPUnit_Framework_TestResult
*/
- private $clover = NULL;
+ private $result = NULL;
/**
- * @var PHPUnit_Framework_TestResult
+ * PHPUnit version
+ * @string
*/
- private $result = NULL;
+ private $version = NULL;
public function __construct(PHPUnitTask $parentTask)
{
parent::__construct($parentTask);
- $this->clover = new PHPUnit_Util_Log_CodeCoverage_XML_Clover(null);
+ $this->version = PHPUnit_Runner_Version::id();
}
public function getExtension()
@@ -67,17 +66,33 @@ class CloverPHPUnitResultFormatter extends PHPUnitResultFormatter
public function endTestRun()
{
- ob_start();
- $this->clover->process($this->result);
- $contents = ob_get_contents();
- ob_end_clean();
+ if (version_compare($this->version, '3.5.0') >=0) {
+ require_once 'PHP/CodeCoverage/Report/Clover.php';
+
+ $coverage = $this->result->getCodeCoverage();
+
+ $clover = new PHP_CodeCoverage_Report_Clover();
+
+ $contents = $clover->process($coverage);
+ } else {
+ require_once 'PHPUnit/Util/Log/CodeCoverage/XML/Clover.php';
+
+ $clover = new PHPUnit_Util_Log_CodeCoverage_XML_Clover(null);
+
+ ob_start();
+
+ $clover->process($this->result);
+ $contents = ob_get_contents();
+
+ ob_end_clean();
+ }
if ($this->out)
{
$this->out->write($contents);
$this->out->close();
}
-
+
parent::endTestRun();
}
}
diff --git a/classes/phing/tasks/ext/simpletest/SimpleTestXmlResultFormatter.php b/classes/phing/tasks/ext/simpletest/SimpleTestXmlResultFormatter.php
old mode 100755
new mode 100644
diff --git a/classes/phing/tasks/ext/svn/SvnBaseTask.php b/classes/phing/tasks/ext/svn/SvnBaseTask.php
index 53786b5..4423ab8 100644
--- a/classes/phing/tasks/ext/svn/SvnBaseTask.php
+++ b/classes/phing/tasks/ext/svn/SvnBaseTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: SvnBaseTask.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: SvnBaseTask.php 808 2010-08-12 18:44:39Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,7 +26,7 @@ include_once 'phing/Task.php';
*
* @author Michiel Rook <michiel.rook at gmail.com>
* @author Andrew Eddie <andrew.eddie at jamboworks.com>
- * @version $Id: SvnBaseTask.php 552 2009-08-29 12:18:13Z mrook $
+ * @version $Id: SvnBaseTask.php 808 2010-08-12 18:44:39Z mrook $
* @package phing.tasks.ext.svn
* @see VersionControl_SVN
* @since 2.2.0
@@ -242,7 +242,7 @@ abstract class SvnBaseTask extends Task
// Set up runtime options. Will be passed to all
// subclasses.
- $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ASSOC, 'svn_path' => escapeshellarg($this->getSvnPath()));
+ $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_ASSOC, 'svn_path' => $this->getSvnPath());
// Pass array of subcommands we need to factory
$this->svn = VersionControl_SVN::factory($mode, $options);
@@ -260,7 +260,7 @@ abstract class SvnBaseTask extends Task
{
if (in_array(".svn", scandir($this->workingCopy)))
{
- $this->svnArgs = array(escapeshellarg($this->workingCopy));
+ $this->svnArgs = array($this->workingCopy);
}
else
{
@@ -272,7 +272,7 @@ abstract class SvnBaseTask extends Task
{
if (is_file($this->workingCopy))
{
- $this->svnArgs = array(escapeshellarg($this->workingCopy));
+ $this->svnArgs = array($this->workingCopy);
}
else
{
diff --git a/classes/phing/tasks/ext/svn/SvnLastRevisionTask.php b/classes/phing/tasks/ext/svn/SvnLastRevisionTask.php
index c88e7a7..2d5f57a 100644
--- a/classes/phing/tasks/ext/svn/SvnLastRevisionTask.php
+++ b/classes/phing/tasks/ext/svn/SvnLastRevisionTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Id: SvnLastRevisionTask.php 671 2009-12-17 20:17:38Z mrook $
+ * $Id: SvnLastRevisionTask.php 822 2010-08-13 18:58:55Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -26,7 +26,7 @@ require_once 'phing/tasks/ext/svn/SvnBaseTask.php';
* Stores the number of the last revision of a workingcopy in a property
*
* @author Michiel Rook <michiel.rook at gmail.com>
- * @version $Id: SvnLastRevisionTask.php 671 2009-12-17 20:17:38Z mrook $
+ * @version $Id: SvnLastRevisionTask.php 822 2010-08-13 18:58:55Z mrook $
* @package phing.tasks.ext.svn
* @see VersionControl_SVN
* @since 2.1.0
@@ -35,6 +35,7 @@ class SvnLastRevisionTask extends SvnBaseTask
{
private $propertyName = "svn.lastrevision";
private $forceCompatible = false;
+ private $lastChanged = false;
/**
* Sets the name of the property to use
@@ -55,10 +56,18 @@ class SvnLastRevisionTask extends SvnBaseTask
/**
* Sets whether to force compatibility with older SVN versions (< 1.2)
*/
- public function forceCompatible($force)
+ public function setForceCompatible($force)
{
$this->forceCompatible = (bool) $force;
}
+
+ /**
+ * Sets whether to retrieve the last changed revision
+ */
+ public function setLastChanged($lastChanged)
+ {
+ $this->lastChanged = (bool) $lastChanged;
+ }
/**
* The main entry point
@@ -72,8 +81,14 @@ class SvnLastRevisionTask extends SvnBaseTask
if ($this->forceCompatible)
{
$output = $this->run();
+
+ if ($this->lastChanged) {
+ $found = preg_match('/Rev:[\s]+([\d]+)/', $output, $matches);
+ } else {
+ $found = preg_match('/Last Changed Rev:[\s]+([\d]+)/', $output, $matches);
+ }
- if (preg_match('/Rev:[\s]+([\d]+)/', $output, $matches))
+ if ($found)
{
$this->project->setProperty($this->getPropertyName(), $matches[1]);
}
@@ -88,7 +103,12 @@ class SvnLastRevisionTask extends SvnBaseTask
if ($xmlObj = @simplexml_load_string($output))
{
- $lastRevision = (int)$xmlObj->entry['revision'];
+ if ($this->lastChanged) {
+ $lastRevision = (int)$xmlObj->entry->commit['revision'];
+ } else {
+ $lastRevision = (int)$xmlObj->entry['revision'];
+ }
+
$this->project->setProperty($this->getPropertyName(), $lastRevision);
}
else
diff --git a/classes/phing/tasks/ext/svn/SvnSwitchTask.php b/classes/phing/tasks/ext/svn/SvnSwitchTask.php
new file mode 100644
index 0000000..942c177
--- /dev/null
+++ b/classes/phing/tasks/ext/svn/SvnSwitchTask.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * $Id: SvnSwitchTask.php 889 2010-09-27 05:46:46Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/Task.php';
+require_once 'phing/tasks/ext/svn/SvnBaseTask.php';
+
+/**
+ * Switches a repository at a given local directory to a different location
+ *
+ * @author Dom Udall <dom.udall at clock.co.uk>
+ * @version $Id: SvnSwitchTask.php 889 2010-09-27 05:46:46Z victor $
+ * @package phing.tasks.ext.svn
+ * @since 2.4.3
+ */
+class SvnSwitchTask extends SvnBaseTask
+{
+ /**
+ * Which Revision to Export
+ *
+ * @todo check if version_control_svn supports constants
+ *
+ * @var string
+ */
+ private $revision = 'HEAD';
+
+ /**
+ * The main entry point
+ *
+ * @throws BuildException
+ */
+ function main()
+ {
+ $this->setup('switch');
+
+ $this->log("Switching SVN repository at '" . $this->getToDir() . "' to '" . $this->getRepositoryUrl() . "' "
+ . ($this->getRevision()=='HEAD'?'':" (revision: {$this->getRevision()})"));
+
+ // revision
+ $switches = array(
+ 'r' => $this->getRevision(),
+ );
+
+ $this->run(array($this->getToDir()), $switches);
+ }
+
+ public function setRevision($revision)
+ {
+ $this->revision = $revision;
+ }
+
+ public function getRevision()
+ {
+ return $this->revision;
+ }
+}
diff --git a/classes/phing/tasks/ext/zendguard/ZendGuardEncodeTask.php b/classes/phing/tasks/ext/zendguard/ZendGuardEncodeTask.php
new file mode 100644
index 0000000..2a2a331
--- /dev/null
+++ b/classes/phing/tasks/ext/zendguard/ZendGuardEncodeTask.php
@@ -0,0 +1,509 @@
+<?php
+
+/*
+ * $Id: ZendGuardEncodeTask.php 1017 2010-12-22 08:28:31Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/tasks/system/MatchingTask.php';
+include_once 'phing/util/SourceFileScanner.php';
+include_once 'phing/mappers/MergeMapper.php';
+include_once 'phing/util/StringHelper.php';
+
+/**
+ * Encodes files using Zeng Guard Encoder
+ *
+ * @author Petr Rybak <petr at rynawe.net>
+ * @version $Id: ZendGuardEncodeTask.php 1017 2010-12-22 08:28:31Z mrook $
+ * @package phing.tasks.ext.zendguard
+ * @since 2.4.3
+ */
+class ZendGuardEncodeTask extends MatchingTask
+{
+ protected $filesets = array();
+ protected $encodeCommand;
+
+
+ /**
+ * TASK PROPERTIES
+ *
+ * See http://static.zend.com/topics/Zend-Guard-User-Guidev5x.pdf
+ * for more information on how to use ZendGuard
+ *
+ */
+ /**
+ * Permanently deletes (see warning below) the original source files specified in the
+ * SourceInputPath and saves the encoded files in its place.
+ * This option has no option parameter.
+ * When this option is use, do not use the output_file parameter.
+ *
+ * Warning:
+ * To avoid permanent loss of non-encoded scripts, make a backup. Deleted files
+ * cannot be restored or recovered and will be permanently deleted with this option.
+ * If you are unsure about deleting the source files, use the âârename-source option
+ * instead
+ *
+ * @var bool
+ */
+ protected $deleteSource = true;
+ /**
+ * Move the original source file to <input_file>.<renameSourceExt> and save the encoded file in its
+ * place.
+ *
+ * If specified deleteSource will be automatically disabled.
+ *
+ * @var string
+ */
+ protected $renameSourceExt = null;
+ /**
+ * Turns short PHP tag (â<?â ) recognition either on or off.
+ * On or off must be specified as an argument when using this option.
+ * The default, when option is not used in the command-line, is - on
+ *
+ * @var bool
+ */
+ protected $shortTags = true;
+ /**
+ * Turn ASP tag (â<%â ) recognition on/off. (default: off). On or off must be specified
+ * as an argument when using this option.
+ * The default, when this option is not used in the command-line, is - off
+ *
+ * @var bool
+ */
+ protected $aspTags = false;
+ /**
+ *
+ * Disables the PHP-compatible header that is added to the top of every encoded file
+ * by default. Encoded files generated with this option will not display a meaningful
+ * error when loaded by PHP that doesn't have the Zend Optimizer properly installed.
+ * Using this option saves approximately 1.5KB for every encoded file. Do not use it
+ * unless disk space constraints are critica
+ *
+ * @var bool
+ */
+ protected $noHeader = false;
+ /**
+ * If cryptography should be used to encode the source code
+ *
+ * @var bool
+ */
+ protected $useCrypto = false;
+ /**
+ * Force cooperation with other encoded files only. This option generates files that
+ * work exclusively with associated encoded files. Associated encoded files are
+ * those generated by the same company. Files that do not share the same encoded
+ * company association cannot call these files
+ *
+ * @var bool
+ */
+ protected $encodedOnly = false;
+ /**
+ * Allow encoding previously encoded files. (NOT recommended!)
+ *
+ * @var bool
+ */
+ protected $forceEncode = false;
+ /**
+ * Make an encoded file to expire on the given date. Date is in yyyy-mm-dd format.
+ *
+ * @var string
+ */
+ protected $expires = null;
+ /**
+ * Level of obfuscation. Defaults to 0 (no obfuscation).
+ *
+ * @var int
+ */
+ protected $obfuscationLevel = 0;
+ /**
+ * Optimization mask. (default value: [+++++++])
+ * opt_mask is an integer representing a bit-mask.
+ * The default value enables all of the optimization passes.
+ * Each optimization pass of the Zend Optimizer can be turned on or off based on
+ * the mask entered
+ *
+ * @var int
+ */
+ protected $optMask = null;
+ /**
+ * Path to the zend encoder binary
+ *
+ * @var string
+ */
+ protected $zendEncoderPath = null;
+ /**
+ * Path to private key for licensing
+ *
+ * @var string
+ */
+ protected $privateKeyPath = null;
+ /**
+ * Enable licensing.
+ * If enabled, productName must be defined.
+ *
+ * @var bool
+ */
+ protected $licenseProduct = false;
+ /**
+ * If true the ownership, permissions and timestamps
+ * of the encoded files won't be preserved.
+ *
+ * @var bool
+ */
+ protected $ignoreFileModes = false;
+ /**
+ * Enable signing
+ * If enabled, productName must be defined.
+ *
+ * @var bool
+ */
+ protected $signProduct = false;
+ /**
+ * Product name. Must be defined if licenseProduct
+ * or signProduct is set to 1
+ *
+ * @var string
+ */
+ protected $productName = null;
+ /**
+ * Embed the information in the specified file into the header of the encoded file
+ * (overrides noHeader)
+ *
+ * @var string
+ */
+ protected $prologFile = null;
+
+ /**
+ * TASK PROPERTIES SETTERS
+ */
+ public function setZendEncoderPath($value)
+ {
+ $this->zendEncoderPath = $value;
+ }
+
+ public function setPrivateKeyPath($value)
+ {
+ $this->privateKeyPath = $value;
+ }
+
+ public function setShortTags($value)
+ {
+ $this->shortTags = (bool) $value;
+ }
+
+ public function setAspTags($value)
+ {
+ $this->aspTags = (bool) $value;
+ }
+
+ public function setDeleteSource($value)
+ {
+ $this->shortTags = (bool) $value;
+ }
+
+ public function setUseCrypto($value)
+ {
+ $this->useCrypto = (bool) $value;
+ }
+
+ public function setObfuscationLevel($value)
+ {
+ $this->obfuscationLevel = (int) $value;
+ }
+
+ public function setLicenseProduct($value)
+ {
+ $this->licenseProduct = (bool) $value;
+ }
+
+ public function setPrologFile($value)
+ {
+ $this->prologFile = $value;
+ }
+
+ public function setSignProduct($value)
+ {
+ $this->signProduct = (bool) $value;
+ }
+
+ public function setForceEncode($value)
+ {
+ $this->forceEncode = (bool) $value;
+ }
+
+ public function setEncodedOnly($value)
+ {
+ $this->encodedOnly = (bool) $value;
+ }
+
+ public function setIgnoreFileModes($value)
+ {
+ $this->ignoreFileModes = (bool) $value;
+ }
+
+ public function setExpires($value)
+ {
+ $this->expires = $value;
+ }
+
+ public function setProductName($value)
+ {
+ $this->productName = $value;
+ }
+
+ public function setOptMask($value)
+ {
+ $this->optMask = (int) $value;
+ }
+
+ public function setRenameSourceExt($value)
+ {
+ $this->renameSourceExt = $value;
+ }
+
+ public function setNoHeader($value)
+ {
+ $this->noHeader = (bool) $value;
+ }
+
+ /**
+ * Add a new fileset.
+ *
+ * @return FileSet
+ */
+ public function createFileSet()
+ {
+ $this->fileset = new ZendGuardFileSet();
+ $this->filesets[] = $this->fileset;
+ return $this->fileset;
+ }
+
+ /**
+ * Verifies that the configuration is correct
+ *
+ * @throws BuildException
+ */
+ protected function verifyConfiguration()
+ {
+ // Check that the zend encoder path is specified
+ if (empty($this->zendEncoderPath)) {
+ throw new BuildException("Zend Encoder path must be specified");
+ }
+
+ // verify that the zend encoder binary exists
+ if (!file_exists($this->zendEncoderPath)) {
+ throw new BuildException("Zend Encoder not found on path " . $this->zendEncoderPath);
+ }
+
+ // if either sign or license is required the private key path needs to be defined
+ // and the file has to exist and product name has to be specified
+ if ($this->signProduct || $this->licenseProduct) {
+ if (empty($this->privateKeyPath)) {
+ throw new BuildException("Licensing or signing requested but privateKeyPath not provided.");
+ }
+ if (!is_readable($this->privateKeyPath)) {
+ throw new BuildException("Licensing or signing requested but private key path doesn't exist or is unreadable.");
+ }
+ if (empty($this->productName)) {
+ throw new BuildException("Licensing or signing requested but product name not provided.");
+ }
+ }
+
+ // verify prolog file exists
+ if (!empty($this->prologFile)) {
+ if (!file_exists($this->prologFile)) {
+ throw new BuildException("The prolog file doesn't exist: " . $this->prologFile);
+ }
+ }
+ }
+
+ /**
+ * Do the work
+ *
+ * @throws BuildException
+ */
+ public function main()
+ {
+ $this->verifyConfiguration();
+ $this->prepareEncoderCommand();
+
+ try {
+ if (empty($this->filesets)) {
+ throw new BuildException("You must supply nested fileset.",
+ $this->getLocation());
+ }
+
+ $encodedFilesCounter = 0;
+
+ foreach ($this->filesets as $fs) {
+ /* @var $fs FileSet */
+
+ /* @var $fsBasedir PhingFile */
+ $fsBasedir = $fs->getDir($this->project)->getAbsolutePath();
+
+ $files = $fs->getFiles($this->project, false);
+
+ foreach ($files as $file) {
+ $f = new PhingFile($fsBasedir, $file);
+
+ if ($f->isFile()) {
+ $path = $f->getAbsolutePath();
+
+ $this->log("Encoding " . $path, Project::MSG_VERBOSE);
+ $this->encodeFile($path);
+
+ $encodedFilesCounter++;
+ }
+ }
+ }
+
+ $this->log("Encoded files: " . $encodedFilesCounter);
+ } catch (IOException $ioe) {
+ $msg = "Problem encoding files: " . $ioe->getMessage();
+ throw new BuildException($msg, $ioe, $this->getLocation());
+ }
+ }
+
+ /**
+ * Prepares the main part of the command that will be
+ * used to encode the given file(s).
+ */
+ protected function prepareEncoderCommand()
+ {
+ $command = $this->zendEncoderPath . " \\\n";
+
+ if (!empty($this->renameSourceExt)) {
+ $command .= " --rename-source " . $this->renameSourceExt . " \\\n";
+ } elseif ($this->deleteSource) {
+ // delete source
+ $command .= " --delete-source \\\n";
+ }
+
+ // short tags
+ $command .= " --short-tags " . (($this->shortTags) ? 'on' : 'off') . " \\\n";
+
+ // asp tags
+ $command .= " --asp-tags " . (($this->aspTags) ? 'on' : 'off') . " \\\n";
+
+ // use crypto
+ if ($this->useCrypto) {
+ $command .= " --use-crypto \\\n";
+ }
+
+ // ignore file modes
+ if ($this->ignoreFileModes) {
+ $command .= " --ignore-file-modes \\\n";
+ }
+
+ // force encode
+ if ($this->forceEncode) {
+ $command .= " --force-encode \\\n";
+ }
+
+ // expires
+ if (!empty($this->expires)) {
+ $command .= " --expires " . $this->expires . " \\\n";
+ }
+
+ // insert prolog file name or no-header
+ if (!empty($this->prologFile)) {
+ $command .= " --prolog-filename " . $this->prologFile . " \\\n";
+ } elseif ($this->noHeader) {
+ // no-header
+ $command .= " --no-header \\\n";
+ }
+
+ // obfuscation level
+ if ($this->obfuscationLevel > 0) {
+ $command .= " --obfuscation-level " . $this->obfuscationLevel . " \\\n";
+ }
+
+ // encoded only
+ if ($this->encodedOnly) {
+ $command .= " --encoded-only \\\n";
+ }
+
+ // opt mask
+ if (null !== $this->optMask) {
+ $command .= " --optimizations " . $this->optMask . " \\\n";
+ }
+
+ // Signing or licensing
+ if ($this->signProduct) {
+ $command .= " --sign-product " . $this->productName . " --private-key " . $this->privateKeyPath . " \\\n";
+ } elseif ($this->licenseProduct) {
+ $command .= " --license-product " . $this->productName . " --private-key " . $this->privateKeyPath . " \\\n";
+ }
+
+ // add a blank space
+ $command .= " ";
+
+ $this->encodeCommand = $command;
+
+ }
+
+ /**
+ * Encodes a file using currently defined Zend Guard settings
+ *
+ * @param string $filePath Path to the encoded file
+ */
+ protected function encodeFile($filePath)
+ {
+ $command = $this->encodeCommand . $filePath . ' 2>&1';
+
+ $this->log('Running: ' . $command, Project::MSG_VERBOSE);
+
+ $tmp = exec($command, $output, $return_var);
+ if ($return_var !== 0) {
+ throw new BuildException("Encoding failed. \n Msg: " . $tmp . " \n Encode command: " . $command);
+ }
+
+ return true;
+ }
+
+}
+
+/**
+ * This is a FileSet with the to specify permissions.
+ *
+ * Permissions are currently not implemented by PEAR Archive_Tar,
+ * but hopefully they will be in the future.
+ *
+ */
+class ZendGuardFileSet extends FileSet
+{
+ private $files = null;
+
+ /**
+ * Get a list of files and directories specified in the fileset.
+ * @return array a list of file and directory names, relative to
+ * the baseDir for the project.
+ */
+ public function getFiles(Project $p, $includeEmpty = true)
+ {
+
+ if ($this->files === null) {
+
+ $ds = $this->getDirectoryScanner($p);
+ $this->files = $ds->getIncludedFiles();
+ } // if ($this->files===null)
+
+ return $this->files;
+ }
+
+}
diff --git a/classes/phing/tasks/ext/zendguard/ZendGuardLicenseTask.php b/classes/phing/tasks/ext/zendguard/ZendGuardLicenseTask.php
new file mode 100644
index 0000000..35b7417
--- /dev/null
+++ b/classes/phing/tasks/ext/zendguard/ZendGuardLicenseTask.php
@@ -0,0 +1,524 @@
+<?php
+
+/*
+ * $Id: ZendGuardLicenseTask.php 1026 2011-01-06 15:13:50Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+/**
+ * Produce license files using Zeng Guard.
+ * The task can produce a license file from the given
+ * license properties or it can use a template.
+ *
+ * @author Petr Rybak <petr at rynawe.net>
+ * @version $Id: ZendGuardLicenseTask.php 1026 2011-01-06 15:13:50Z mrook $
+ * @package phing.tasks.ext.zendguard
+ * @since 2.4.3
+ */
+class ZendGuardLicenseTask extends Task
+{
+ protected $zendsignCommand;
+ private $tmpLicensePath;
+
+ /**
+ * TASK PROPERTIES
+ *
+ * See http://static.zend.com/topics/Zend-Guard-User-Guidev5x.pdf
+ * for more information on how to use ZendGuard
+ *
+ */
+ /**
+ * Path to Zend Guard zendenc_sign executable
+ *
+ * @var string
+ */
+ protected $zendsignPath;
+ /**
+ * Path to private key that will be used to sign the license
+ *
+ * @var string
+ */
+ protected $privateKeyPath;
+ /**
+ * Where to store the signed license file
+ *
+ * @var string
+ */
+ protected $outputFile;
+ /**
+ * Path to license template. If specified all
+ * license properties will be ignored and the
+ * template will be used to generate the file.
+ *
+ * @var string
+ */
+ protected $licenseTemplate;
+ /**
+ * The name assigned to Product. This must be the same name used when encoding
+ * the PHP files.
+ *
+ * REQUIRED
+ *
+ * @var string
+ */
+ protected $productName;
+ /**
+ * The Name of the Registered owner of the license.
+ *
+ * REQUIRED
+ *
+ * @var string
+ */
+ protected $registeredTo;
+ /**
+ * Expiration date of the license. Used if the license is issued with a date restriction.
+ * Possible values:
+ * - 'Never', '0' or false: the license won't expire
+ * - A Date in format DD-MM-YYYY to set expiration for that date
+ * - Relative date supported by the PHP strtotime function (e.g. +1 month)
+ *
+ * REQUIRED
+ *
+ * @var string
+ */
+ protected $expires;
+ /**
+ * Limits the use of the license to IP addresses that fall within specification. Supports
+ * wildcards for any of the IP place holders, as well as the two types of net masks
+ * (filters).
+ * Netmask pair An IP a.b.c.d, and a netmask w.x.y.z. (That is., 10.1.0.0/255.255.0.0),
+ * where the binary of mask is applied to filter IP addresses.
+ * ip/nnn (similar to a CIDR specification) This mask consists of nnn high-order 1 bits.
+ * (That is, 10.1.0.0/16 is the same as 10.1.0.0/255.255.0.0). Instead of spelling out
+ * the bits of the subnet mask, this mask notation is simply listed as the number of 1s
+ * bits that start the mask. Rather than writing the address and subnet mask as
+ * 192.60.128.0/255.255.252.0 the network address would be written simply as:
+ * 192.60.128.0/22 which indicates starting address of the network and number of 1s
+ * bits (22) in the network portion of the address. The mask in binary is
+ * (11111111.11111111.11111100.00000000).
+ *
+ * OPTIONAL
+ *
+ * Example (Wildcard):
+ * IP-Range = 10.1.*.*
+ * Example (Net Mask):
+ * IP-Range = 10.1.0.0/255.255.0.0
+ * Example (Net Mask):
+ * IP-Range = 10.1.0.0/16
+ *
+ * @var string
+ */
+ protected $ipRange;
+ /**
+ * Coded string (Zend Host ID) used to lock the license to a specific hardware. The
+ * Zend Host ID obtained from the machine where the encoded files and license are
+ * to be installed. The Zend Host ID code can be obtained by using the zendid utility.
+ * For more details, see Getting the Zend Host ID.
+ *
+ * REQUIRED if Hardware-Locked is set equal to YES.
+ * Meaningless if Hardware-Locked is set equal to NO.
+ *
+ * User semicolon to enter more than one Host-ID
+ *
+ * Example:
+ * Host-ID = H:MFM43-Q9CXC-B9EDX-GWYSU;H:MFM43-Q9CXC-B9EDX-GWYTY
+ *
+ * @var string
+ */
+ protected $hostID;
+ /**
+ * Option that indicates if the license will be locked to a specific machine
+ * using the Zend Host ID code(s). If set to YES, the Host-ID is required.
+ *
+ * OPTIONAL
+ *
+ * @var bool
+ */
+ protected $hardwareLocked;
+ /**
+ * Semi-colon separated user defined values that will be part of the license. These values
+ * CANNOT be modified after the license is produced. Modification
+ * would invalidate the license.
+ *
+ * OPTIONAL
+ * Example:
+ * Tea=Mint Flavor;Coffee=Arabica
+ *
+ * @var string
+ */
+ protected $userDefinedValues;
+ /**
+ * Semi-colon separated user defined x-values that will be part of the license. These values
+ * CAN be modified after the license is produced. Modification
+ * won't invalidate the license.
+ *
+ * OPTIONAL
+ * Example:
+ * Tea=Mint Flavor;Coffee=Arabica
+ *
+ * @var string
+ */
+ protected $xUserDefinedValues;
+
+
+ public function setLicenseTemplate($value)
+ {
+ $this->licenseTemplate = $value;
+ }
+
+ public function setProductName($productName)
+ {
+ $this->productName = $productName;
+ }
+
+ public function setRegisteredTo($registeredTo)
+ {
+ $this->registeredTo = $registeredTo;
+ }
+
+ /**
+ * Process the expires property. If the value is
+ * empty (false, '', ...) it will set the value to 'Never'
+ * Otherwise it will run the value through strtotime so relative
+ * date and time notation can be used (e.g. +1 month)
+ *
+ * @param mixed $expires
+ *
+ * @return string
+ */
+ public function setExpires($expires)
+ {
+ // process the expires value
+ if (false === $expires || '0' === $expires || strtolower($expires) == 'never' || '' === $expires) {
+ $this->expires = 'Never';
+ } else {
+ $time = strtotime($expires);
+ if (!$time) {
+ throw new BuildException("Unsupported expires format: " . $expires);
+ }
+ $this->expires = date('d-M-Y', $time);
+ }
+ }
+
+ public function setIpRange($iprange)
+ {
+ $this->ipRange = $iprange;
+ }
+
+ public function setHostID($hostID)
+ {
+ $this->hostID = $hostID;
+ }
+
+ public function setHardwareLocked($hardwareLocked)
+ {
+ $this->hardwareLocked = (bool) $hardwareLocked;
+ }
+
+ public function setUserDefinedValues($userDefinedValues)
+ {
+ $this->userDefinedValues = $userDefinedValues;
+ }
+
+ public function setXUserDefinedValues($xUserDefinedValues)
+ {
+ $this->xUserDefinedValues = $xUserDefinedValues;
+ }
+
+ public function setZendsignPath($zendsignPath)
+ {
+ $this->zendsignPath = $zendsignPath;
+ }
+
+ public function setPrivateKeyPath($privateKeyPath)
+ {
+ $this->privateKeyPath = $privateKeyPath;
+ }
+
+ public function setOutputFile($outputFile)
+ {
+ $this->outputFile = $outputFile;
+ }
+
+ /**
+ * Verifies that the configuration is correct
+ *
+ * @throws BuildException
+ */
+ protected function verifyConfiguration()
+ {
+ // Check that the zend encoder path is specified
+ if (empty($this->zendsignPath)) {
+ throw new BuildException("Zendenc_sign path must be specified");
+ }
+ // verify that the zend encoder binary exists
+ if (!file_exists($this->zendsignPath)) {
+ throw new BuildException("Zendenc_sign not found on path " . $this->zendsignPath);
+ }
+
+ // verify that the private key path is defined
+ if (empty($this->privateKeyPath)) {
+ throw new BuildException("You must define privateKeyPath.");
+ }
+ // verify that the private key file is readable
+ if (!is_readable($this->privateKeyPath)) {
+ throw new BuildException("Private key file is not readable: " . $this->privateKeyPath);
+ }
+
+ // if template is passed, verify that it is readable
+ if (!empty($this->licenseTemplate)) {
+ if (!is_readable($this->licenseTemplate)) {
+ throw new BuildException("License template file is not readable " . $this->licenseTemplate);
+ }
+ }
+
+ // check that output file path is defined
+ if (empty($this->outputFile)) {
+ throw new BuildException("Path where to store the result file needs to be defined in outputFile property");
+ }
+
+ // if license template is NOT provided check that all required parameters are defined
+ if (empty($this->licenseTemplate)) {
+
+ // check productName
+ if (empty($this->productName)) {
+ throw new BuildException("Property must be defined: productName");
+ }
+
+ // check expires
+ if (null === $this->expires) {
+ throw new BuildException("Property must be defined: expires");
+ }
+
+ // check registeredTo
+ if (empty($this->registeredTo)) {
+ throw new BuildException("Property must be defined: registeredTo");
+ }
+
+ // check hardwareLocked
+ if (null === $this->hardwareLocked) {
+ throw new BuildException("Property must be defined: " . $requiredProperty);
+ }
+
+ // if hardwareLocked is set to true, check that Host-ID is set
+ if ($this->hardwareLocked) {
+ if (empty($this->hostID)) {
+ throw new BuildException("If you set hardwareLocked to true hostID must be provided");
+ }
+ }
+ }
+ }
+
+ /**
+ * Do the work
+ *
+ * @throws BuildException
+ */
+ public function main()
+ {
+ try {
+ $this->verifyConfiguration();
+
+ $this->generateLicense();
+ } catch (Exception $e) {
+ // remove the license temp file if it was created
+ $this->cleanupTmpFiles();
+
+ throw $e;
+ }
+ $this->cleanupTmpFiles();
+ }
+
+ /**
+ * If temporary license file was created during the process
+ * this will remove it
+ *
+ * @return void
+ */
+ private function cleanupTmpFiles()
+ {
+ if (!empty($this->tmpLicensePath) && file_exists($this->tmpLicensePath)) {
+ $this->log("Deleting temporary license template " . $this->tmpLicensePath, Project::MSG_VERBOSE);
+
+ unlink($this->tmpLicensePath);
+ }
+ }
+
+ /**
+ * Prepares and returns the command that will be
+ * used to create the license.
+ *
+ * @return string
+ */
+ protected function prepareSignCommand()
+ {
+ $command = $this->zendsignPath;
+
+ // add license path
+ $command .= ' ' . $this->getLicenseTemplatePath();
+
+ // add result file path
+ $command .= ' ' . $this->outputFile;
+
+ // add key path
+ $command .= ' ' . $this->privateKeyPath;
+
+
+ $this->zendsignCommand = $command;
+
+ return $command;
+ }
+
+ /**
+ * Checks if the license template path is defined
+ * and returns it.
+ * If it the license template path is not defined
+ * it will generate a temporary template file and
+ * provide it as a template.
+ *
+ * @return string
+ */
+ protected function getLicenseTemplatePath()
+ {
+ if (!empty($this->licenseTemplate)) {
+ return $this->licenseTemplate;
+ } else {
+ return $this->generateLicenseTemplate();
+ }
+ }
+
+ /**
+ * Creates the signed license at the defined output path
+ *
+ * @return void
+ */
+ protected function generateLicense()
+ {
+ $command = $this->prepareSignCommand() . ' 2>&1';
+
+ $this->log('Creating license at ' . $this->outputFile);
+
+ $this->log('Running: ' . $command, Project::MSG_VERBOSE);
+ $tmp = exec($command, $output, $return_var);
+
+ // Check for exit value 1. Zendenc_sign command for some reason
+ // returns 0 in case of failure and 1 in case of success...
+ if ($return_var !== 1) {
+ throw new BuildException("Creating license failed. \n\nZendenc_sign msg:\n" . join("\n", $output) . "\n\n");
+ }
+ }
+
+ /**
+ * It will generate a temporary license template
+ * based on the properties defined.
+ *
+ * @return string Path of the temporary license template file
+ */
+ protected function generateLicenseTemplate()
+ {
+ $this->tmpLicensePath = tempnam(sys_get_temp_dir(), 'zendlicense');
+
+ $this->log("Creating temporary license template " . $this->tmpLicensePath, Project::MSG_VERBOSE);
+ if (file_put_contents($this->tmpLicensePath, $this->generateLicenseTemplateContent()) === false) {
+ throw new BuildException("Unable to create temporary template license file: " . $this->tmpLicensePath);
+ }
+
+ return $this->tmpLicensePath;
+ }
+
+ /**
+ * Generates license template content based
+ * on the defined parameters
+ *
+ * @return string
+ */
+ protected function generateLicenseTemplateContent()
+ {
+ $contentArr = array();
+
+ // Product Name
+ $contentArr[] = array('Product-Name', $this->productName);
+ // Registered to
+ $contentArr[] = array('Registered-To', $this->registeredTo);
+ // Hardware locked
+ $contentArr[] = array('Hardware-Locked', ($this->hardwareLocked ? 'Yes' : 'No'));
+
+ // Expires
+ $contentArr[] = array('Expires', $this->expires);
+
+ // IP-Range
+ if (!empty($this->ipRange)) {
+ $contentArr[] = array('IP-Range', $this->ipRange);
+ }
+ // Host-ID
+ if (!empty($this->hostID)) {
+ foreach (explode(';', $this->hostID) as $hostID) {
+ $contentArr[] = array('Host-ID', $hostID);
+ }
+ } else {
+ $contentArr[] = array('Host-ID', 'Not-Locked');
+ }
+
+ // parse user defined fields
+ if (!empty($this->userDefinedValues)) {
+ $this->parseAndAddUserDefinedValues($this->userDefinedValues, $contentArr);
+ }
+ // parse user defined x-fields
+ if (!empty($this->xUserDefinedValues)) {
+ $this->parseAndAddUserDefinedValues($this->xUserDefinedValues, $contentArr, 'X-');
+ }
+
+ // merge all the values
+ $content = '';
+ foreach ($contentArr as $valuePair) {
+
+ list($key, $value) = $valuePair;
+
+ $content .= $key . " = " . $value . "\n";
+ }
+
+ return $content;
+ }
+
+ /**
+ * Parse the given string in format like key1=value1;key2=value2;... and
+ * converts it to array
+ * (key1=>value1, key2=value2, ...)
+ *
+ * @param stirng $valueString Semi-colon separated value pairs
+ * @param array $valueArray Array to which the values will be added
+ * @param string $keyPrefix Prefix to use when adding the key
+ *
+ * @return void
+ */
+ protected function parseAndAddUserDefinedValues($valueString, array &$valueArray, $keyPrefix = '',
+ $pairSeparator = ';')
+ {
+ // explode the valueString (semicolon)
+ $valuePairs = explode($pairSeparator, $valueString);
+ if (!empty($valuePairs)) {
+ foreach ($valuePairs as $valuePair) {
+ list($key, $value) = explode('=', $valuePair, 2);
+
+ // add pair into the valueArray
+ $valueArray[] = array($keyPrefix . $key, $value);
+ }
+ }
+ }
+
+}
diff --git a/classes/phing/tasks/system/AdhocTaskdefTask.php b/classes/phing/tasks/system/AdhocTaskdefTask.php
index 696eebc..2188108 100644
--- a/classes/phing/tasks/system/AdhocTaskdefTask.php
+++ b/classes/phing/tasks/system/AdhocTaskdefTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: AdhocTaskdefTask.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: AdhocTaskdefTask.php 1015 2010-12-21 20:29:06Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -46,7 +46,7 @@ require_once 'phing/tasks/system/AdhocTask.php';
* </target>
*
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 526 $
+ * @version $Revision: 1015 $
* @package phing.tasks.system
*/
class AdhocTaskdefTask extends AdhocTask
@@ -82,12 +82,12 @@ class AdhocTaskdefTask extends AdhocTask
$classes = $this->getNewClasses();
- if (count($classes) !== 1)
+ if (count($classes) < 1)
{
- throw new BuildException("You must define one (and only one) class for AdhocTaskdefTask.");
+ throw new BuildException("You must define at least one class for AdhocTaskdefTask.");
}
- $classname = array_shift($classes);
+ $classname = array_pop($classes);
// instantiate it to make sure it is an instance of Task
$t = new $classname();
diff --git a/classes/phing/tasks/system/AvailableTask.php b/classes/phing/tasks/system/AvailableTask.php
index 35d96e5..ddb18cd 100644
--- a/classes/phing/tasks/system/AvailableTask.php
+++ b/classes/phing/tasks/system/AvailableTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: AvailableTask.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: AvailableTask.php 912 2010-10-12 01:08:31Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -28,8 +28,8 @@ include_once 'phing/tasks/system/condition/ConditionBase.php';
* Note: implements condition interface (see condition/Condition.php)
*
* @author Andreas Aderhold <andi at binarycloud.com>
- * @copyright � 2001,2002 THYRELL. All rights reserved
- * @version $Revision: 552 $
+ * @copyright 2001,2002 THYRELL. All rights reserved
+ * @version $Revision: 912 $
* @package phing.tasks.system
*/
class AvailableTask extends Task {
diff --git a/classes/phing/tasks/system/CopyTask.php b/classes/phing/tasks/system/CopyTask.php
index 52f7a5e..7e1c46d 100644
--- a/classes/phing/tasks/system/CopyTask.php
+++ b/classes/phing/tasks/system/CopyTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: CopyTask.php 756 2010-03-30 17:39:46Z mrook $
+ * $Id: CopyTask.php 985 2010-11-11 15:58:35Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -33,7 +33,7 @@ include_once 'phing/mappers/FlattenMapper.php';
* exist. It is possible to explictly overwrite existing files.
*
* @author Andreas Aderhold, andi at binarycloud.com
- * @version $Revision: 756 $ $Date: 2010-03-30 19:39:46 +0200 (Tue, 30 Mar 2010) $
+ * @version $Revision: 985 $ $Date: 2010-11-11 16:58:35 +0100 (do, 11 nov 2010) $
* @package phing.tasks.system
*/
class CopyTask extends Task {
@@ -58,6 +58,8 @@ class CopyTask extends Task {
protected $verbosity = Project::MSG_VERBOSE;
protected $mode = 0755; // mode to create directories with
+
+ protected $haltonerror = true; // stop build on errors
/**
* Sets up this object internal stuff. i.e. the Fileutils instance
@@ -181,6 +183,18 @@ class CopyTask extends Task {
}
/**
+ * Set the haltonerror attribute - when true, will
+ * make the build fail when errors are detected.
+ *
+ * @param boolean Flag if the build should be stopped on errors
+ * @return void
+ * @access public
+ */
+ function setHaltonerror($haltonerror) {
+ $this->haltonerror = (boolean) $haltonerror;
+ }
+
+ /**
* Nested creator, creates a FileSet for this task
*
* @access public
@@ -250,7 +264,7 @@ class CopyTask extends Task {
}
} else {
// terminate build
- throw new BuildException("Could not find file " . $this->file->__toString() . " to copy.");
+ $this->logError("Could not find file " . $this->file->__toString() . " to copy.");
}
}
@@ -407,7 +421,7 @@ class CopyTask extends Task {
$d = new PhingFile((string) $destdir);
if (!$d->exists()) {
if (!$d->mkdirs()) {
- $this->log("Unable to create directory " . $d->__toString(), Project::MSG_ERR);
+ $this->logError("Unable to create directory " . $d->__toString());
} else {
if ($this->preserveLMT) {
$d->setLastModified($s->lastModified());
@@ -448,10 +462,19 @@ class CopyTask extends Task {
$count++;
} catch (IOException $ioe) {
- $this->log("Failed to copy " . $from . " to " . $to . ": " . $ioe->getMessage(), Project::MSG_ERR);
+ $this->logError("Failed to copy " . $from . " to " . $to . ": " . $ioe->getMessage());
}
}
}
}
+
+ protected function logError($message, $location = NULL)
+ {
+ if ($this->haltonerror) {
+ throw new BuildException($message, $location);
+ } else {
+ $this->log($message, Project::MSG_ERR);
+ }
+ }
}
diff --git a/classes/phing/tasks/system/IfTask.php b/classes/phing/tasks/system/IfTask.php
index 3ff46c6..28f873a 100644
--- a/classes/phing/tasks/system/IfTask.php
+++ b/classes/phing/tasks/system/IfTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: IfTask.php 557 2009-08-29 13:54:38Z mrook $
+ * $Id: IfTask.php 956 2010-10-29 15:35:44Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -67,7 +67,7 @@ require_once 'phing/tasks/system/SequentialTask.php';
* task before you use it the first time:</p>
*
* <pre><code>
- * <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" />
+ * <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" />
* </code></pre>
*
* <h3>Crude Example</h3>
diff --git a/classes/phing/tasks/system/ImportTask.php b/classes/phing/tasks/system/ImportTask.php
index 2d8a5b1..3aa8057 100644
--- a/classes/phing/tasks/system/ImportTask.php
+++ b/classes/phing/tasks/system/ImportTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: ImportTask.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: ImportTask.php 969 2010-11-08 16:08:25Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -39,7 +39,7 @@ require_once 'phing/parser/ProjectConfigurator.php';
* dependencies or via the <phing> or <phingcall> task mechanisms.
*
* @author Bryan Davis <bpd at keynetics.com>
- * @version $Revision: 526 $
+ * @version $Revision: 969 $
* @package phing.tasks.system
*/
class ImportTask extends Task {
@@ -106,6 +106,7 @@ class ImportTask extends Task {
$msg = "Unable to find build file: {$file->getPath()}";
if ($this->optional) {
$this->log($msg . '... skipped');
+ return;
} else {
throw new BuildException($msg);
}
diff --git a/classes/phing/tasks/system/MoveTask.php b/classes/phing/tasks/system/MoveTask.php
index 75ea189..faa8de6 100644
--- a/classes/phing/tasks/system/MoveTask.php
+++ b/classes/phing/tasks/system/MoveTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: MoveTask.php 707 2010-01-30 13:52:14Z extraordinaire $
+ * $Id: MoveTask.php 985 2010-11-11 15:58:35Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -35,7 +35,7 @@ include_once 'phing/system/io/IOException.php';
* Source files and directories are only deleted when the file or
* directory has been copied to the destination successfully.
*
- * @version $Revision: 707 $
+ * @version $Revision: 985 $
* @package phing.tasks.system
*/
class MoveTask extends CopyTask {
@@ -93,7 +93,7 @@ class MoveTask extends CopyTask {
$moved = true;
} catch (IOException $ioe) {
$moved = false;
- $this->log("Failed to rename $from to $to: " . $ioe->getMessage(), $this->verbosity);
+ $this->logError("Failed to rename $from to $to: " . $ioe->getMessage());
}
}
}
@@ -119,8 +119,7 @@ class MoveTask extends CopyTask {
$f->delete();
} catch (IOException $ioe) {
- $msg = "Failed to move $from to $to: " . $ioe->getMessage();
- throw new BuildException($msg, $this->location);
+ $this->logError("Failed to move $from to $to: " . $ioe->getMessage(), $this->location);
}
} // foreach fileCopyMap
} // if copyMapSize
@@ -133,7 +132,7 @@ class MoveTask extends CopyTask {
$d = new PhingFile((string) $dir);
if (!$d->exists()) {
if (!$d->mkdirs()) {
- $this->log("Unable to create directory " . $d->getAbsolutePath(), Project::MSG_ERR);
+ $this->logError("Unable to create directory " . $d->getAbsolutePath());
} else {
$count++;
}
@@ -197,7 +196,7 @@ class MoveTask extends CopyTask {
try {
$d->delete();
} catch (Exception $e) {
- throw new BuildException("Unable to delete directory " . $d->__toString() . ": " . $e->getMessage());
+ $this->logError("Unable to delete directory " . $d->__toString() . ": " . $e->getMessage());
}
}
}
diff --git a/classes/phing/tasks/system/PhingTask.php b/classes/phing/tasks/system/PhingTask.php
index 2a5f659..59e0583 100644
--- a/classes/phing/tasks/system/PhingTask.php
+++ b/classes/phing/tasks/system/PhingTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: PhingTask.php 557 2009-08-29 13:54:38Z mrook $
+ * $Id: PhingTask.php 1014 2010-12-17 20:51:26Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -41,7 +41,7 @@ include_once 'phing/tasks/system/PropertyTask.php';
* </pre>
*
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 557 $
+ * @version $Revision: 1014 $
* @package phing.tasks.system
*/
class PhingTask extends Task {
diff --git a/classes/phing/tasks/system/TaskdefTask.php b/classes/phing/tasks/system/TaskdefTask.php
index 4d1d4e2..623323b 100644
--- a/classes/phing/tasks/system/TaskdefTask.php
+++ b/classes/phing/tasks/system/TaskdefTask.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: TaskdefTask.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: TaskdefTask.php 1014 2010-12-17 20:51:26Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -43,7 +43,7 @@ include_once 'phing/system/io/PhingFile.php';
* (right now these are just too simple to really justify creating an abstract class)
*
* @author Hans Lellelid <hans at xmpl.org>
- * @version $Revision: 526 $
+ * @version $Revision: 1014 $
* @package phing.tasks.system
*/
class TaskdefTask extends Task {
diff --git a/classes/phing/tasks/system/UpToDateTask.php b/classes/phing/tasks/system/UpToDateTask.php
index 1c58935..c7804eb 100644
--- a/classes/phing/tasks/system/UpToDateTask.php
+++ b/classes/phing/tasks/system/UpToDateTask.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: UpToDateTask.php 526 2009-08-11 12:11:17Z mrook $
+ * $Id: UpToDateTask.php 911 2010-10-08 12:34:14Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -21,6 +21,7 @@
require_once 'phing/Task.php';
include_once 'phing/tasks/system/condition/Condition.php';
+include_once 'phing/tasks/system/PropertyTask.php';
include_once 'phing/util/DirectoryScanner.php';
include_once 'phing/util/SourceFileScanner.php';
include_once 'phing/mappers/MergeMapper.php';
@@ -33,7 +34,7 @@ include_once 'phing/mappers/MergeMapper.php';
* @author William Ferguson <williamf at mincom.com> (Ant)
* @author Hiroaki Nakamura <hnakamur at mc.neweb.ne.jp> (Ant)
* @author Stefan Bodewig <stefan.bodewig at epost.de> (Ant)
- * @version $Revision: 526 $
+ * @version $Revision: 911 $
* @package phing.tasks.system
*/
class UpToDateTask extends Task implements Condition {
@@ -57,6 +58,14 @@ class UpToDateTask extends Task implements Condition {
}
/**
+ * Get property name
+ * @param property the name of the property to set if Target is up-to-date.
+ */
+ public function getProperty() {
+ return $this->_property;
+ }
+
+ /**
* The value to set the named property to if the target file is more
* up-to-date than (each of) the source file(s). Defaults to 'true'.
*
@@ -200,7 +209,12 @@ class UpToDateTask extends Task implements Condition {
}
$upToDate = $this->evaluate();
if ($upToDate) {
- $this->project->setNewProperty($this->_property, $this->getValue());
+ $property = $this->project->createTask('property');
+ $property->setName($this->getProperty());
+ $property->setValue($this->getValue());
+ $property->setOverride(true);
+ $property->main(); // execute
+
if ($this->mapperElement === null) {
$this->log("File \"" . $this->_targetFile->getAbsolutePath()
. "\" is up-to-date.", Project::MSG_VERBOSE);
diff --git a/classes/phing/types/FilterChain.php b/classes/phing/types/FilterChain.php
index d61d2d6..171294c 100644
--- a/classes/phing/types/FilterChain.php
+++ b/classes/phing/types/FilterChain.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: FilterChain.php 589 2009-09-27 18:10:25Z johan162 $
+ * $Id: FilterChain.php 1003 2010-11-24 12:37:34Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -21,6 +21,7 @@
include_once 'phing/types/DataType.php';
include_once 'phing/filters/HeadFilter.php';
+include_once 'phing/filters/IconvFilter.php';
include_once 'phing/filters/TailFilter.php';
include_once 'phing/filters/LineContains.php';
include_once 'phing/filters/LineContainsRegexp.php';
@@ -43,7 +44,7 @@ include_once 'phing/filters/XsltFilter.php';
* FilterChain may contain a chained set of filter readers.
*
* @author Yannick Lecaillez <yl at seasonfive.com>
- * @version $Revision: 589 $
+ * @version $Revision: 1003 $
* @package phing.types
*/
class FilterChain extends DataType {
@@ -76,6 +77,11 @@ class FilterChain extends DataType {
$this->filterReaders[] = $o;
}
+ function addIconvFilter(IconvFilter $o) {
+ $o->setProject($this->project);
+ $this->filterReaders[] = $o;
+ }
+
function addTailFilter(TailFilter $o) {
$o->setProject($this->project);
$this->filterReaders[] = $o;
@@ -101,6 +107,11 @@ class FilterChain extends DataType {
$this->filterReaders[] = $o;
}
+ function addReplaceTokensWithFile(ReplaceTokensWithFile $o) {
+ $o->setProject($this->project);
+ $this->filterReaders[] = $o;
+ }
+
function addReplaceRegexp(ReplaceRegexp $o) {
$o->setProject($this->project);
$this->filterReaders[] = $o;
diff --git a/classes/phing/types/selectors/SelectorUtils.php b/classes/phing/types/selectors/SelectorUtils.php
index 81363a2..5f62612 100644
--- a/classes/phing/types/selectors/SelectorUtils.php
+++ b/classes/phing/types/selectors/SelectorUtils.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: SelectorUtils.php 762 2010-04-11 13:42:41Z mrook $
+ * $Id: SelectorUtils.php 1044 2011-03-01 21:39:59Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -131,7 +131,8 @@ class SelectorUtils {
$rePattern = preg_quote($pattern, '/');
$dirSep = preg_quote(DIRECTORY_SEPARATOR, '/');
$patternReplacements = array(
- $dirSep.'\*\*' => '\/?.*',
+ $dirSep.'\*\*'.$dirSep => $dirSep.'.*('.$dirSep.')?',
+ $dirSep.'\*\*' => $dirSep.'.*',
'\*\*'.$dirSep => '.*',
'\*\*' => '.*',
'\*' => '[^'.$dirSep.']*',
diff --git a/classes/phing/util/DirectoryScanner.php b/classes/phing/util/DirectoryScanner.php
index 8aada4e..bc82980 100644
--- a/classes/phing/util/DirectoryScanner.php
+++ b/classes/phing/util/DirectoryScanner.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: DirectoryScanner.php 712 2010-02-03 22:09:13Z mrook $
+ * $Id: DirectoryScanner.php 995 2010-11-16 22:47:01Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -110,7 +110,7 @@ include_once 'phing/types/selectors/SelectorUtils.php';
* @author Magesh Umasankar, umagesh at rediffmail.com
* @author Andreas Aderhold, andi at binarycloud.com
*
- * @version $Revision: 712 $
+ * @version $Revision: 995 $
* @package phing.util
*/
class DirectoryScanner implements SelectorScanner {
@@ -483,8 +483,8 @@ class DirectoryScanner implements SelectorScanner {
}
else
if (@is_dir($file)) {
- if ($this->isIncluded($name)) {
- if (!$this->isExcluded($name)) {
+ if ($this->isIncluded($name.DIRECTORY_SEPARATOR)) {
+ if (!$this->isExcluded($name.DIRECTORY_SEPARATOR)) {
if ($this->isSelected($name, $file)) {
$this->dirsIncluded[] = $name;
if ($_fast) {
diff --git a/docs/api/build.xml b/docs/api/build.xml
old mode 100755
new mode 100644
diff --git a/docs/api/docs/phing-tasks-system/CVSPassTask.html b/docs/api/docs/phing-tasks-system/CVSPassTask.html
new file mode 100644
index 0000000..3cd5b68
--- /dev/null
+++ b/docs/api/docs/phing-tasks-system/CVSPassTask.html
@@ -0,0 +1,667 @@
+<html>
+<head>
+<title>Docs For Class CVSPassTask</title>
+<link rel="stylesheet" type="text/css" href="../media/style.css">
+</head>
+<body>
+
+<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
+ <tr>
+ <td class="header_top">phing-tasks-system</td>
+ </tr>
+ <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
+ <tr>
+ <td class="header_menu">
+
+
+ [ <a href="../classtrees_phing-tasks-system.html" class="menu">class tree: phing-tasks-system</a> ]
+ [ <a href="../elementindex_phing-tasks-system.html" class="menu">index: phing-tasks-system</a> ]
+ [ <a href="../elementindex.html" class="menu">all elements</a> ]
+ </td>
+ </tr>
+ <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
+</table>
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr valign="top">
+ <td width="200" class="menu">
+ <div id="todolist">
+ <p><a href="../todolist.html">Todo List</a></p>
+ </div>
+ <b>Packages:</b><br />
+ <a href="../li_phing.html">phing</a><br />
+ <a href="../li_JSMin.html">JSMin</a><br />
+ <a href="../li_phing-filters.html">phing-filters</a><br />
+ <a href="../li_phing-filters-util.html">phing-filters-util</a><br />
+ <a href="../li_phing-input.html">phing-input</a><br />
+ <a href="../li_phing-lib.html">phing-lib</a><br />
+ <a href="../li_phing-listener.html">phing-listener</a><br />
+ <a href="../li_phing-mappers.html">phing-mappers</a><br />
+ <a href="../li_phing-parser.html">phing-parser</a><br />
+ <a href="../li_phing-system-io.html">phing-system-io</a><br />
+ <a href="../li_phing-system-lang.html">phing-system-lang</a><br />
+ <a href="../li_phing-system-util.html">phing-system-util</a><br />
+ <a href="../li_phing-tasks-ext.html">phing-tasks-ext</a><br />
+ <a href="../li_phing-tasks-ext-coverage.html">phing-tasks-ext-coverage</a><br />
+ <a href="../li_phing-tasks-ext-creole.html">phing-tasks-ext-creole</a><br />
+ <a href="../li_phing-tasks-ext-dbdeploy.html">phing-tasks-ext-dbdeploy</a><br />
+ <a href="../li_phing-tasks-ext-formatter.html">phing-tasks-ext-formatter</a><br />
+ <a href="../li_phing-tasks-ext-ioncube.html">phing-tasks-ext-ioncube</a><br />
+ <a href="../li_phing-tasks-ext-pdo.html">phing-tasks-ext-pdo</a><br />
+ <a href="../li_phing-tasks-ext-pearpackage.html">phing-tasks-ext-pearpackage</a><br />
+ <a href="../li_phing-tasks-ext-phar.html">phing-tasks-ext-phar</a><br />
+ <a href="../li_phing-tasks-ext-phk.html">phing-tasks-ext-phk</a><br />
+ <a href="../li_phing-tasks-ext-phpdoc.html">phing-tasks-ext-phpdoc</a><br />
+ <a href="../li_phing-tasks-ext-phpunit.html">phing-tasks-ext-phpunit</a><br />
+ <a href="../li_phing-tasks-ext-phpunit-formatter.html">phing-tasks-ext-phpunit-formatter</a><br />
+ <a href="../li_phing-tasks-ext-simpletest.html">phing-tasks-ext-simpletest</a><br />
+ <a href="../li_phing-tasks-ext-svn.html">phing-tasks-ext-svn</a><br />
+ <a href="../li_phing-tasks-system.html">phing-tasks-system</a><br />
+ <a href="../li_phing-tasks-system-condition.html">phing-tasks-system-condition</a><br />
+ <a href="../li_phing-types.html">phing-types</a><br />
+ <a href="../li_phing-types-selecctors.html">phing-types-selecctors</a><br />
+ <a href="../li_phing-types-selectors.html">phing-types-selectors</a><br />
+ <a href="../li_phing-util.html">phing-util</a><br />
+ <a href="../li_phing-util-regex.html">phing-util-regex</a><br />
+ <a href="../li_phing-util-regexp.html">phing-util-regexp</a><br />
+ <br /><br />
+ <b>Files:</b><br />
+ <div class="package">
+ <a href="../phing-tasks-system/_tasks---system---AdhocTask.php.html"> AdhocTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---AdhocTaskdefTask.php.html"> AdhocTaskdefTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---AdhocTypedefTask.php.html"> AdhocTypedefTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---AppendTask.php.html"> AppendTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---AvailableTask.php.html"> AvailableTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ChmodTask.php.html"> ChmodTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ChownTask.php.html"> ChownTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ConditionTask.php.html"> ConditionTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---CopyTask.php.html"> CopyTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---ext---creole---CreoleTask.php.html"> CreoleTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---CvsPassTask.php.html"> CvsPassTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---CvsTask.php.html"> CvsTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---DeleteTask.php.html"> DeleteTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---EchoTask.php.html"> EchoTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ExecTask.php.html"> ExecTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ExitTask.php.html"> ExitTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ForeachTask.php.html"> ForeachTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---IfTask.php.html"> IfTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ImportTask.php.html"> ImportTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---IncludePathTask.php.html"> IncludePathTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---InputTask.php.html"> InputTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---MatchingTask.php.html"> MatchingTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---MkdirTask.php.html"> MkdirTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---MoveTask.php.html"> MoveTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---ext---pdo---PDOTask.php.html"> PDOTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---PhingCallTask.php.html"> PhingCallTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---PhingTask.php.html"> PhingTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---PhpEvalTask.php.html"> PhpEvalTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---PropertyPromptTask.php.html"> PropertyPromptTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---PropertyTask.php.html"> PropertyTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ReflexiveTask.php.html"> ReflexiveTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---ext---ReplaceRegexpTask.php.html"> ReplaceRegexpTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---ResolvePathTask.php.html"> ResolvePathTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---SequentialTask.php.html"> SequentialTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---TaskdefTask.php.html"> TaskdefTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---TouchTask.php.html"> TouchTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---TstampTask.php.html"> TstampTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---TypedefTask.php.html"> TypedefTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---UpToDateTask.php.html"> UpToDateTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---WarnTask.php.html"> WarnTask.php
+ </a><br>
+ <a href="../phing-tasks-system/_tasks---system---XsltTask.php.html"> XsltTask.php
+ </a><br>
+ </div><br />
+
+
+ <b>Classes:</b><br />
+ <div class="package">
+ <a href="../phing-tasks-system/AdhocTask.html">AdhocTask</a><br />
+ <a href="../phing-tasks-system/AdhocTaskdefTask.html">AdhocTaskdefTask</a><br />
+ <a href="../phing-tasks-system/AdhocTypedefTask.html">AdhocTypedefTask</a><br />
+ <a href="../phing-tasks-system/AppendTask.html">AppendTask</a><br />
+ <a href="../phing-tasks-system/AvailableTask.html">AvailableTask</a><br />
+ <a href="../phing-tasks-system/ChmodTask.html">ChmodTask</a><br />
+ <a href="../phing-tasks-system/ChownTask.html">ChownTask</a><br />
+ <a href="../phing-tasks-system/ConditionTask.html">ConditionTask</a><br />
+ <a href="../phing-tasks-system/CopyTask.html">CopyTask</a><br />
+ <a href="../phing-tasks-system/CreoleTask.html">CreoleTask</a><br />
+ <a href="../phing-tasks-system/CVSPassTask.html">CVSPassTask</a><br />
+ <a href="../phing-tasks-system/CvsTask.html">CvsTask</a><br />
+ <a href="../phing-tasks-system/DeleteTask.html">DeleteTask</a><br />
+ <a href="../phing-tasks-system/EchoTask.html">EchoTask</a><br />
+ <a href="../phing-tasks-system/ExecTask.html">ExecTask</a><br />
+ <a href="../phing-tasks-system/ExitTask.html">ExitTask</a><br />
+ <a href="../phing-tasks-system/ForeachTask.html">ForeachTask</a><br />
+ <a href="../phing-tasks-system/FunctionParam.html">FunctionParam</a><br />
+ <a href="../phing-tasks-system/IfTask.html">IfTask</a><br />
+ <a href="../phing-tasks-system/ImportTask.html">ImportTask</a><br />
+ <a href="../phing-tasks-system/IncludePathTask.html">IncludePathTask</a><br />
+ <a href="../phing-tasks-system/InputTask.html">InputTask</a><br />
+ <a href="../phing-tasks-system/MatchingTask.html">MatchingTask</a><br />
+ <a href="../phing-tasks-system/MkdirTask.html">MkdirTask</a><br />
+ <a href="../phing-tasks-system/MoveTask.html">MoveTask</a><br />
+ <a href="../phing-tasks-system/PDOTask.html">PDOTask</a><br />
+ <a href="../phing-tasks-system/PhingCallTask.html">PhingCallTask</a><br />
+ <a href="../phing-tasks-system/PhingReference.html">PhingReference</a><br />
+ <a href="../phing-tasks-system/PhingTask.html">PhingTask</a><br />
+ <a href="../phing-tasks-system/PhpEvalTask.html">PhpEvalTask</a><br />
+ <a href="../phing-tasks-system/PropertyPromptTask.html">PropertyPromptTask</a><br />
+ <a href="../phing-tasks-system/PropertyTask.html">PropertyTask</a><br />
+ <a href="../phing-tasks-system/ReflexiveTask.html">ReflexiveTask</a><br />
+ <a href="../phing-tasks-system/ReplaceRegexpTask.html">ReplaceRegexpTask</a><br />
+ <a href="../phing-tasks-system/ResolvePathTask.html">ResolvePathTask</a><br />
+ <a href="../phing-tasks-system/SequentialTask.html">SequentialTask</a><br />
+ <a href="../phing-tasks-system/TaskdefTask.html">TaskdefTask</a><br />
+ <a href="../phing-tasks-system/TouchTask.html">TouchTask</a><br />
+ <a href="../phing-tasks-system/TstampCustomFormat.html">TstampCustomFormat</a><br />
+ <a href="../phing-tasks-system/TstampTask.html">TstampTask</a><br />
+ <a href="../phing-tasks-system/TypedefTask.html">TypedefTask</a><br />
+ <a href="../phing-tasks-system/UpToDateTask.html">UpToDateTask</a><br />
+ <a href="../phing-tasks-system/WarnTask.html">WarnTask</a><br />
+ <a href="../phing-tasks-system/XsltTask.html">XsltTask</a><br />
+ </div>
+ </td>
+ <td>
+ <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
+
+<h1>Class: CVSPassTask</h1>
+Source Location: /tasks/system/CvsPassTask.php<br /><br />
+
+
+<table width="100%" border="0">
+<tr><td valign="top">
+
+<h3><a href="#class_details">Class Overview</a></h3>
+<pre><a href="../phing/ProjectComponent.html">ProjectComponent</a>
+ |
+ --<a href="../phing/Task.html">Task</a>
+ |
+ --CVSPassTask</pre><br />
+<div class="description">Adds an new entry to a CVS password file.</div><br /><br />
+<h4>Author(s):</h4>
+<ul>
+ <li>Jeff Martin <<a href="mailto:jeff at custommonkey.org">jeff at custommonkey.org</a>> (Ant)</li>
+ <li>Hans Lellelid <<a href="mailto:hans at xmpl.org">hans at xmpl.org</a>> (Phing)</li>
+ </ul>
+
+
+
+
+
+
+
+<h4>Version:</h4>
+<ul>
+ <li>$Revision: 526 $</li>
+</ul>
+
+<h4>Copyright:</h4>
+<ul>
+ <li>� 2001,2002 THYRELL. All rights reserved</li>
+</ul>
+
+</td>
+
+
+
+<td valign="top">
+<h3><a href="#class_methods">Methods</a></h3>
+<ul>
+ <li><a href="../phing-tasks-system/CVSPassTask.html#method__construct">__construct</a></li>
+ <li><a href="../phing-tasks-system/CVSPassTask.html#methodmain">main</a></li>
+ <li><a href="../phing-tasks-system/CVSPassTask.html#methodsetCvsroot">setCvsroot</a></li>
+ <li><a href="../phing-tasks-system/CVSPassTask.html#methodsetPassfile">setPassfile</a></li>
+ <li><a href="../phing-tasks-system/CVSPassTask.html#methodsetPassword">setPassword</a></li>
+ </ul>
+</td>
+
+</tr></table>
+<hr />
+
+<table width="100%" border="0"><tr>
+
+
+
+
+<td valign="top">
+<h3>Inherited Variables</h3>
+<div class="tags">
+<h4>Class: <a href="../phing/Task.html">Task</a></h4>
+<dl>
+<dt>
+ <a href="../phing/Task.html#var$description">Task::$description</a>
+ </dt>
+<dd>
+
+</dd>
+<dt>
+ <a href="../phing/Task.html#var$location">Task::$location</a>
+ </dt>
+<dd>
+
+</dd>
+<dt>
+ <a href="../phing/Task.html#var$target">Task::$target</a>
+ </dt>
+<dd>
+
+</dd>
+<dt>
+ <a href="../phing/Task.html#var$taskName">Task::$taskName</a>
+ </dt>
+<dd>
+
+</dd>
+<dt>
+ <a href="../phing/Task.html#var$taskType">Task::$taskType</a>
+ </dt>
+<dd>
+
+</dd>
+<dt>
+ <a href="../phing/Task.html#var$wrapper">Task::$wrapper</a>
+ </dt>
+<dd>
+
+</dd>
+</dl>
+</div>
+<div class="tags">
+<h4>Class: <a href="../phing/ProjectComponent.html">ProjectComponent</a></h4>
+<dl>
+<dt>
+ <a href="../phing/ProjectComponent.html#var$project">ProjectComponent::$project</a>
+ </dt>
+<dd>
+
+</dd>
+</dl>
+</div>
+</td>
+
+<td valign="top">
+<h3>Inherited Methods</h3>
+<div class="tags">
+<h4>Class: <a href="../phing/Task.html">Task</a></h4>
+<dl>
+ <dt>
+ <a href="../phing/Task.html#methodgetDescription">Task::getDescription()</a>
+ </dt>
+ <dd>
+ Returns the textual description of the task
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetLocation">Task::getLocation()</a>
+ </dt>
+ <dd>
+ Returns the location within the buildfile this task occurs. Used by <a href="../phing/BuildException.html">BuildException</a> to give detailed error messages.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetOwningTarget">Task::getOwningTarget()</a>
+ </dt>
+ <dd>
+ Returns the owning target of this task.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetRegisterSlot">Task::getRegisterSlot()</a>
+ </dt>
+ <dd>
+ Returns a name
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetRuntimeConfigurableWrapper">Task::getRuntimeConfigurableWrapper()</a>
+ </dt>
+ <dd>
+ Returns the wrapper object for runtime configuration
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetTaskName">Task::getTaskName()</a>
+ </dt>
+ <dd>
+ Returns the name of task, used only for log messages
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodgetTaskType">Task::getTaskType()</a>
+ </dt>
+ <dd>
+ Returns the name of the task under which it was invoked, usually the XML tagname
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodinit">Task::init()</a>
+ </dt>
+ <dd>
+ Called by the parser to let the task initialize properly.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodlog">Task::log()</a>
+ </dt>
+ <dd>
+ Provides a project level log event to the task.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodmain">Task::main()</a>
+ </dt>
+ <dd>
+ Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodmaybeConfigure">Task::maybeConfigure()</a>
+ </dt>
+ <dd>
+ Configure this task if it hasn't been done already.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodperform">Task::perform()</a>
+ </dt>
+ <dd>
+ Perfrom this task
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetDescription">Task::setDescription()</a>
+ </dt>
+ <dd>
+ Sets a textual description of the task
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetLocation">Task::setLocation()</a>
+ </dt>
+ <dd>
+ Sets the location within the buildfile this task occurs. Called by the parser to set location information.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetOwningTarget">Task::setOwningTarget()</a>
+ </dt>
+ <dd>
+ Sets the owning target this task belongs to.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetRuntimeConfigurableWrapper">Task::setRuntimeConfigurableWrapper()</a>
+ </dt>
+ <dd>
+ Sets the wrapper object this task should use for runtime configurable elements.
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetTaskName">Task::setTaskName()</a>
+ </dt>
+ <dd>
+ Sets the name of this task for log messages
+ </dd>
+ <dt>
+ <a href="../phing/Task.html#methodsetTaskType">Task::setTaskType()</a>
+ </dt>
+ <dd>
+ Sets the type of the task. Usually this is the name of the XML tag
+ </dd>
+ </dl>
+<h4>Class: <a href="../phing/ProjectComponent.html">ProjectComponent</a></h4>
+<dl>
+ <dt>
+ <a href="../phing/ProjectComponent.html#methodgetProject">ProjectComponent::getProject()</a>
+ </dt>
+ <dd>
+ Returns a reference to current project
+ </dd>
+ <dt>
+ <a href="../phing/ProjectComponent.html#methodlog">ProjectComponent::log()</a>
+ </dt>
+ <dd>
+ Logs a message with the given priority.
+ </dd>
+ <dt>
+ <a href="../phing/ProjectComponent.html#methodsetProject">ProjectComponent::setProject()</a>
+ </dt>
+ <dd>
+ References the project to the current component.
+ </dd>
+ </dl>
+</div>
+</td>
+
+</tr></table>
+<hr />
+
+<a name="class_details"></a>
+<h3>Class Details</h3>
+<div class="tags">
+[line 35]<br />
+Adds an new entry to a CVS password file.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>author:</b> </td><td>Jeff Martin <<a href="mailto:jeff at custommonkey.org">jeff at custommonkey.org</a>> (Ant)</td>
+ </tr>
+ <tr>
+ <td><b>author:</b> </td><td>Hans Lellelid <<a href="mailto:hans at xmpl.org">hans at xmpl.org</a>> (Phing)</td>
+ </tr>
+ <tr>
+ <td><b>version:</b> </td><td>$Revision: 526 $</td>
+ </tr>
+ <tr>
+ <td><b>copyright:</b> </td><td>� 2001,2002 THYRELL. All rights reserved</td>
+ </tr>
+</table>
+</div>
+</div><br /><br />
+<div class="top">[ <a href="#top">Top</a> ]</div><br />
+
+
+<hr />
+<a name="class_methods"></a>
+<h3>Class Methods</h3>
+<div class="tags">
+
+ <hr />
+ <a name="method__construct"></a>
+ <h3>constructor __construct <span class="smalllinenumber">[line 67]</span></h3>
+ <div class="function">
+ <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
+ <code>CVSPassTask __construct(
+)</code>
+ </td></tr></table>
+ </td></tr></table><br />
+
+ Create a CVS task using the default cvspass file location.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>access:</b> </td><td>public</td>
+ </tr>
+</table>
+</div>
+<br /><br />
+
+
+ <div class="top">[ <a href="#top">Top</a> ]</div>
+ </div>
+ <hr />
+ <a name="methodmain"></a>
+ <h3>method main <span class="smalllinenumber">[line 79]</span></h3>
+ <div class="function">
+ <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
+ <code>void main(
+)</code>
+ </td></tr></table>
+ </td></tr></table><br />
+
+ Does the work.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>throws:</b> </td><td>BuildException if someting goes wrong with the build</td>
+ </tr>
+ <tr>
+ <td><b>access:</b> </td><td>public</td>
+ </tr>
+</table>
+</div>
+<br /><br />
+
+ Overrides <a href="../phing/Task.html#methodmain">Task::main()</a> (Called by the project to let the task do it's work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running <em>phing target1 target2</em> will run all tasks in target3 twice.)<br /><br />
+ <div class="top">[ <a href="#top">Top</a> ]</div>
+ </div>
+ <hr />
+ <a name="methodsetCvsroot"></a>
+ <h3>method setCvsroot <span class="smalllinenumber">[line 153]</span></h3>
+ <div class="function">
+ <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
+ <code>void setCvsroot(
+string
+$cvsRoot)</code>
+ </td></tr></table>
+ </td></tr></table><br />
+
+ The CVS repository to add an entry for.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>access:</b> </td><td>public</td>
+ </tr>
+</table>
+</div>
+<br /><br />
+
+
+ <h4>Parameters:</h4>
+ <div class="tags">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="type">string </td>
+ <td><b>$cvsRoot</b> </td>
+ <td></td>
+ </tr>
+ </table>
+ </div><br />
+ <div class="top">[ <a href="#top">Top</a> ]</div>
+ </div>
+ <hr />
+ <a name="methodsetPassfile"></a>
+ <h3>method setPassfile <span class="smalllinenumber">[line 161]</span></h3>
+ <div class="function">
+ <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
+ <code>void setPassfile(
+
+$passFile)</code>
+ </td></tr></table>
+ </td></tr></table><br />
+
+ Password file to add the entry to.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>access:</b> </td><td>public</td>
+ </tr>
+</table>
+</div>
+<br /><br />
+
+
+ <h4>Parameters:</h4>
+ <div class="tags">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="type"><a href="../phing-system-io/PhingFile.html">PhingFile</a> </td>
+ <td><b>$passFile</b> </td>
+ <td></td>
+ </tr>
+ </table>
+ </div><br />
+ <div class="top">[ <a href="#top">Top</a> ]</div>
+ </div>
+ <hr />
+ <a name="methodsetPassword"></a>
+ <h3>method setPassword <span class="smalllinenumber">[line 169]</span></h3>
+ <div class="function">
+ <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
+ <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
+ <code>void setPassword(
+string
+$password)</code>
+ </td></tr></table>
+ </td></tr></table><br />
+
+ Password to be added to the password file.<br /><br /><br /><br />
+<h4>Tags:</h4>
+<div class="tags">
+<table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>access:</b> </td><td>public</td>
+ </tr>
+</table>
+</div>
+<br /><br />
+
+
+ <h4>Parameters:</h4>
+ <div class="tags">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="type">string </td>
+ <td><b>$password</b> </td>
+ <td></td>
+ </tr>
+ </table>
+ </div><br />
+ <div class="top">[ <a href="#top">Top</a> ]</div>
+ </div>
+</div><br />
+
+
+ <div class="credit">
+ <hr />
+ Documentation generated on Mon, 19 Oct 2009 10:50:41 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ </div>
+ </td></tr></table>
+ </td>
+ </tr>
+</table>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/api/docs/phing-tasks-system/IfTask.html b/docs/api/docs/phing-tasks-system/IfTask.html
index cac7614..df93895 100644
--- a/docs/api/docs/phing-tasks-system/IfTask.html
+++ b/docs/api/docs/phing-tasks-system/IfTask.html
@@ -430,7 +430,7 @@ Perform some tasks based on whether a given condition holds true or not.<br /><b
</ol> conditions are false.
Use the following task to define the <ol><li><div class="src-line"><<span class="src-key">if</span><span class="src-sym">&</span><span class="src-id">gt</span><span class="src-sym">;</span></div></li>
</ol> task before you use it the first time:</p><p><pre><code>
- <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" />
+ <taskdef name="if" classname="net.sf.antcontrib.logic.IfTask" />
</code></pre>
<h3>Crude Example</h3>
<ol><li><div class="src-line"> <<span class="src-key">if</span>></div></li>
diff --git a/docs/docsystem/html/FrameToCTop.html b/docs/docsystem/html/FrameToCTop.html
index 0a00482..c636464 100644
--- a/docs/docsystem/html/FrameToCTop.html
+++ b/docs/docsystem/html/FrameToCTop.html
@@ -1,5 +1,5 @@
<!--
--File $Id: FrameToCTop.html 478 2009-07-29 17:25:59Z mrook $
+-File $Id: FrameToCTop.html 836 2010-08-27 12:29:25Z victor $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -7,7 +7,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title> binarycloud contributor guide </title>
+ <title>Phing User Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="Stylesheet" rev="Stylesheet" href="../css/FrameToc.css" type="text/css" media="All" charset="iso-8859-1" />
</head>
diff --git a/docs/example/build.xml b/docs/example/build.xml
old mode 100755
new mode 100644
index 237b527..ff1a8d5
--- a/docs/example/build.xml
+++ b/docs/example/build.xml
@@ -16,6 +16,7 @@
</coverage-setup>
<phpunit codecoverage="true">
<formatter type="xml" todir="reports"/>
+ <formatter type="clover" todir="."/>
<batchtest>
<fileset dir="src">
<include name="*Test.php"/>
diff --git a/test/etc/regression/137/.gitignore b/docs/example/clover-coverage.xml
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to docs/example/clover-coverage.xml
diff --git a/docs/example/docs/__filesource/fsource_hello-world__HelloWorld.php.html b/docs/example/docs/__filesource/fsource_hello-world__HelloWorld.php.html
index e18cc95..86036c0 100644
--- a/docs/example/docs/__filesource/fsource_hello-world__HelloWorld.php.html
+++ b/docs/example/docs/__filesource/fsource_hello-world__HelloWorld.php.html
@@ -67,7 +67,7 @@
</div>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/__filesource/fsource_hello-world__HelloWorldTest.php.html b/docs/example/docs/__filesource/fsource_hello-world__HelloWorldTest.php.html
index f0abad0..5749dc9 100644
--- a/docs/example/docs/__filesource/fsource_hello-world__HelloWorldTest.php.html
+++ b/docs/example/docs/__filesource/fsource_hello-world__HelloWorldTest.php.html
@@ -63,7 +63,7 @@
</div>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/classtrees_hello-world.html b/docs/example/docs/classtrees_hello-world.html
index 3e9494f..1c55ddd 100644
--- a/docs/example/docs/classtrees_hello-world.html
+++ b/docs/example/docs/classtrees_hello-world.html
@@ -45,7 +45,7 @@
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/elementindex.html b/docs/example/docs/elementindex.html
index f07f24a..927b3e1 100644
--- a/docs/example/docs/elementindex.html
+++ b/docs/example/docs/elementindex.html
@@ -83,7 +83,7 @@
<a href="elementindex.html#top">top</a><br>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/elementindex_hello-world.html b/docs/example/docs/elementindex_hello-world.html
index 035b116..0535a52 100644
--- a/docs/example/docs/elementindex_hello-world.html
+++ b/docs/example/docs/elementindex_hello-world.html
@@ -101,7 +101,7 @@
<a href="elementindex_hello-world.html#top">top</a><br>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/errors.html b/docs/example/docs/errors.html
index 034d8a3..a4ae352 100644
--- a/docs/example/docs/errors.html
+++ b/docs/example/docs/errors.html
@@ -33,22 +33,9 @@
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<a href="#Post-parsing">Post-parsing</a><br>
-<a href="#HelloWorldTest.php">HelloWorldTest.php</a><br>
-<a name="Post-parsing"></a>
-<h1>Post-parsing</h1>
-<h2>Warnings:</h2><br>
-<b>Warning</b> - Class HelloWorldTest parent PHPUnit_Framework_TestCase not found<br>
-<a name="HelloWorld.php"></a>
-<h1>HelloWorld.php</h1>
-<h2>Warnings:</h2><br>
-<b>Warning on line 10</b> - DocBlock would be page-level, but precedes class "HelloWorld", use another DocBlock to document the file<br>
-<a name="HelloWorldTest.php"></a>
-<h1>HelloWorldTest.php</h1>
-<h2>Warnings:</h2><br>
-<b>Warning on line 21</b> - File "/home/druid/dev/phing/trunk/docs/example/src/HelloWorldTest.php" has no page-level DocBlock, use @package in the first DocBlock to create one<br>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/hello-world/HelloWorld.html b/docs/example/docs/hello-world/HelloWorld.html
index 057882d..3283ff6 100644
--- a/docs/example/docs/hello-world/HelloWorld.html
+++ b/docs/example/docs/hello-world/HelloWorld.html
@@ -179,7 +179,7 @@ $silent = true])</code>
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/hello-world/HelloWorldTest.html b/docs/example/docs/hello-world/HelloWorldTest.html
index 1ad6e91..f19f0e9 100644
--- a/docs/example/docs/hello-world/HelloWorldTest.html
+++ b/docs/example/docs/hello-world/HelloWorldTest.html
@@ -153,7 +153,7 @@ Test class for HelloWorld<br /><br /><br /><br />
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/hello-world/_HelloWorld.php.html b/docs/example/docs/hello-world/_HelloWorld.php.html
index c9e24de..ef93e70 100644
--- a/docs/example/docs/hello-world/_HelloWorld.php.html
+++ b/docs/example/docs/hello-world/_HelloWorld.php.html
@@ -75,7 +75,7 @@ Source Location: /HelloWorld.php<br /><br />
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/hello-world/_HelloWorldTest.php.html b/docs/example/docs/hello-world/_HelloWorldTest.php.html
index bd7aa89..1cbd921 100644
--- a/docs/example/docs/hello-world/_HelloWorldTest.php.html
+++ b/docs/example/docs/hello-world/_HelloWorldTest.php.html
@@ -80,7 +80,7 @@ require_once(<a href="../hello-world/_HelloWorld.php.html">"HelloWorld.php"</a>)
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/index.html b/docs/example/docs/index.html
index 5af80ae..7263f9e 100644
--- a/docs/example/docs/index.html
+++ b/docs/example/docs/index.html
@@ -52,7 +52,7 @@
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/docs/li_hello-world.html b/docs/example/docs/li_hello-world.html
index 5af80ae..7263f9e 100644
--- a/docs/example/docs/li_hello-world.html
+++ b/docs/example/docs/li_hello-world.html
@@ -52,7 +52,7 @@
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
<div class="credit">
<hr />
- Documentation generated on Tue, 29 Jun 2010 17:08:21 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
+ Documentation generated on Tue, 23 Nov 2010 21:36:07 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
diff --git a/docs/example/reports/coverage.db b/docs/example/reports/coverage.db
index ab70b1f..4eec2fd 100644
--- a/docs/example/reports/coverage.db
+++ b/docs/example/reports/coverage.db
@@ -1 +1 @@
-/home/druid/dev/phing/trunk/docs/example/src/helloworld.php=a:2:{s:8:"fullname";s:59:"/home/druid/dev/phing/trunk/docs/example/src/HelloWorld.php";s:8:"coverage";a:7:{i:14;i:-1;i:15;i:-1;i:16;i:-2;i:17;i:-1;i:18;i:-2;i:22;i:1;i:23;i:-2;}}
+/home/druid/dev/phing/trunk/docs/example/src/helloworld.php=a:2:{s:8:"fullname";s:59:"/home/druid/dev/phing/trunk/docs/example/src/HelloWorld.php";s:8:"coverage";a:0:{}}
diff --git a/docs/example/reports/coverage/hello/world/HelloWorld.html b/docs/example/reports/coverage/hello/world/HelloWorld.html
index 0d2b712..6d6d496 100644
--- a/docs/example/reports/coverage/hello/world/HelloWorld.html
+++ b/docs/example/reports/coverage/hello/world/HelloWorld.html
@@ -175,7 +175,7 @@
</table>
<br><table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/coverage/hello/world/package-summary.html b/docs/example/reports/coverage/hello/world/package-summary.html
index 108160d..4a084d3 100644
--- a/docs/example/reports/coverage/hello/world/package-summary.html
+++ b/docs/example/reports/coverage/hello/world/package-summary.html
@@ -56,7 +56,7 @@
</table>
<table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/coverage/overview-summary.html b/docs/example/reports/coverage/overview-summary.html
index cf7e1d9..970226f 100644
--- a/docs/example/reports/coverage/overview-summary.html
+++ b/docs/example/reports/coverage/overview-summary.html
@@ -57,7 +57,7 @@
</table>
<table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/tests/hello/world/HelloWorldTest.html b/docs/example/reports/tests/hello/world/HelloWorldTest.html
index abfb56c..4aa538e 100644
--- a/docs/example/reports/tests/hello/world/HelloWorldTest.html
+++ b/docs/example/reports/tests/hello/world/HelloWorldTest.html
@@ -25,7 +25,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.026</td>
+<td>0.025</td>
</tr>
</table>
<h2>Tests</h2>
@@ -40,12 +40,12 @@
<td>testSayHello</td>
<td>Success</td>
<td></td>
-<td>0.026</td>
+<td>0.025</td>
</tr>
</table>
<table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/tests/hello/world/package-summary.html b/docs/example/reports/tests/hello/world/package-summary.html
index b8af82c..5258d81 100644
--- a/docs/example/reports/tests/hello/world/package-summary.html
+++ b/docs/example/reports/tests/hello/world/package-summary.html
@@ -25,12 +25,12 @@
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.026</td>
+<td>0.025</td>
</tr>
</table></p>
<table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/tests/overview-summary.html b/docs/example/reports/tests/overview-summary.html
index d639be4..bfc890f 100644
--- a/docs/example/reports/tests/overview-summary.html
+++ b/docs/example/reports/tests/overview-summary.html
@@ -25,7 +25,7 @@
<td>0</td>
<td>0</td>
<td>100.00%</td>
-<td>0.026</td>
+<td>0.025</td>
</tr>
</table>
<table border="0" width="95%"><tr><td style="text-align: justify;">
@@ -45,12 +45,12 @@
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.026</td>
+<td>0.025</td>
</tr>
</table>
<table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-06-29T17:08:21+02:00</td></tr>
+<tr><td class="small">Report generated at 2010-11-23T21:36:07+01:00</td></tr>
</table>
</body>
</html>
diff --git a/docs/example/reports/testsuites.xml b/docs/example/reports/testsuites.xml
index 8115248..e69de29 100644
--- a/docs/example/reports/testsuites.xml
+++ b/docs/example/reports/testsuites.xml
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<testsuites>
- <testsuite name="Phing Batchtest" tests="1" assertions="1" failures="0" errors="0" time="0.026455">
- <testsuite name="HelloWorldTest" file="/home/druid/dev/phing/trunk/docs/example/src/HelloWorldTest.php" fullPackage="hello.world" package="hello.world" tests="1" assertions="1" failures="0" errors="0" time="0.026455">
- <testcase name="testSayHello" class="HelloWorldTest" file="/home/druid/dev/phing/trunk/docs/example/src/HelloWorldTest.php" line="15" assertions="1" time="0.026455"/>
- </testsuite>
- </testsuite>
-</testsuites>
diff --git a/docs/example/src/HelloWorld.php b/docs/example/src/HelloWorld.php
old mode 100755
new mode 100644
diff --git a/docs/example/src/HelloWorldTest.php b/docs/example/src/HelloWorldTest.php
old mode 100755
new mode 100644
diff --git a/docs/phing_guide/book/chapters/Bibliography.html b/docs/phing_guide/book/chapters/Bibliography.html
index 3b9b871..8aa3941 100644
--- a/docs/phing_guide/book/chapters/Bibliography.html
+++ b/docs/phing_guide/book/chapters/Bibliography.html
@@ -1,5 +1,5 @@
<!--
--File $Id: Bibliography.html 711 2010-02-02 08:53:27Z mrook $
+-File $Id: Bibliography.html 841 2010-08-30 22:00:04Z mrook $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -192,19 +192,11 @@
<h2><a name="Manuals"></a>Manuals</h2>
<dl>
- <dt><a name="cvs-howto"></a>[cvs-howto]</dt>
+ <dt><a name="cvs-howto"></a>[svn-howto]</dt>
<dd>
- <p>Short manuals for CVS</p>
+ <p>Version Control with Subversion (free book)</p>
<ul>
- <li><a href="http://www.ucolick.org/~de/CVSbeginner.html" target="_blank">http://www.ucolick.org/~de/CVSbeginner.html</a></li>
- </ul>
- </dd>
-
- <dt><a name="cvs-tigris"></a>[cvs-tigris]</dt>
- <dd>
- <p>CVS and tigris.org</p>
- <ul>
- <li><a href="http://binarycloud.tigris.org/project/www/docs/ddUsingCVS_command-line.html" target="_blank">http://binarycloud.tigris.org/project/www/docs/ddUsingCVS_command-line.html</a></li>
+ <li><a href="http://svnbook.red-bean.com/" target="_blank">http://svnbook.red-bean.com/</a></li>
</ul>
</dd>
</dl>
diff --git a/docs/phing_guide/book/chapters/ExtendingPhing.html b/docs/phing_guide/book/chapters/ExtendingPhing.html
index 2560a21..4244f50 100644
--- a/docs/phing_guide/book/chapters/ExtendingPhing.html
+++ b/docs/phing_guide/book/chapters/ExtendingPhing.html
@@ -1,814 +1,814 @@
-<!--
--File $Id: ExtendingPhing.html 593 2009-10-07 08:40:52Z johan162 $
--License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
--Copyright 2002, turing
--Author alex black, enigma at turingstudio.com
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Phing Guide - Extending Phing</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link rel="Stylesheet" rev="Stylesheet" href="../css/Documentation.css" type="text/css" media="All" charset="iso-8859-1" />
-</head>
-<body>
-
-<h1><a name="ExtendingPhing"></a>Extending Phing</h1>
-
-<p>Phing was designed to be flexible and easily extensible. Phing's existing core
- and optional tasks do provide a great deal of flexibility in processing files,
- performing database actions, and even getting user feedback during a build process.
- In some cases, however, the existing tasks just won't suffice and because of
- Phing's open, modular architecture adding exactly the functionality you need
- is often quite trivial.</p>
-<p>In this chapter we'll look primarily at how to create your own tasks, since
- that is probably the most useful way to extend Phing. We'll also give some more
- information about Phing's design and inner workings.</p>
-<h2><a name="ExtensionPossibilities"></a>Extension Possibilities</h2>
-
-<p>There are three main areas where Phing can be extended: <a href="#Tasks">tasks</a>,
- <a href="#Types">types</a>, <a href="#Mappers">mappers</a>. The following sections
- discuss these options.</p>
-
-<h3><a name="Tasks"></a>Tasks</h3>
-
-<p> Tasks are pieces of codes that perform an atomic action like installing a
- file. Therefore a special worker class hast to be created and stored in a specific
- location, that actually implements the job. The worker is just the interface
- to Phing that must fulfill some requirements discussed later in this chapter,
- however it can - but not necessarily must - use other classes, workers and libraries
- that aid performing the operations needed. </p>
-
-<h3><a name="Types"></a>Types</h3>
-
-<p> Extending types is a rare need; nevertheless, you can do it. A possible type
- you might implement is <em>urlset</em>, for example.</p>
-<p>You may end up needing a new type for a task you write; for example, if you
- were writing the XSLTTask you might discover that you needed a special type
- for XSLTParams (even though in that case you could probably use the generic
- name/value Parameter type). In cases where the type is really only for a single
- task, you may want to just define the type class in the same file as the Task
- class, rather than creating an official stand-alone <em>Type</em>.</p>
-
-<h3><a name="Mappers"></a>Mappers</h3>
-
-<p> Creating new mappers is also a rare need, since most everything can be handled
- by the <a href="appendixes/appendixc-coretypes.html#regexpmapper">RegexpMapper</a>.
- The Mapper framework does provide a simple way for defining your own mappers
- to use instead, however, and mappers implement a very simple interface.</p>
-
-<h2><a name="SourceLayout"></a>Source Layout</h2>
-
-<h3><a name="FilesandDirectories"></a>Files And Directories</h3>
-
-<p> Before you are going to start to extend Phing let's have a look at the source
- layout. You should be comfortable with the organization of files witchin the
- source tree of Phing before start coding. After you extracted the source distribution
- or checked it out from CVS you should see the following directory structure:</p>
-
-<pre title="DistributionFileLayout">$PHING_HOME
- |-- bin
- |-- classes
- | `-- phing
- | |-- filters
- | | `-- util
- | |-- mappers
- | |-- parser
- | |-- tasks
- | | |-- ext
- | | |-- system
- | | | `-- condition
- | | `-- user
- | `-- types
- |-- docs
- | `-- phing_guide
- `-- test
- |-- classes
- `-- etc
-</pre>
-<p>
-The following table briefly describes the contents of the major
-directories:
-</p>
-
-<a name="tables.PhingSourceTreeDirectories"></a>
-<table>
- <caption>Phing source tree directories</caption>
- <thead>
- <tr>
- <th>Directory</th>
- <th>Contents</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><p>bin</p></td>
- <td>
- <p>The basic applications (phing, configure) as well as the wrapper scripts
- for different platforms (currently Unix and Windows).</p>
- </td>
- </tr>
- <tr>
- <td><p>classes</p></td>
- <td><p>Repository of all the classes used by Phing. This is the base directory
- that should be on the PHP include_path. In this directory you will find
- the subdirectory phing/ with all the Phing relevant classes.</p></td>
- </tr>
- <tr>
- <td><p>docs</p></td>
- <td>
- <p>Documentation files. Generated books, online manuals as well as
- the PHPDoc generated API documentation.</p>
- </td>
- </tr>
- <tr>
- <td><p>test</p></td>
- <td>
- <p>A set of testcases for different tasks, mappers and types. If
- you are developing in CVS you should add a testcase for each
- implementation you check in.</p>
- </td>
- </tr>
- </tbody>
-</table>
-
-<p>Currently there is no distinction between the <em>source</em> layout and the
- <em>build</em> layout of Phing. The <a href="#figures.MainDirLayout">figure
- above</a> shows the CVS tree that carries some additional files like the Phing
- website. Later on there may be a buildfile to create a clean distribution tree
- of Phing itself. </p>
-
-<h3><a name="FileNamingConventions"></a>File Naming Conventions</h3>
-
-<p> There are some filenaming conventions used by Phing. Here's a quick rundown
- on the most basic conventions. A more detailed list can be found in [See Naming
- And Coding Standards]: </p>
-
-<ul>
- <li>Filenames consist of no more or less than two elements: <em>name</em> and
- <em>extension</em> .</li>
- <li>Choose short descriptive filenames (must be less than 31 chars)</li>
- <li>Names must not contain dots.</li>
- <li>Files containing PHP code must end with the extension <em>.php</em> .</li>
- <li>There must be only one class per file (no procedural methods allowed, use
- a separate file for them), with the exception of "inner"-type /
- helper classes that can be declared in the same file as the "outer"
- / main class.</li>
- <li>The name portion of the file must be named exactly like the class it contains.</li>
- <li>Buildfiles and configure rulesets must end with the extension <em>.xml</em>
- .</li>
-</ul>
-
-<h3><a name="CodingStandards"></a>Coding Standards</h3>
-
-<p> We are using PEAR coding standards. We are using a less strict version of
- these standards, but we do insist that new contributions have phpdoc comments
- and make explicitly declarations about public/protected/private variables and
- methods. If you have suggestions about improvements to Phing codebase, don't
- hesitate to let us know.</p>
-
-<h2><a name="SystemInitialization"></a>System Initialization</h2>
-
-<p> PHP installations are typically quite customized -- e.g. different memory_limit,
- execution timeout values, etc. The first thing that Phing does is modify PHP
- INI variables to create a standard PHP environment. This is performed by the
- <em>init layer</em> of Phing that uses a three-level initialization procedure.
- It basically consists of three different files: </p>
-
-<ul>
- <li>Platform specific wrapper scripts in bin/</li>
- <li>Main application in bin/</li>
- <li>Phing class in classes/phing/</li>
-</ul>
-
-<p> At the first look this may seem to be unnecessary overhead. Why three levels
- of initialization? The main reason why there are several entry points is that
- Phing is build so that other frontends (e.g. PHP-GTK) could be used in place
- of the command line.</p>
-
-<h3><a name="WrapperScripts"></a>Wrapper Scripts</h3>
-
-<p> This scripts are technical not required but provided for the ease of use.
- Imagine you have to type every time you want to build your project: </p>
-
-<pre>php -qC /path/to/phing/bin/phing.php -verbose all distro snapshot</pre>
-
-<p>
-Indeed that is not very elegant. Furthermore if you are lax in
-setting your environment variables these script can guess the
-proper variables for you. However you should always set them.
-</p>
-
-<p> The scripts are platform dependent, so you will find shell scripts for <em>Unix</em>
- like platforms (sh) as well as the batch scripts for <em>Windows</em> platforms.
- If you set-up your path properly you can call Phing everywhere in your system
- with this command-line (referring to the above example): </p>
-
-<pre>phing -v2 all distro</pre>
-
-<h3><a name="MainApplication"></a>The Main Application (phing.php)</h3>
-
-<p> This is basically a wrapper for the Phing class that actually does all the
- logic for you. If you look at the sourcecode for phing.php you will see that
- all real initialization is handled in the Phing class. phing.php is simply the
- commandline entry point for Phing.</p>
-
-<h3><a name="InitClass"></a>The Phing Class</h3>
-
-<p> Given that all the prior initialization steps passed successfully the Phing
- is included and <em>Phing::startup()</em> is invoked by the main application
- script. It sets-up the system components, system constants ini-settings, PEAR
- and some other stuff. The detailed start-up process is as follows: </p>
-
-<ul>
- <li>Start Timer</li>
- <li>Set System Constants</li>
- <li>Set Ini-Settings</li>
- <li>Set Include Paths</li>
-</ul>
-
-<p> After the main application completed all operations (successfully or unsuccessfully)
- it calls <em>Phing::shutdown(EXIT_CODE)</em> that takes care of a proper destruction
- of all objects and a gracefully termination of the program by returning an <em>exit
- code</em> for shell usage (see [See Program Exit Codes] for a list of exit codes).
-</p>
-
-<h2><a name="SystemServices"></a>System Services</h2>
-
-<h3><a name="ExceptionSystem"></a>The Exception system</h3>
-<p>Phing uses the PHP5 try/catch/throw Exception system. Phing defines a number
- of Exception subclasses for more fine-grained handling of Exceptions. Low level
- Exceptions that cannot be handled will be wrapped in a BuildException and caught
- by the outer-most catch() {} block.</p>
-
-<h2><a name="BuildLifecycle"></a>Build Lifecycle</h2>
-<p>This section exists to explain -- or try -- how Phing "works". Particularly,
- how Phing procedes through a build file and invokes tasks and types based on
- the tags that it encounters.</p>
-<h3><a name=""></a>How Phing Parses Buildfiles</h3>
-<p>Phing uses an ExpatParser class and PHP's native expat XML functions to handle
- the parsing of build files. The handler classes all extend the phing.parser.AbstractHandler
- class. These handler classes "handle" the tags that are found in the
- buildfile.</p>
-<p>Core tasks and datatypes are mapped to XML tag names in the defaults.properties
- files -- specifically phing/tasks/defaults.properties and phing/types/defaults.properties.</p>
-<p>It works roughly like this:</p>
-<ol>
- <li>phing.parser.RootHandler is registered to handle the buildfile XML document</li>
- <li>RootHanlder expects to find exactly one element: <project>. RootHandler
- invokes the ProjectHandler with the attributes from the <project> tag
- or throws an exception if no <project> is found, or if something else
- is found instead.</li>
- <li>ProjectHandler expects to find <target> tags; for these ProjectHandler
- invokes the TargetHandler. ProjectHandler also has exceptions for handling
- certain tasks that can be performed at the top-level: <resolve>, <taskdef>,
- <typedef>, and <property>; for these ProjectHandler invokes the
- TaskHandler class. If a tag is presented that doesn't match any expected tags,
- then ProjectHandler assumes it is a datatype and invokes the DataTypeHandler.</li>
- <li>TargetHandler expects all tags to be either tasks or datatypes and invokes
- the appropriate handler (based on the mappings provided in the defaults.properties
- files).</li>
- <li>Tasks and datatypes can have nested elements, but only if they correspond
- to a create*() method in the task or datatype class. E.g. a nested <param>
- tag must correspond to a createParam() method of the task or datatype.</li>
-</ol>
-<p><em>... More to come ...</em></p>
-<h2><a name="WritingTasks"></a>Writing Tasks</h2>
-
-<h3><a name="CreatingATask"></a>Creating A Task</h3>
-
-<p> We will start creating a rather simple task which basically does nothing more
- than echo a message to the screen. See [below] for the source code and the following
- [below] for the XML definition that is used for this task. </p>
-
-<a href="codelistings.MyEchoTask"></a>
-<pre title="Source code of a simple task that echos a message to the screen">
-<?php
-
-require_once "phing/Task.php";
-
-class MyEchoTask extends Task {
-
- /**
- * The message passed in the buildfile.
- */
- private $message = null;
-
- /**
- * The setter for the attribute "message"
- */
- public function setMessage($str) {
- $this->message = $str;
- }
-
- /**
- * The init method: Do init steps.
- */
- public function init() {
- // nothing to do here
- }
-
- /**
- * The main entry point method.
- */
- public function main() {
- print($this->message);
- }
-}
-
-?>
-</pre>
-
-<p> This code contains a rather simple, but complete Phing task. It is assumed
- that the file is named <em>MyEchoTask.php</em> and placed in <em>classes/phing/tasks/my</em>
- directory. We'll explain the source code in detail shortly. But first we'd like
- to discuss how we should register the task to Phing so that it can be executed
- during the build process. </p>
-
-<h3><a name="UsingTheTask"></a>Using the Task</h3>
-
-<p> The task shown [above] must somehow get called by Phing. Therefore it must
- be made available to Phing so that the buildfile parser is aware a correlating
- XML element and it's parameters. Have a look at the minimalistic buildfile example
- given in [the buildfile below] that does exactly this. </p>
-
-<a name="codelistings.BuildFileEchoTask"></a>
-<pre title="A simple buildfile that tests the echo task">
-<?xml version="1.0" ?>
-
-<project name="test" basedir="." default="myecho">
- <taskdef name="myecho" classname="phing.tasks.my.MyEcho" />
-
- <target name="test.myecho">
- <myecho message="Hello World" />
- </target>
-</project>
-</pre>
-
-<p> Besides the XML document prolog and the shell elements that are required to
- properly execute the task (project, target) you'll find the <em><taskdef></em>
- element (line 4) that properly registers your custom task to Phing. For a detailed
- synopsis of the taskdef element see the [description of this task]. </p>
-
-<p>
-Now, as we have registered the task by assigning a name and the
-worker class ([see source code above]) it is ready for usage within
-the <em><target></em> context (line 8). You see that we pass
-the message that our task should echo to the screen via an XML
-attribute called "message".
-</p>
-
-<h3><a name="SourceDiscussion"></a>Source Discussion</h3>
-
-<p>
-No that you've got the knowledge to execute the task in a
-buildfile it's time to discuss how everything works.
-</p>
-
-<h3><a name="TaskStructure"></a>Task Structure</h3>
-
-<p>
-All files containing the definition of a task class follow a
-common well formed structure:
-</p>
-
-<ul>
- <li>Package imports to import all required packages</li>
- <li>The class declaration and definition</li>
- <li>The class's properties</li>
- <li>The class's constructor</li>
- <li>Setter methods for each XML attribute</li>
- <li>The <em>init()</em> method</li>
- <li>The <em>main()</em> method</li>
- <li>Arbitrary <em>private</em> (or <em>protected</em>)<em> </em>class methods</li>
-</ul>
-
-<h3><a name="PackageImports"></a>Package Imports</h3>
-
-<p> Always import all the packages/files needed for this task in full written
- notation. Furthermore you should always import <em>phing.Task</em> at the very
- top of your <em>import</em> block. Then import all other required system or
- proprietary packages. Import works quite similar to PHP's native <em>include_once</em>
- but with some Java-stylish additions providing a file system independent notation.
-</p>
-
-<p>
-For a more in-depth explanation of the used package mechanism
-and the package support API reference, see [package support]
-For a list of stock packages provided with Phing, see
-[package list].
-</p>
-
-<h3><a name="ClassDeclaration"></a>Class Declaration</h3>
-
-<p>
-If you look at line 5 in [the source code of the task] you will find
-the <em>class declaration</em>. This will be familiar to you if
-you are experienced with OOP in PHP (we assume here that you are).
-Furthermore there are some fine-grained rules you must obey when
-creating the classes (see also,[naming and coding standards]):
-</p>
-
-<ul>
- <li>Your classname must be exactly like the taskname you are going to implement
- plus the suffix "Task". In our example case the classname is <em>MyEchoTask</em>
- (constructed by the taskname "myecho" plus the suffix "task"). The upper/lower
- case casing is currently only for better reading. However, it is encouraged
- that you use it this way.</li>
- <li>The task class you are creating must at least extend "Task" to
- inherit all task specific methods.</li>
-</ul>
-
-<h3><a name="ClassProperties"></a>Class Properties</h3>
-
-<p>
-The next lines you are coding are class properties. Most of them
-are inherited from the Task superclass, so there's not need to
-redeclare them. Nevertheless you should <em>declare</em> the
-following ones by your own:
-</p>
-
-<ul>
- <li>Taskname. Always hard code the <em>taskname</em> property that
- equals the name of the XML element that your task claims. Currently
- this information is not used - but it will be in the future.</li>
- <li>Your arbitrary properties that reflect the XML
- attributes/elements which your task accepts.</li>
-</ul>
-
-<p>
-In the MyEchoTask example the coded properties can be found in
-lines 7 to 11. Give you properties meaningful descriptive names
-that clearly state their function within the context. A couple of
-properties are inherited from the superclass that must not be
-declared in the properties part of the code.
-</p>
-
-<p>
-For a list of inherited properties (most of them are reserved,
-so be sure not to overwrite them with your own) can be found in the
-"Phing API Reference" in the docs/api/ directory.
-</p>
-
-<h3><a name="TheConstructor"></a>The Constructor</h3>
-
-<p> The next block that follows is the class's constructor. It must be present
- and call at least the constructor or the parent class. Of course, you can add
- some initialization data here. It is recommended that you <em>define</em> your
- prior declared properties here.</p>
-
-<h3><a name="SetterMethods"></a>Setter Methods</h3>
-
-<p>
-As you can see in the XML definition of our task ([see buildfile above]
-, line 9) there is an attribute defined with the
-task itself, namely "message" with a value of the the text string
-that our task should echo. The task must somehow become aware of
-the attribute name and the value. Therefore the <em>setter
-methods</em> exist.
-</p>
-
-<p>For each attribute you want to import to the task's namespace
-you have to define a method named exactly after the very attribute
-plus the string "Set" prepended. This method accepts exactly one
-parameter that holds the value of the attribute. No you can set the
-value an class internal property to the value incoming via the
-setter method.</p>
-
-<p>In out example the setter is named <em>SetMessage</em> , because the XML attribute
- the echo task accepts is "message". SetMessage now takes the string "Hello World"
- provided by the parser and sets the value of the internal class property <em>$strMessage</em>
- to "Hello World". It is now available to the task for further disposal.</p>
-
-<h3><a name="CreatorMethods"></a>Creator Methods</h3>
-
-<p> Creator methods allow you to manage nested XML tags in your new Phing Task.</p>
-
-<h3><a name="InitMethod"></a><em>init()</em> Method</h3>
-
-<p> The init method gets called when the <taskname> xml element closes.
- It must be implemented even if it does nothing like in the example above. You
- can do init steps here required to setup your task object properly. After calling
- the Init-Method the task object remains untouched by the parser. Init should
- not perform operations related somehow to the action the task performs. An example
- of using init may be cleaning up the $strMessage variable in our example (i.e.
- trim($strMessage)) or importing additional workers needed for this task. </p>
-
-<p>
-The init method should return true or an error object evaluated
-by the governing logic. If you don't implement init method, phing
-will shout down with a fatal error.
-</p>
-
-<h3><a name="MainMethod"></a><em>main()</em> Method</h3>
-
-<p> There is exactly one entry entry point to execute the task. It is called after
- the complete buildfile has been parsed and all targets and tasks have been scheduled
- for execution. From this point forward the very implementation of the tasks
- action starts. In case of our example a message (imported by the proper setter
- method) is Logged to the screen through the system's "Logger" service (the very
- action this task is written for). The <em>Log()</em> method-call in this case
- accepts two parameters: a event constant and the message to log. </p>
-
-<p>
-For a in-depth list of system constants see <a
-href="../document/appendix/AppB.htm#95990">See System
-Constants</a>. For the detailed reference on the system's logger
-see [REF] and the Phing API docs located in the docs/
-subdirectory.
-</p>
-
-<h3><a name="ArbitraryMethods"></a>Arbitrary Methods</h3>
-
-<p> For the more or less simple cases (as our example) all the logic of the task
- is coded in the Main() method. However for more complex tasks common sense dictates
- that particular action should be swapped to smaller, logically contained units
- of code. The most common way to do this is separating logic into private class
- methods - and in even more complex tasks in separate libraries. </p>
-
-<pre>private function myPrivateMethod() {
- // definition
-}
-</pre>
-
-<p>
-More reading on this particular topic can be sound in See Naming
-And Coding Standards.
-</p>
-
-<h3><a name="Summary"></a>Summary</h3>
-
-<p>
-You now have learned how to create and use a task. However we
-guess there are much questions open concerning task development:
-"How do I use filesets and mapper" or "How do I implement custom
-nested tags in my task". Most of these concepts and the proper
-usage will be clear if you continue reading this doc. Additionally
-you might check out the appendices for the advanced examples (See
-Advanced Task Example).
-</p>
-
-<h2><a name="WritingTypes"></a>Writing Types</h2>
-
-<p>You should only create a standalone Type if the Type needs to be shared by
- more than one Task. If the Type is only needed for a specific Task -- for example
- to handle a special parameter or other tag needed for that Task -- then the
- Type class should just be defined within the same file as the Task. (For example,
- <em>phing/filters/XSLTFilter.php</em> also includes an XSLTParam class that
- is not used anywhere else.)</p>
-<p>For cases where you do need a more generic Type defined, you can create your
- own Type class -- similar to the way a Task is created [<a href="#WritingTasks">Writing
- Tasks </a>].</p>
-<h3>Creating a DataType</h3>
-<p>Type classes need to extend the abstract DataType class. Besides providing
- a means of categorizing types, the DataType class provides the methods necessary
- to support the "refid" attribute. (All types can be given an id, and
- can be referred to later using that id.)</p>
-<p>In this example we are creating a DSN type because we have written a number
- of DB-related Tasks, each of which need to know how to connect to the database;
- instead of having database parameters for each task, we've created a DSN type
- so that we can identify the connection params once and then use it in all our
- db Tasks.</p>
-<pre title="example Type">require_once "phing/types/DataType.php";
-
-/**
- * This Type represents a DB Connection.
- */
-class DSN extends DataType {
-
- private $url;
- private $username;
- private $password;
- private $persistent = false;
-
- /**
- * Sets the URL part: mysql://localhost/mydatabase
- */
- public function setUrl($url) {
- $this->url = $url;
- }
-
- /**
- * Sets username to use in connection.
- */
- public function setUsername($username) {
- $this->username = $username;
- }
-
- /**
- * Sets password to use in connection.
- */
- public function setPassword($password) {
- $this->password = $password;
- }
-
- /**
- * Set whether to use persistent connection.
- * @param boolean $persist
- */
- public function setPersistent($persist) {
- $this->persistent = (boolean) $persist;
- }
-
- public function getUrl(Project $p) {
- if ($this->isReference()) {
- return $this->getRef($p)->getUrl($p);
- }
- return $this->url;
- }
-
- public function getUsername(Project $p) {
- if ($this->isReference()) {
- return $this->getRef($p)->getUsername($p);
- }
- return $this->username;
- }
-
- public function getPassword(Project $p) {
- if ($this->isReference()) {
- return $this->getRef($p)->getPassword($p);
- }
- return $this->password;
- }
-
- public function getPersistent(Project $p) {
- if ($this->isReference()) {
- return $this->getRef($p)->getPersistent($p);
- }
- return $this->persistent;
- }
-
- /**
- * Gets a combined hash/array for DSN as used by PEAR.
- * @return array
- */
- public function getPEARDSN(Project $p) {
- if ($this->isReference()) {
- return $this->getRef($p)->getPEARDSN($p);
- }
-
- include_once 'DB.php';
- $dsninfo = DB::parseDSN($this->url);
- $dsninfo['username'] = $this->username;
- $dsninfo['password'] = $this->password;
- $dsninfo['persistent'] = $this->persistent;
-
- return $dsninfo;
- }
-
- /**
- * Your datatype must implement this function, which ensures that there
- * are no circular references and that the reference is of the correct
- * type (DSN in this example).
- *
- * @return DSN
- */
- public function getRef(Project $p) {
- if ( !$this->checked ) {
- $stk = array();
- array_push($stk, $this);
- $this->dieOnCircularReference($stk, $p);
- }
- $o = $this->ref->getReferencedObject($p);
- if ( !($o instanceof DSN) ) {
- throw new BuildException($this->ref->getRefId()." doesn't denote a DSN");
- } else {
- return $o;
- }
- }
-
-}</pre>
-<h3><a name="UsingType"></a>Using the DataType</h3>
-<p>The <em>TypedefTask</em> provides a way to "declare" your type so
- that you can use it in your build file. Here is how you would use this type
- in order to define a single DSN and use it for multiple tasks. (Of course you
- could specify the DSN connection params each time, but the premise behind needing
- a DSN datatype was to avoid specifying the connection parameters for each task.)</p>
-<a name="codelistings.DSN"></a>
-<pre title="A simple buildfile that tests the echo task">
-<?xml version="1.0" ?>
-
-<project name="test" basedir=".">
-
- <typedef name="dsn" classname="myapp.types.DSN" />
-
- <dsn
- id="maindsn"
- url="mysql://localhost/mydatabase"
- username="root"
- password=""
- persistent="false" />
-
- <target name="main">
-
- <my-special-db-task>
- <dsn refid="maindsn"/>
- </my-special-db-task>
-
- <my-other-db-task>
- <dsn refid="maindsn"/>
- </my-other-db-task>
-
- </target>
-
-</project>
-</pre>
-
-<h3><a name="TypeSourceDisc"></a>Source Discussion</h3>
-<h4>Getters & Setters</h4>
-<p>You must provide a setter method for every attribute you want to set from the
- XML build file. It is good practice to also provide a getter method, but in
- practice you can decide how your tasks will use your task. In the example above,
- we've provided a getter method for each attribute and we've also provided an
- additional method: DSN::getPEARDSN() which returns the DSN hash array used by
- PEAR::DB, PEAR::MDB, and Creole. Depending on the needs of the Tasks using this
- DataType, we may only wish to provide the getPEARDSN() method rather than a
- getter for each attribute.</p>
-<p> Also important to note is that the getter method needs to check to see whether
- the current DataType is a reference to a previously defined DataType -- the
- DataType::isReference() exists for this purpose. For this reason, the getter
- methods need to be called with the current project, because References are stored
- relative to a project.</p>
-<h4>The getRef() Method</h4>
-<p>The getRef() task needs to be implemented in your Type. This method is responsible
- for returning a referenced object; it needs to check to make sure the referenced
- object is of the correct type (i.e. you can't try to refer to a RegularExpresson
- from a DSN DataType) and that the reference is not circular. </p>
-<p>You can probably just copy this method from an existing Type and make the few
- changes that customize it to your Type.</p>
-<h2><a name="WritingMappers"></a>Writing Mappers</h2>
-<p>Writing your own filename mapper classes will allow you to control how names
- are transformed in tasks like CopyTask, MoveTask, XSLTTask, etc. In some cases
- you may want to extend existing mappers (e.g. creating a GlobMapper that also
- transforms to uppercase); in other cases, you may simply want to create a very
- specific name transformation that isn't easily accomplished with other mappers
- like GlobMapper or RegexpMapper.</p>
-<h3><a name="CreatingMapper"></a>Creating a Mapper</h3>
-<p>Writing filename mappers is simplified by interface support in PHP5. Essentially,
- your custom filename mapper must implement <em>phing.mappers.FileNameMapper</em>.
- Here's an example of a filename mapper that creates DOS-style file names. For
- this example, the "to" and "from" attributes are not needed
- because all files will be transformed. To see the "to" and "from"
- attributes in action, look at <em>phing.mappers.GlobMapper</em> or <em>phing.mappers.RegexpMapper</em>.
-</p>
-<pre title="sample mapper">require_once "phing/mappers/FileNameMapper.php";
-
-/**
- * A mapper that makes those ugly DOS filenames.
- */
-class DOSMapper implements FileNameMapper {
-
- /**
- * The main() method actually performs the mapping.
- *
- * In this case we transform the $sourceFilename into
- * a DOS-compatible name. E.g.
- * ExtendingPhing.html -> EXTENDI~.DOC
- *
- * @param string $sourceFilename The name to be coverted.
- * @return array The matched filenames.
- */
- public function main($sourceFilename) {
-
- $info = pathinfo($sourceFilename);
- $ext = $info['extension'];
- // get basename w/o extension
- $bname = preg_replace('/\.\w+\$/', '', $info['basename']);
-
- if (strlen($bname) > 8) {
- $bname = substr($bname,0,7) . '~';
- }
-
- if (strlen($ext) > 3) {
- $ext = substr($bname,0,3);
- }
-
- if (!empty($ext)) {
- $res = $bname . '.' . $ext;
- } else {
- $res = $bname;
- }
-
- return (array) strtoupper($res);
- }
-
- /**
- * The "from" attribute is not needed here, but method must exist.
- */
- public function setFrom($from) {}
-
- /**
- * The "from" attribute is not needed here, but method must exist.
- */
- public function setTo($to) {}
-
-}
-</pre>
-<h3><a name="UsingMapper"></a>Using the Mapper</h3>
-<p>Assuming that this mapper is saved to <em>myapp/mappers/DOSMapper.php </em>(relative
- to a path on PHP's <em>include_path</em> or in <em>PHP_CLASSPATH</em> env variable),
- then you would refer to it like this in your build file:</p>
-<pre title="using example mapper in build file"><mapper classname="myapp.mappers.DOSMapper"/></pre>
-
-</body>
-</html>
+<!--
+-File $Id: ExtendingPhing.html 1048 2011-03-02 19:00:24Z mrook $
+-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
+-Copyright 2002, turing
+-Author alex black, enigma at turingstudio.com
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Phing Guide - Extending Phing</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="Stylesheet" rev="Stylesheet" href="../css/Documentation.css" type="text/css" media="All" charset="iso-8859-1" />
+</head>
+<body>
+
+<h1><a name="ExtendingPhing"></a>Extending Phing</h1>
+
+<p>Phing was designed to be flexible and easily extensible. Phing's existing core
+ and optional tasks do provide a great deal of flexibility in processing files,
+ performing database actions, and even getting user feedback during a build process.
+ In some cases, however, the existing tasks just won't suffice and because of
+ Phing's open, modular architecture adding exactly the functionality you need
+ is often quite trivial.</p>
+<p>In this chapter we'll look primarily at how to create your own tasks, since
+ that is probably the most useful way to extend Phing. We'll also give some more
+ information about Phing's design and inner workings.</p>
+<h2><a name="ExtensionPossibilities"></a>Extension Possibilities</h2>
+
+<p>There are three main areas where Phing can be extended: <a href="#Tasks">tasks</a>,
+ <a href="#Types">types</a>, <a href="#Mappers">mappers</a>. The following sections
+ discuss these options.</p>
+
+<h3><a name="Tasks"></a>Tasks</h3>
+
+<p> Tasks are pieces of codes that perform an atomic action like installing a
+ file. Therefore a special worker class hast to be created and stored in a specific
+ location, that actually implements the job. The worker is just the interface
+ to Phing that must fulfill some requirements discussed later in this chapter,
+ however it can - but not necessarily must - use other classes, workers and libraries
+ that aid performing the operations needed. </p>
+
+<h3><a name="Types"></a>Types</h3>
+
+<p> Extending types is a rare need; nevertheless, you can do it. A possible type
+ you might implement is <em>urlset</em>, for example.</p>
+<p>You may end up needing a new type for a task you write; for example, if you
+ were writing the XSLTTask you might discover that you needed a special type
+ for XSLTParams (even though in that case you could probably use the generic
+ name/value Parameter type). In cases where the type is really only for a single
+ task, you may want to just define the type class in the same file as the Task
+ class, rather than creating an official stand-alone <em>Type</em>.</p>
+
+<h3><a name="Mappers"></a>Mappers</h3>
+
+<p> Creating new mappers is also a rare need, since most everything can be handled
+ by the <a href="appendixes/appendixc-coretypes.html#regexpmapper">RegexpMapper</a>.
+ The Mapper framework does provide a simple way for defining your own mappers
+ to use instead, however, and mappers implement a very simple interface.</p>
+
+<h2><a name="SourceLayout"></a>Source Layout</h2>
+
+<h3><a name="FilesandDirectories"></a>Files And Directories</h3>
+
+<p> Before you are going to start to extend Phing let's have a look at the source
+ layout. You should be comfortable with the organization of files witchin the
+ source tree of Phing before start coding. After you extracted the source distribution
+ or checked it out from CVS you should see the following directory structure:</p>
+
+<pre title="DistributionFileLayout">$PHING_HOME
+ |-- bin
+ |-- classes
+ | `-- phing
+ | |-- filters
+ | | `-- util
+ | |-- mappers
+ | |-- parser
+ | |-- tasks
+ | | |-- ext
+ | | |-- system
+ | | | `-- condition
+ | | `-- user
+ | `-- types
+ |-- docs
+ | `-- phing_guide
+ `-- test
+ |-- classes
+ `-- etc
+</pre>
+<p>
+The following table briefly describes the contents of the major
+directories:
+</p>
+
+<a name="tables.PhingSourceTreeDirectories"></a>
+<table>
+ <caption>Phing source tree directories</caption>
+ <thead>
+ <tr>
+ <th>Directory</th>
+ <th>Contents</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><p>bin</p></td>
+ <td>
+ <p>The basic applications (phing, configure) as well as the wrapper scripts
+ for different platforms (currently Unix and Windows).</p>
+ </td>
+ </tr>
+ <tr>
+ <td><p>classes</p></td>
+ <td><p>Repository of all the classes used by Phing. This is the base directory
+ that should be on the PHP include_path. In this directory you will find
+ the subdirectory phing/ with all the Phing relevant classes.</p></td>
+ </tr>
+ <tr>
+ <td><p>docs</p></td>
+ <td>
+ <p>Documentation files. Generated books, online manuals as well as
+ the PHPDoc generated API documentation.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><p>test</p></td>
+ <td>
+ <p>A set of testcases for different tasks, mappers and types. If
+ you are developing in CVS you should add a testcase for each
+ implementation you check in.</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p>Currently there is no distinction between the <em>source</em> layout and the
+ <em>build</em> layout of Phing. The <a href="#figures.MainDirLayout">figure
+ above</a> shows the CVS tree that carries some additional files like the Phing
+ website. Later on there may be a buildfile to create a clean distribution tree
+ of Phing itself. </p>
+
+<h3><a name="FileNamingConventions"></a>File Naming Conventions</h3>
+
+<p> There are some filenaming conventions used by Phing. Here's a quick rundown
+ on the most basic conventions. A more detailed list can be found in [See Naming
+ And Coding Standards]: </p>
+
+<ul>
+ <li>Filenames consist of no more or less than two elements: <em>name</em> and
+ <em>extension</em> .</li>
+ <li>Choose short descriptive filenames (must be less than 31 chars)</li>
+ <li>Names must not contain dots.</li>
+ <li>Files containing PHP code must end with the extension <em>.php</em> .</li>
+ <li>There must be only one class per file (no procedural methods allowed, use
+ a separate file for them), with the exception of "inner"-type /
+ helper classes that can be declared in the same file as the "outer"
+ / main class.</li>
+ <li>The name portion of the file must be named exactly like the class it contains.</li>
+ <li>Buildfiles and configure rulesets must end with the extension <em>.xml</em>
+ .</li>
+</ul>
+
+<h3><a name="CodingStandards"></a>Coding Standards</h3>
+
+<p> We are using PEAR coding standards. We are using a less strict version of
+ these standards, but we do insist that new contributions have phpdoc comments
+ and make explicitly declarations about public/protected/private variables and
+ methods. If you have suggestions about improvements to Phing codebase, don't
+ hesitate to let us know.</p>
+
+<h2><a name="SystemInitialization"></a>System Initialization</h2>
+
+<p> PHP installations are typically quite customized -- e.g. different memory_limit,
+ execution timeout values, etc. The first thing that Phing does is modify PHP
+ INI variables to create a standard PHP environment. This is performed by the
+ <em>init layer</em> of Phing that uses a three-level initialization procedure.
+ It basically consists of three different files: </p>
+
+<ul>
+ <li>Platform specific wrapper scripts in bin/</li>
+ <li>Main application in bin/</li>
+ <li>Phing class in classes/phing/</li>
+</ul>
+
+<p> At the first look this may seem to be unnecessary overhead. Why three levels
+ of initialization? The main reason why there are several entry points is that
+ Phing is build so that other frontends (e.g. PHP-GTK) could be used in place
+ of the command line.</p>
+
+<h3><a name="WrapperScripts"></a>Wrapper Scripts</h3>
+
+<p> This scripts are technical not required but provided for the ease of use.
+ Imagine you have to type every time you want to build your project: </p>
+
+<pre>php -qC /path/to/phing/bin/phing.php -verbose all distro snapshot</pre>
+
+<p>
+Indeed that is not very elegant. Furthermore if you are lax in
+setting your environment variables these script can guess the
+proper variables for you. However you should always set them.
+</p>
+
+<p> The scripts are platform dependent, so you will find shell scripts for <em>Unix</em>
+ like platforms (sh) as well as the batch scripts for <em>Windows</em> platforms.
+ If you set-up your path properly you can call Phing everywhere in your system
+ with this command-line (referring to the above example): </p>
+
+<pre>phing -v2 all distro</pre>
+
+<h3><a name="MainApplication"></a>The Main Application (phing.php)</h3>
+
+<p> This is basically a wrapper for the Phing class that actually does all the
+ logic for you. If you look at the sourcecode for phing.php you will see that
+ all real initialization is handled in the Phing class. phing.php is simply the
+ commandline entry point for Phing.</p>
+
+<h3><a name="InitClass"></a>The Phing Class</h3>
+
+<p> Given that all the prior initialization steps passed successfully the Phing
+ is included and <em>Phing::startup()</em> is invoked by the main application
+ script. It sets-up the system components, system constants ini-settings, PEAR
+ and some other stuff. The detailed start-up process is as follows: </p>
+
+<ul>
+ <li>Start Timer</li>
+ <li>Set System Constants</li>
+ <li>Set Ini-Settings</li>
+ <li>Set Include Paths</li>
+</ul>
+
+<p> After the main application completed all operations (successfully or unsuccessfully)
+ it calls <em>Phing::shutdown(EXIT_CODE)</em> that takes care of a proper destruction
+ of all objects and a gracefully termination of the program by returning an <em>exit
+ code</em> for shell usage (see [See Program Exit Codes] for a list of exit codes).
+</p>
+
+<h2><a name="SystemServices"></a>System Services</h2>
+
+<h3><a name="ExceptionSystem"></a>The Exception system</h3>
+<p>Phing uses the PHP5 try/catch/throw Exception system. Phing defines a number
+ of Exception subclasses for more fine-grained handling of Exceptions. Low level
+ Exceptions that cannot be handled will be wrapped in a BuildException and caught
+ by the outer-most catch() {} block.</p>
+
+<h2><a name="BuildLifecycle"></a>Build Lifecycle</h2>
+<p>This section exists to explain -- or try -- how Phing "works". Particularly,
+ how Phing procedes through a build file and invokes tasks and types based on
+ the tags that it encounters.</p>
+<h3><a name=""></a>How Phing Parses Buildfiles</h3>
+<p>Phing uses an ExpatParser class and PHP's native expat XML functions to handle
+ the parsing of build files. The handler classes all extend the phing.parser.AbstractHandler
+ class. These handler classes "handle" the tags that are found in the
+ buildfile.</p>
+<p>Core tasks and datatypes are mapped to XML tag names in the defaults.properties
+ files -- specifically phing/tasks/defaults.properties and phing/types/defaults.properties.</p>
+<p>It works roughly like this:</p>
+<ol>
+ <li>phing.parser.RootHandler is registered to handle the buildfile XML document</li>
+ <li>RootHanlder expects to find exactly one element: <project>. RootHandler
+ invokes the ProjectHandler with the attributes from the <project> tag
+ or throws an exception if no <project> is found, or if something else
+ is found instead.</li>
+ <li>ProjectHandler expects to find <target> tags; for these ProjectHandler
+ invokes the TargetHandler. ProjectHandler also has exceptions for handling
+ certain tasks that can be performed at the top-level: <resolve>, <taskdef>,
+ <typedef>, and <property>; for these ProjectHandler invokes the
+ TaskHandler class. If a tag is presented that doesn't match any expected tags,
+ then ProjectHandler assumes it is a datatype and invokes the DataTypeHandler.</li>
+ <li>TargetHandler expects all tags to be either tasks or datatypes and invokes
+ the appropriate handler (based on the mappings provided in the defaults.properties
+ files).</li>
+ <li>Tasks and datatypes can have nested elements, but only if they correspond
+ to a create*() method in the task or datatype class. E.g. a nested <param>
+ tag must correspond to a createParam() method of the task or datatype.</li>
+</ol>
+<p><em>... More to come ...</em></p>
+<h2><a name="WritingTasks"></a>Writing Tasks</h2>
+
+<h3><a name="CreatingATask"></a>Creating A Task</h3>
+
+<p> We will start creating a rather simple task which basically does nothing more
+ than echo a message to the screen. See [below] for the source code and the following
+ [below] for the XML definition that is used for this task. </p>
+
+<a href="codelistings.MyEchoTask"></a>
+<pre title="Source code of a simple task that echos a message to the screen">
+<?php
+
+require_once "phing/Task.php";
+
+class MyEchoTask extends Task {
+
+ /**
+ * The message passed in the buildfile.
+ */
+ private $message = null;
+
+ /**
+ * The setter for the attribute "message"
+ */
+ public function setMessage($str) {
+ $this->message = $str;
+ }
+
+ /**
+ * The init method: Do init steps.
+ */
+ public function init() {
+ // nothing to do here
+ }
+
+ /**
+ * The main entry point method.
+ */
+ public function main() {
+ print($this->message);
+ }
+}
+
+?>
+</pre>
+
+<p> This code contains a rather simple, but complete Phing task. It is assumed
+ that the file is named <em>MyEchoTask.php</em> and placed in <em>classes/phing/tasks/my</em>
+ directory. We'll explain the source code in detail shortly. But first we'd like
+ to discuss how we should register the task to Phing so that it can be executed
+ during the build process. </p>
+
+<h3><a name="UsingTheTask"></a>Using the Task</h3>
+
+<p> The task shown [above] must somehow get called by Phing. Therefore it must
+ be made available to Phing so that the buildfile parser is aware a correlating
+ XML element and it's parameters. Have a look at the minimalistic buildfile example
+ given in [the buildfile below] that does exactly this. </p>
+
+<a name="codelistings.BuildFileEchoTask"></a>
+<pre title="A simple buildfile that tests the echo task">
+<?xml version="1.0" ?>
+
+<project name="test" basedir="." default="test.myecho">
+ <taskdef name="myecho" classname="phing.tasks.my.MyEchoTask" />
+
+ <target name="test.myecho">
+ <myecho message="Hello World" />
+ </target>
+</project>
+</pre>
+
+<p> Besides the XML document prolog and the shell elements that are required to
+ properly execute the task (project, target) you'll find the <em><taskdef></em>
+ element (line 4) that properly registers your custom task to Phing. For a detailed
+ synopsis of the taskdef element see the [description of this task]. </p>
+
+<p>
+Now, as we have registered the task by assigning a name and the
+worker class ([see source code above]) it is ready for usage within
+the <em><target></em> context (line 8). You see that we pass
+the message that our task should echo to the screen via an XML
+attribute called "message".
+</p>
+
+<h3><a name="SourceDiscussion"></a>Source Discussion</h3>
+
+<p>
+No that you've got the knowledge to execute the task in a
+buildfile it's time to discuss how everything works.
+</p>
+
+<h3><a name="TaskStructure"></a>Task Structure</h3>
+
+<p>
+All files containing the definition of a task class follow a
+common well formed structure:
+</p>
+
+<ul>
+ <li>Package imports to import all required packages</li>
+ <li>The class declaration and definition</li>
+ <li>The class's properties</li>
+ <li>The class's constructor</li>
+ <li>Setter methods for each XML attribute</li>
+ <li>The <em>init()</em> method</li>
+ <li>The <em>main()</em> method</li>
+ <li>Arbitrary <em>private</em> (or <em>protected</em>)<em> </em>class methods</li>
+</ul>
+
+<h3><a name="PackageImports"></a>Package Imports</h3>
+
+<p> Always import all the packages/files needed for this task in full written
+ notation. Furthermore you should always import <em>phing.Task</em> at the very
+ top of your <em>import</em> block. Then import all other required system or
+ proprietary packages. Import works quite similar to PHP's native <em>include_once</em>
+ but with some Java-stylish additions providing a file system independent notation.
+</p>
+
+<p>
+For a more in-depth explanation of the used package mechanism
+and the package support API reference, see [package support]
+For a list of stock packages provided with Phing, see
+[package list].
+</p>
+
+<h3><a name="ClassDeclaration"></a>Class Declaration</h3>
+
+<p>
+If you look at line 5 in [the source code of the task] you will find
+the <em>class declaration</em>. This will be familiar to you if
+you are experienced with OOP in PHP (we assume here that you are).
+Furthermore there are some fine-grained rules you must obey when
+creating the classes (see also,[naming and coding standards]):
+</p>
+
+<ul>
+ <li>Your classname must be exactly like the taskname you are going to implement
+ plus the suffix "Task". In our example case the classname is <em>MyEchoTask</em>
+ (constructed by the taskname "myecho" plus the suffix "task"). The upper/lower
+ case casing is currently only for better reading. However, it is encouraged
+ that you use it this way.</li>
+ <li>The task class you are creating must at least extend "Task" to
+ inherit all task specific methods.</li>
+</ul>
+
+<h3><a name="ClassProperties"></a>Class Properties</h3>
+
+<p>
+The next lines you are coding are class properties. Most of them
+are inherited from the Task superclass, so there's not need to
+redeclare them. Nevertheless you should <em>declare</em> the
+following ones by your own:
+</p>
+
+<ul>
+ <li>Taskname. Always hard code the <em>taskname</em> property that
+ equals the name of the XML element that your task claims. Currently
+ this information is not used - but it will be in the future.</li>
+ <li>Your arbitrary properties that reflect the XML
+ attributes/elements which your task accepts.</li>
+</ul>
+
+<p>
+In the MyEchoTask example the coded properties can be found in
+lines 7 to 11. Give you properties meaningful descriptive names
+that clearly state their function within the context. A couple of
+properties are inherited from the superclass that must not be
+declared in the properties part of the code.
+</p>
+
+<p>
+For a list of inherited properties (most of them are reserved,
+so be sure not to overwrite them with your own) can be found in the
+"Phing API Reference" in the docs/api/ directory.
+</p>
+
+<h3><a name="TheConstructor"></a>The Constructor</h3>
+
+<p> The next block that follows is the class's constructor. It must be present
+ and call at least the constructor or the parent class. Of course, you can add
+ some initialization data here. It is recommended that you <em>define</em> your
+ prior declared properties here.</p>
+
+<h3><a name="SetterMethods"></a>Setter Methods</h3>
+
+<p>
+As you can see in the XML definition of our task ([see buildfile above]
+, line 9) there is an attribute defined with the
+task itself, namely "message" with a value of the the text string
+that our task should echo. The task must somehow become aware of
+the attribute name and the value. Therefore the <em>setter
+methods</em> exist.
+</p>
+
+<p>For each attribute you want to import to the task's namespace
+you have to define a method named exactly after the very attribute
+plus the string "Set" prepended. This method accepts exactly one
+parameter that holds the value of the attribute. No you can set the
+value an class internal property to the value incoming via the
+setter method.</p>
+
+<p>In out example the setter is named <em>SetMessage</em> , because the XML attribute
+ the echo task accepts is "message". SetMessage now takes the string "Hello World"
+ provided by the parser and sets the value of the internal class property <em>$strMessage</em>
+ to "Hello World". It is now available to the task for further disposal.</p>
+
+<h3><a name="CreatorMethods"></a>Creator Methods</h3>
+
+<p> Creator methods allow you to manage nested XML tags in your new Phing Task.</p>
+
+<h3><a name="InitMethod"></a><em>init()</em> Method</h3>
+
+<p> The init method gets called when the <taskname> xml element closes.
+ It must be implemented even if it does nothing like in the example above. You
+ can do init steps here required to setup your task object properly. After calling
+ the Init-Method the task object remains untouched by the parser. Init should
+ not perform operations related somehow to the action the task performs. An example
+ of using init may be cleaning up the $strMessage variable in our example (i.e.
+ trim($strMessage)) or importing additional workers needed for this task. </p>
+
+<p>
+The init method should return true or an error object evaluated
+by the governing logic. If you don't implement init method, phing
+will shout down with a fatal error.
+</p>
+
+<h3><a name="MainMethod"></a><em>main()</em> Method</h3>
+
+<p> There is exactly one entry entry point to execute the task. It is called after
+ the complete buildfile has been parsed and all targets and tasks have been scheduled
+ for execution. From this point forward the very implementation of the tasks
+ action starts. In case of our example a message (imported by the proper setter
+ method) is Logged to the screen through the system's "Logger" service (the very
+ action this task is written for). The <em>Log()</em> method-call in this case
+ accepts two parameters: a event constant and the message to log. </p>
+
+<p>
+For a in-depth list of system constants see <a
+href="../document/appendix/AppB.htm#95990">See System
+Constants</a>. For the detailed reference on the system's logger
+see [REF] and the Phing API docs located in the docs/
+subdirectory.
+</p>
+
+<h3><a name="ArbitraryMethods"></a>Arbitrary Methods</h3>
+
+<p> For the more or less simple cases (as our example) all the logic of the task
+ is coded in the Main() method. However for more complex tasks common sense dictates
+ that particular action should be swapped to smaller, logically contained units
+ of code. The most common way to do this is separating logic into private class
+ methods - and in even more complex tasks in separate libraries. </p>
+
+<pre>private function myPrivateMethod() {
+ // definition
+}
+</pre>
+
+<p>
+More reading on this particular topic can be sound in See Naming
+And Coding Standards.
+</p>
+
+<h3><a name="Summary"></a>Summary</h3>
+
+<p>
+You now have learned how to create and use a task. However we
+guess there are much questions open concerning task development:
+"How do I use filesets and mapper" or "How do I implement custom
+nested tags in my task". Most of these concepts and the proper
+usage will be clear if you continue reading this doc. Additionally
+you might check out the appendices for the advanced examples (See
+Advanced Task Example).
+</p>
+
+<h2><a name="WritingTypes"></a>Writing Types</h2>
+
+<p>You should only create a standalone Type if the Type needs to be shared by
+ more than one Task. If the Type is only needed for a specific Task -- for example
+ to handle a special parameter or other tag needed for that Task -- then the
+ Type class should just be defined within the same file as the Task. (For example,
+ <em>phing/filters/XSLTFilter.php</em> also includes an XSLTParam class that
+ is not used anywhere else.)</p>
+<p>For cases where you do need a more generic Type defined, you can create your
+ own Type class -- similar to the way a Task is created [<a href="#WritingTasks">Writing
+ Tasks </a>].</p>
+<h3>Creating a DataType</h3>
+<p>Type classes need to extend the abstract DataType class. Besides providing
+ a means of categorizing types, the DataType class provides the methods necessary
+ to support the "refid" attribute. (All types can be given an id, and
+ can be referred to later using that id.)</p>
+<p>In this example we are creating a DSN type because we have written a number
+ of DB-related Tasks, each of which need to know how to connect to the database;
+ instead of having database parameters for each task, we've created a DSN type
+ so that we can identify the connection params once and then use it in all our
+ db Tasks.</p>
+<pre title="example Type">require_once "phing/types/DataType.php";
+
+/**
+ * This Type represents a DB Connection.
+ */
+class DSN extends DataType {
+
+ private $url;
+ private $username;
+ private $password;
+ private $persistent = false;
+
+ /**
+ * Sets the URL part: mysql://localhost/mydatabase
+ */
+ public function setUrl($url) {
+ $this->url = $url;
+ }
+
+ /**
+ * Sets username to use in connection.
+ */
+ public function setUsername($username) {
+ $this->username = $username;
+ }
+
+ /**
+ * Sets password to use in connection.
+ */
+ public function setPassword($password) {
+ $this->password = $password;
+ }
+
+ /**
+ * Set whether to use persistent connection.
+ * @param boolean $persist
+ */
+ public function setPersistent($persist) {
+ $this->persistent = (boolean) $persist;
+ }
+
+ public function getUrl(Project $p) {
+ if ($this->isReference()) {
+ return $this->getRef($p)->getUrl($p);
+ }
+ return $this->url;
+ }
+
+ public function getUsername(Project $p) {
+ if ($this->isReference()) {
+ return $this->getRef($p)->getUsername($p);
+ }
+ return $this->username;
+ }
+
+ public function getPassword(Project $p) {
+ if ($this->isReference()) {
+ return $this->getRef($p)->getPassword($p);
+ }
+ return $this->password;
+ }
+
+ public function getPersistent(Project $p) {
+ if ($this->isReference()) {
+ return $this->getRef($p)->getPersistent($p);
+ }
+ return $this->persistent;
+ }
+
+ /**
+ * Gets a combined hash/array for DSN as used by PEAR.
+ * @return array
+ */
+ public function getPEARDSN(Project $p) {
+ if ($this->isReference()) {
+ return $this->getRef($p)->getPEARDSN($p);
+ }
+
+ include_once 'DB.php';
+ $dsninfo = DB::parseDSN($this->url);
+ $dsninfo['username'] = $this->username;
+ $dsninfo['password'] = $this->password;
+ $dsninfo['persistent'] = $this->persistent;
+
+ return $dsninfo;
+ }
+
+ /**
+ * Your datatype must implement this function, which ensures that there
+ * are no circular references and that the reference is of the correct
+ * type (DSN in this example).
+ *
+ * @return DSN
+ */
+ public function getRef(Project $p) {
+ if ( !$this->checked ) {
+ $stk = array();
+ array_push($stk, $this);
+ $this->dieOnCircularReference($stk, $p);
+ }
+ $o = $this->ref->getReferencedObject($p);
+ if ( !($o instanceof DSN) ) {
+ throw new BuildException($this->ref->getRefId()." doesn't denote a DSN");
+ } else {
+ return $o;
+ }
+ }
+
+}</pre>
+<h3><a name="UsingType"></a>Using the DataType</h3>
+<p>The <em>TypedefTask</em> provides a way to "declare" your type so
+ that you can use it in your build file. Here is how you would use this type
+ in order to define a single DSN and use it for multiple tasks. (Of course you
+ could specify the DSN connection params each time, but the premise behind needing
+ a DSN datatype was to avoid specifying the connection parameters for each task.)</p>
+<a name="codelistings.DSN"></a>
+<pre title="A simple buildfile that tests the echo task">
+<?xml version="1.0" ?>
+
+<project name="test" basedir=".">
+
+ <typedef name="dsn" classname="myapp.types.DSN" />
+
+ <dsn
+ id="maindsn"
+ url="mysql://localhost/mydatabase"
+ username="root"
+ password=""
+ persistent="false" />
+
+ <target name="main">
+
+ <my-special-db-task>
+ <dsn refid="maindsn"/>
+ </my-special-db-task>
+
+ <my-other-db-task>
+ <dsn refid="maindsn"/>
+ </my-other-db-task>
+
+ </target>
+
+</project>
+</pre>
+
+<h3><a name="TypeSourceDisc"></a>Source Discussion</h3>
+<h4>Getters & Setters</h4>
+<p>You must provide a setter method for every attribute you want to set from the
+ XML build file. It is good practice to also provide a getter method, but in
+ practice you can decide how your tasks will use your task. In the example above,
+ we've provided a getter method for each attribute and we've also provided an
+ additional method: DSN::getPEARDSN() which returns the DSN hash array used by
+ PEAR::DB, PEAR::MDB, and Creole. Depending on the needs of the Tasks using this
+ DataType, we may only wish to provide the getPEARDSN() method rather than a
+ getter for each attribute.</p>
+<p> Also important to note is that the getter method needs to check to see whether
+ the current DataType is a reference to a previously defined DataType -- the
+ DataType::isReference() exists for this purpose. For this reason, the getter
+ methods need to be called with the current project, because References are stored
+ relative to a project.</p>
+<h4>The getRef() Method</h4>
+<p>The getRef() task needs to be implemented in your Type. This method is responsible
+ for returning a referenced object; it needs to check to make sure the referenced
+ object is of the correct type (i.e. you can't try to refer to a RegularExpresson
+ from a DSN DataType) and that the reference is not circular. </p>
+<p>You can probably just copy this method from an existing Type and make the few
+ changes that customize it to your Type.</p>
+<h2><a name="WritingMappers"></a>Writing Mappers</h2>
+<p>Writing your own filename mapper classes will allow you to control how names
+ are transformed in tasks like CopyTask, MoveTask, XSLTTask, etc. In some cases
+ you may want to extend existing mappers (e.g. creating a GlobMapper that also
+ transforms to uppercase); in other cases, you may simply want to create a very
+ specific name transformation that isn't easily accomplished with other mappers
+ like GlobMapper or RegexpMapper.</p>
+<h3><a name="CreatingMapper"></a>Creating a Mapper</h3>
+<p>Writing filename mappers is simplified by interface support in PHP5. Essentially,
+ your custom filename mapper must implement <em>phing.mappers.FileNameMapper</em>.
+ Here's an example of a filename mapper that creates DOS-style file names. For
+ this example, the "to" and "from" attributes are not needed
+ because all files will be transformed. To see the "to" and "from"
+ attributes in action, look at <em>phing.mappers.GlobMapper</em> or <em>phing.mappers.RegexpMapper</em>.
+</p>
+<pre title="sample mapper">require_once "phing/mappers/FileNameMapper.php";
+
+/**
+ * A mapper that makes those ugly DOS filenames.
+ */
+class DOSMapper implements FileNameMapper {
+
+ /**
+ * The main() method actually performs the mapping.
+ *
+ * In this case we transform the $sourceFilename into
+ * a DOS-compatible name. E.g.
+ * ExtendingPhing.html -> EXTENDI~.DOC
+ *
+ * @param string $sourceFilename The name to be coverted.
+ * @return array The matched filenames.
+ */
+ public function main($sourceFilename) {
+
+ $info = pathinfo($sourceFilename);
+ $ext = $info['extension'];
+ // get basename w/o extension
+ $bname = preg_replace('/\.\w+\$/', '', $info['basename']);
+
+ if (strlen($bname) > 8) {
+ $bname = substr($bname,0,7) . '~';
+ }
+
+ if (strlen($ext) > 3) {
+ $ext = substr($bname,0,3);
+ }
+
+ if (!empty($ext)) {
+ $res = $bname . '.' . $ext;
+ } else {
+ $res = $bname;
+ }
+
+ return (array) strtoupper($res);
+ }
+
+ /**
+ * The "from" attribute is not needed here, but method must exist.
+ */
+ public function setFrom($from) {}
+
+ /**
+ * The "from" attribute is not needed here, but method must exist.
+ */
+ public function setTo($to) {}
+
+}
+</pre>
+<h3><a name="UsingMapper"></a>Using the Mapper</h3>
+<p>Assuming that this mapper is saved to <em>myapp/mappers/DOSMapper.php </em>(relative
+ to a path on PHP's <em>include_path</em> or in <em>PHP_CLASSPATH</em> env variable),
+ then you would refer to it like this in your build file:</p>
+<pre title="using example mapper in build file"><mapper classname="myapp.mappers.DOSMapper"/></pre>
+
+</body>
+</html>
diff --git a/docs/phing_guide/book/chapters/GettingStarted.html b/docs/phing_guide/book/chapters/GettingStarted.html
index 93f4fc4..3218508 100644
--- a/docs/phing_guide/book/chapters/GettingStarted.html
+++ b/docs/phing_guide/book/chapters/GettingStarted.html
@@ -1,436 +1,442 @@
-<!--
--File $Id: GettingStarted.html 709 2010-02-01 16:04:15Z mrook $
--License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
--Copyright 2002, turing
--Author alex black, enigma at turingstudio.com
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Phing Guide - Getting Started</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link rel="Stylesheet" rev="Stylesheet" href="../css/Documentation.css" type="text/css" media="All" charset="iso-8859-1" />
-</head>
-<body>
-
-<h1><a name="GettingStarted"></a>Getting Started</h1>
-
-<p> Phing buildfiles are written in XML, and so you will need to know at least
- some basic things about XML to understand the following chapter. There is a
- lot of information available on the web: </p>
-
-<ul>
- <li>The Standard Recommendation of XML by the w3c
- <a href="http://www.w3.org/TR/2000/REC-xml">http://www.w3.org/TR/2000/REC-xml</a>:
- very technical but exhaustive.</li>
- <li><em>XML In 10 Points</em>
- <a href="http://www.w3.org/XML/1999/XML-in-10-points">http://www.w3.org/XML/1999/XML-in-10-points</a>:
- Quick introduction into XML.</li>
- <li><em>A technical introduction to XML</em>
- <a href="http://www.xml.com/pub/a/98/10/guide0.html">http://www.xml.com/pub/a/98/10/guide0.html</a>:
- Interesting article by the creator of DocBook.
- </li>
-</ul>
-
-<h2><a name="XMLAndPhing"></a>XML And Phing</h2>
-
-<p>A valid Phing buildfile has the following basic structure:</p>
-
-
-<ul>
- <li>The document prolog</li>
- <li>Exactly one root element called <em><project></em> .</li>
- <li>Several Phing <em>type</em> elements (i.e. <em><property></em> , <em><fileset></em>
- , <em><patternset></em> etc.)</li>
- <li>One or more <em><target></em> elements containing built-in or user
- defined Phing <em>task</em> elements (i.e. <em><install></em> , <em><bcc></em>
- , etc).</li>
-</ul>
-
-<h2><a name="WritingASimpleBuildfile"></a>Writing A Simple Buildfile</h2>
-
-<p>The Foobar project installs some PHP files from a source location to a target
- location, creates an archive of this files and provides an optional clean-up
- of the build tree:</p>
-
-<pre title="Example of a simple build file">
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="FooBar" default="dist">
-
- <!-- ============================================ -->
- <!-- Target: prepare -->
- <!-- ============================================ -->
- <target name="prepare">
- <echo msg="Making directory ./build" />
- <mkdir dir="./build" />
- </target>
-
- <!-- ============================================ -->
- <!-- Target: build -->
- <!-- ============================================ -->
- <target name="build" depends="prepare">
- <echo msg="Copying files to build directory..." />
-
- <echo msg="Copying ./about.php to ./build directory..." />
- <copy file="./about.php" tofile="./build/about.php" />
-
- <echo msg="Copying ./browsers.php to ./build directory..." />
- <copy file="./browsers.php" tofile="./build/browsers.php" />
-
- <echo msg="Copying ./contact.php to ./build directory..." />
- <copy file="./contact.php" tofile="./build/contact.php" />
- </target>
-
- <!-- ============================================ -->
- <!-- (DEFAULT) Target: dist -->
- <!-- ============================================ -->
- <target name="dist" depends="build">
- <echo msg="Creating archive..." />
-
- <tar destfile="./build/build.tar.gz" compression="gzip">
- <fileset dir="./build">
- <include name="*" />
- </fileset>
- </tar>
-
- <echo msg="Files copied and compressed in build directory OK!" />
- </target>
-</project>
-</pre>
-<p>A phing build file is normally given the name <i>build.xml</i> which is the default file name
-that the Phing executable will look for if no other file name is specified.<p>
-<p>To run the above build file and execute the default target (assuming it is stored in the current
-directory with the default name) is only a matter of calling:</p>
-<code>
-$ phing
-</code>
-<p>This will then execute the <i>dist</i> target.
-While executing the build file each task performed will print some information on what actions
-and what files have been affected.</p>
-<p>To run any of the other target is only a matter of providing the name of the target on the
-command line. So for example to run the <i>build</i> target one would have to execute</p>
-<code>
-$ phing build
-</code>
-<p>It is also possible to specify a number of additional command line arguments as described in
-<a href="appendixes/AppendixA-FactSheet.html#BuildInProperties">Appendix A</a></p>
-
-<h3><a name="ProjectElement"></a>Project Element</h3>
-
-<p>The first element after the document prolog is the root element
-named <em><project></em> on line 3. This element is a
-container for all other elements and can/must have the following
-attributes:</p>
-
-<table>
-<caption><project> Attributes</caption>
-
-<thead>
- <tr>
- <th>Attribute</th>
- <th>Meaning</th>
- <th>Required</th>
- </tr>
-</thead>
-
-<tbody>
- <tr>
- <td>name</td>
- <td>The name of the project</td>
- <td>No</td>
- </tr>
- <tr>
- <td>basedir</td>
- <td>The base directory of the project, use "." do denote the current directory.
- <strong>Note:</strong> if none is specified, the parent directory of the build file is used!</td>
- <td>No</td>
- </tr>
- <tr>
- <td>default</td>
- <td>The default target that is to be executed if no target(s)
- are specified when calling this build file.</td>
- <td>Yes</td>
- </tr>
- <tr>
- <td>description</td>
- <td>The description of the project.</td>
- <td>Yes</td>
- </tr>
-</tbody>
-
-</table>
-
-<h3><a name="TargetElement"></a>Target Element</h3>
-
-<p>A target can <em>depend</em> on other targets. You might have a
-target for installing the files in the build tree, for example, and
-a target for creating a distributable tar.gz archive. You can only
-build a distributable when you have installed the files first, so
-the distribute target depends on the install target. Phing resolves
-these dependencies.</p>
-
-<p>It should be noted, however, that Phing's depends attribute only
-specifies the order in which targets should be executed - it does
-not affect whether the target that specifies the dependency(s) gets
-executed if the dependent target(s) did not (need to) run.</p>
-
-<p>Phing tries to execute the targets in the depends attribute in
-the order they appear (from left to right). Keep in mind that it is
-possible that a target can get executed earlier when an earlier
-target depends on it, in this case the dependant is only executed
-once:</p>
-
-<pre>
- <target name="D" depends="C,B,A" />
-</pre>
-
-<p>Suppose we want to execute target <tt>D</tt> . From its depends
-attribute, you might think that first target <tt>C</tt> , then
-<tt>B</tt> and then <tt>A</tt> is executed. Wrong! <tt>C</tt>
-depends on <tt>B</tt> , and <tt>B</tt> depends on <tt>A</tt> , so
-first <tt>A</tt> is executed, then <tt>B</tt> , then <tt>C</tt> ,
-and finally <tt>D</tt> .</p>
-
-<p>A target gets executed only once, even when more than one target
-depends on it (see the previous example).</p>
-
-<p>The optional description attribute can be used to provide a
-one-line description of this target, which is printed by the
-<tt>-projecthelp</tt> command-line option.</p>
-
-<h4><a name="TargetAttributes"></a>Target attributes</h4>
-
-<p>You can specify one or more of the following attributes within the target element.</p>
-
-<table>
-<caption><target> Attributes</caption>
-<thead>
- <tr>
- <th>Attribute</th>
- <th>Meaning</th>
- <th>Required</th>
- </tr>
-</thead>
-<tbody>
- <tr>
- <td>name</td>
- <td>The name of the target</td>
- <td>Yes</td>
- </tr>
- <tr>
- <td>depends</td>
- <td>A comma-seperated list of targets this target depends on.</td>
- <td>No</td>
- </tr>
- <tr>
- <td>if</td>
- <td>The name of the <em>Property</em> that has to be set in order for
- this target to be executed</td>
- <td>No</td>
- </tr>
- <tr>
- <td>unless</td>
- <td>The name of the <em>Property</em> that must <em>not</em> be set in
- order for this target to be executed.</td>
- <td></td>
- </tr>
-</tbody>
-</table>
-
-<h3><a name="TaskElements"></a>Task Elements</h3>
-
-<p>A <em>task</em> is a piece of PHP code that can be executed.
-This code implements a particular action to perform (i.e. install a
-file). Therefore it must be defined in the buildfile so that it is
-actually invoked by Phing.</p>
-
-<p>These references will be resolved before the task is executed.</p>
-
-<p>Tasks have a common structure:</p>
-
-<pre>
- <name attribute1="value1" attribute2="value2" ... />
-</pre>
-
-<p>where <em>name</em> is the name of the task, <em>attributeN</em>
-is the attribute name, and <em>valueN</em> is the value for this
-attribute.</p>
-
-<p>There is a set of core tasks (see <a href="appendixes/AppendixB-CoreTasks.html">Appendix
- B</a>) along with a number of optional tasks. It is also very easy to write
- your own tasks (see <a href="ExtendingPhing.html">Extending Phing</a>).</p>
-
-<p>Tasks can be assigned an <em>id</em> attribute:</p>
-
-<pre>
- <taskname id="taskID" ... />
-</pre>
-
-<p>By doing this you can refer to specific tasks later on in the
-code of other tasks.</p>
-
-
-<h3><a name="PropertyElement"></a>Property Element</h3>
-
-<p><em>Properties</em> are essentially variables that can be used in the buildfile.
- These might be set in the buildfile by calling the <a href="appendixes/AppendixB-CoreTasks.html#PropertyTask">PropertyTask</a>,
- or might be set outside Phing on the command line (properties set on the command
- always line override the ones in the buildfile). A property has a name and a
- value only. Properties may be used in the value of task attributes. This is
- done by placing the property name between " <tt>${</tt> " and "
- <tt>}</tt> " in the attribute value. For example, if there is a BC_BUILD_DIR
- property with the value 'build', then this could be used in an attribute like
- this: <em>${BC_BUILD_DIR}/en</em> . This is resolved to <em>build/en</em>.</p>
-
-<p>It should be noted that if you use a property that is not defined via the property
- task, the system environment table is searched for this name. For example, if
- you would use the property <tt>${BCHOME}</tt> and you did not define this prior
- in the buildfile or at the command line, Phing uses the environment variable
- <tt>BCHOME</tt> if it exists.</p>
-
-<h4><a name="BuiltInProperties"></a>Built-in Properties</h4>
-
-<p>Phing provides access to system properties as if they had been
-defined using a <em><property></em> task. For example,
-<em>${os.name}</em> expands to the name of the operating
-system. See
-<a href="appendixes/AppendixA-FactSheet.html#BuildInProperties">Appendix A</a>
-for a complete list</p>
-
-
-<h2><a name="ComplexBuildfile"></a>More Complex Buildfile</h2>
-
-<pre title="More complex build file"><?xml version="1.0" encoding="UTF-8" ?>
-
-<project name="testsite" basedir="." default="main">
- <property file="./build.properties" />
-
- <property name="package" value="${phing.project.name}" override="true" />
- <property name="builddir" value="./build/testsite" override="true" />
- <property name="srcdir" value="${project.basedir}" override="true" />
-
- <!-- Fileset for all files -->
- <fileset dir="." id="allfiles">
- <include name="**" />
- </fileset>
-
- <!-- ============================================ -->
- <!-- (DEFAULT) Target: main -->
- <!-- ============================================ -->
- <target name="main" description="main target">
- <copy todir="${builddir}">
- <fileset refid="allfiles" />
- </copy>
- </target>
-
- <!-- ============================================ -->
- <!-- Target: Rebuild -->
- <!-- ============================================ -->
- <target name="rebuild" description="rebuilds this package">
- <delete dir="${builddir}" />
- <phingcall target="main" />
- </target>
-</project>
-</pre>
-
-<p>
-This build file first defines some properties with the <em><property></em>
-task call to <em>PropertyTask</em>. Then, it defines a fileset and two targets.
-Let us have a quick rundown of this build file.
-</p>
-
-<p> The first five four within the <em>project</em> tag define properties. They
- appear in the two ways this tag can occur: </p>
-<ul>
- <li>The second <em>property</em> tag contains only the <em>file</em> attribute.
- The value has to be a relative or absolute path to a property file (for the
- format, see <a href="appendixes/AppendixF-FileFormats.html">Appendix F</a>).
- </li>
- <li>The other times, the tag has a <em>name</em> and a <em>value</em> attribute.
- After the call, the value defined in the attribute <em>value</em> is available
- through the key enclosed in "${" and "}". </li>
-</ul>
-<p>
-The next noticeable thing in the build file is the <em><fileset></em> tag.
-It defines a fileset, i.e. a set of multiple files. You can include and exclude
-Files with <em>include</em> and <em>exclude</em> tags within the <em>fileset</em>
-tag. For more information concerning Filesets (i.e. Patterns) see
-<a href="appendixes/AppendixD-CoreTypes.html#Fileset">Appendix D</a>.
-The fileset is given an <em>id</em> attribute, so it can be referenced later on.
-</p>
-<p>One thing is worth noting here though and that is the use of double star expression,
-i.e. "**". This special regexp refers to all files in all subdirectories as well. Compare
-this with a single "*" which would only refer to all files in the <i>current</i> subdirectory.
-So for example the expression "**/*.phps" would refer to all files with suffix "'.phps" in all
-subdirectories below the current directory.</p>
-
-<p>
-The first task only contains a call to <em>CopyTask</em> via
-<em><copy></em>. The interesting thing is within the
-<em>copy</em> tag. Here, a fileset task is not written out with
-nested <em>include</em> or <em>exclude</em> elements, but
-via the <em>refid</em>, the earlier create Fileset is referenced.
-This way, you can use a once defined fileset multiple times in
-your build files.
-</p>
-
-<p> The only noticeable thing in the second target is the call to <em>PhingTask</em>
- with the <em><phingcall></em> tag (see <a href="appendixes/AppendixB-CoreTasks.html#PhingCallTask">Appendix
- B</a> for more information). The task executes a specified target within the
- same build file. So, the second target removes the build directory and calls
- <em>main</em> anew so the project is rebuilt. </p>
-
-<p> A variant is to override properties defined in the build file
-with properties specified on the command line using the <i>-D</i> switch. For example to
-override the <i>builddir</i> in the build file above one could call Phing as</p>
-<code>
-$ phing -Dbuilddir=/tmp/system-test
-</code>
-
-
-<h2><a name="RelaxNGGrammar"></a>Relax NG Grammar</h2>
-
-<p>With a little bit of experience it is not that difficult to write and
-understand Phing build files since the XML format in itself tends to be quite
-verbose. However, it can become a bit tedious and the large (and growing)
- amount of built-in tasks and filters can sometimes make it difficult to
- remember the exact syntax of all the available features.</p>
-<p>To help with this the Phing distribution contains a <i>Relax NG Grammar</i>
-(<b>RE</b>gular <b>LA</b>nguage for <b>X</b>ML <b>N</b>ext <b>G</b>eneration,
-<a href="http://www.relaxng.org/">http://www.relaxng.org/</a>)
-that describes the (formal) syntax of the build files.
-This grammar can help validate and write
-Phing build files since there are many XML editors which can make use of this
-type of grammar to validate, on the fly, as well as do context-sensitive
-auto-completion. Especially the auto-complete feature can significantly reduce
-the time it takes to write a correct, and possible complex, Phing build
- files.</p>
-<p>This grammar is available (as a plain text file) in the distribution at:</p>
-<code>
-/etc/phing-grammar.rng
-</code>
-<p>Since we do not want to neither endorse nor forget
- any particular XML editor with this capability we do not make available such
- a list of editors. Instead, spending a few minutes with Google searching
-for XML-editors is bound to find a number of editors with this capability.</p>
-<p>For only validating Phing build files there are several
-excellent free Java based command line tool validators (unfortunately we are
- not aware of any existing PHP based validator).
-One such validator is Sun Microsystems "Sun Multi-Schema Validator" or
-<i>MSV</i> (available at
-<a href="https://msv.dev.java.net/">https://msv.dev.java.net/</a>).
-This validator can take an RNG grammar and validate a given XML file against
-the supplied grammar.</p>
-<p>For example, to use MSV to validate a Phing build file the following
-command line could be used:</p>
-<pre>
-$ java -jar msv.jar phing-grammar.rng build.xml
-start parsing a grammar.
-validating /home/joe/build.xml
-the document is valid.
-$
-</pre>
-
-</body>
-</html>
+<!--
+-File $Id: GettingStarted.html 1054 2011-03-02 21:49:45Z mrook $
+-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
+-Copyright 2002, turing
+-Author alex black, enigma at turingstudio.com
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Phing Guide - Getting Started</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <link rel="Stylesheet" rev="Stylesheet" href="../css/Documentation.css" type="text/css" media="All" charset="iso-8859-1" />
+</head>
+<body>
+
+<h1><a name="GettingStarted"></a>Getting Started</h1>
+
+<p> Phing buildfiles are written in XML, and so you will need to know at least
+ some basic things about XML to understand the following chapter. There is a
+ lot of information available on the web: </p>
+
+<ul>
+ <li>The Standard Recommendation of XML by the w3c
+ <a href="http://www.w3.org/TR/2000/REC-xml">http://www.w3.org/TR/2000/REC-xml</a>:
+ very technical but exhaustive.</li>
+ <li><em>XML In 10 Points</em>
+ <a href="http://www.w3.org/XML/1999/XML-in-10-points">http://www.w3.org/XML/1999/XML-in-10-points</a>:
+ Quick introduction into XML.</li>
+ <li><em>A technical introduction to XML</em>
+ <a href="http://www.xml.com/pub/a/98/10/guide0.html">http://www.xml.com/pub/a/98/10/guide0.html</a>:
+ Interesting article by the creator of DocBook.
+ </li>
+</ul>
+
+<h2><a name="XMLAndPhing"></a>XML And Phing</h2>
+
+<p>A valid Phing buildfile has the following basic structure:</p>
+
+
+<ul>
+ <li>The document prolog</li>
+ <li>Exactly one root element called <em><project></em> .</li>
+ <li>Several Phing <em>type</em> elements (i.e. <em><property></em> , <em><fileset></em>
+ , <em><patternset></em> etc.)</li>
+ <li>One or more <em><target></em> elements containing built-in or user
+ defined Phing <em>task</em> elements (i.e. <em><install></em> , <em><bcc></em>
+ , etc).</li>
+</ul>
+
+<h2><a name="WritingASimpleBuildfile"></a>Writing A Simple Buildfile</h2>
+
+<p>The Foobar project installs some PHP files from a source location to a target
+ location, creates an archive of this files and provides an optional clean-up
+ of the build tree:</p>
+
+<pre title="Example of a simple build file">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="FooBar" default="dist">
+
+ <!-- ============================================ -->
+ <!-- Target: prepare -->
+ <!-- ============================================ -->
+ <target name="prepare">
+ <echo msg="Making directory ./build" />
+ <mkdir dir="./build" />
+ </target>
+
+ <!-- ============================================ -->
+ <!-- Target: build -->
+ <!-- ============================================ -->
+ <target name="build" depends="prepare">
+ <echo msg="Copying files to build directory..." />
+
+ <echo msg="Copying ./about.php to ./build directory..." />
+ <copy file="./about.php" tofile="./build/about.php" />
+
+ <echo msg="Copying ./browsers.php to ./build directory..." />
+ <copy file="./browsers.php" tofile="./build/browsers.php" />
+
+ <echo msg="Copying ./contact.php to ./build directory..." />
+ <copy file="./contact.php" tofile="./build/contact.php" />
+ </target>
+
+ <!-- ============================================ -->
+ <!-- (DEFAULT) Target: dist -->
+ <!-- ============================================ -->
+ <target name="dist" depends="build">
+ <echo msg="Creating archive..." />
+
+ <tar destfile="./build/build.tar.gz" compression="gzip">
+ <fileset dir="./build">
+ <include name="*" />
+ </fileset>
+ </tar>
+
+ <echo msg="Files copied and compressed in build directory OK!" />
+ </target>
+</project>
+</pre>
+<p>A phing build file is normally given the name <i>build.xml</i> which is the default file name
+that the Phing executable will look for if no other file name is specified.<p>
+<p>To run the above build file and execute the default target (assuming it is stored in the current
+directory with the default name) is only a matter of calling:</p>
+<code>
+$ phing
+</code>
+<p>This will then execute the <i>dist</i> target.
+While executing the build file each task performed will print some information on what actions
+and what files have been affected.</p>
+<p>To run any of the other target is only a matter of providing the name of the target on the
+command line. So for example to run the <i>build</i> target one would have to execute</p>
+<code>
+$ phing build
+</code>
+<p>It is also possible to specify a number of additional command line arguments as described in
+<a href="appendixes/AppendixA-FactSheet.html#BuildInProperties">Appendix A</a></p>
+
+<h3><a name="ProjectElement"></a>Project Element</h3>
+
+<p>The first element after the document prolog is the root element
+named <em><project></em> on line 3. This element is a
+container for all other elements and can/must have the following
+attributes:</p>
+
+<table>
+<caption><project> Attributes</caption>
+
+<thead>
+ <tr>
+ <th>Attribute</th>
+ <th>Meaning</th>
+ <th>Required</th>
+ </tr>
+</thead>
+
+<tbody>
+ <tr>
+ <td>name</td>
+ <td>The name of the project</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>basedir</td>
+ <td>The base directory of the project, use "." do denote the current directory.
+ <strong>Note:</strong> if none is specified, the parent directory of the build file is used!</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>default</td>
+ <td>The default target that is to be executed if no target(s)
+ are specified when calling this build file.</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>description</td>
+ <td>The description of the project.</td>
+ <td>No</td>
+ </tr>
+</tbody>
+
+</table>
+
+<h3><a name="TargetElement"></a>Target Element</h3>
+
+<p>A target can <em>depend</em> on other targets. You might have a
+target for installing the files in the build tree, for example, and
+a target for creating a distributable tar.gz archive. You can only
+build a distributable when you have installed the files first, so
+the distribute target depends on the install target. Phing resolves
+these dependencies.</p>
+
+<p>It should be noted, however, that Phing's depends attribute only
+specifies the order in which targets should be executed - it does
+not affect whether the target that specifies the dependency(s) gets
+executed if the dependent target(s) did not (need to) run.</p>
+
+<p>Phing tries to execute the targets in the depends attribute in
+the order they appear (from left to right). Keep in mind that it is
+possible that a target can get executed earlier when an earlier
+target depends on it, in this case the dependant is only executed
+once:</p>
+
+<pre>
+ <target name="A" />
+
+ <target name="B" depends="A" />
+
+ <target name="C" depends="B" />
+
+ <target name="D" depends="C,B,A" />
+</pre>
+
+<p>Suppose we want to execute target <tt>D</tt> . From its depends
+attribute, you might think that first target <tt>C</tt> , then
+<tt>B</tt> and then <tt>A</tt> is executed. Wrong! <tt>C</tt>
+depends on <tt>B</tt> , and <tt>B</tt> depends on <tt>A</tt> , so
+first <tt>A</tt> is executed, then <tt>B</tt> , then <tt>C</tt> ,
+and finally <tt>D</tt> .</p>
+
+<p>A target gets executed only once, even when more than one target
+depends on it (see the previous example).</p>
+
+<p>The optional description attribute can be used to provide a
+one-line description of this target, which is printed by the
+<tt>-projecthelp</tt> command-line option.</p>
+
+<h4><a name="TargetAttributes"></a>Target attributes</h4>
+
+<p>You can specify one or more of the following attributes within the target element.</p>
+
+<table>
+<caption><target> Attributes</caption>
+<thead>
+ <tr>
+ <th>Attribute</th>
+ <th>Meaning</th>
+ <th>Required</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td>name</td>
+ <td>The name of the target</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>depends</td>
+ <td>A comma-seperated list of targets this target depends on.</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>if</td>
+ <td>The name of the <em>Property</em> that has to be set in order for
+ this target to be executed</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>unless</td>
+ <td>The name of the <em>Property</em> that must <em>not</em> be set in
+ order for this target to be executed.</td>
+ <td></td>
+ </tr>
+</tbody>
+</table>
+
+<h3><a name="TaskElements"></a>Task Elements</h3>
+
+<p>A <em>task</em> is a piece of PHP code that can be executed.
+This code implements a particular action to perform (i.e. install a
+file). Therefore it must be defined in the buildfile so that it is
+actually invoked by Phing.</p>
+
+<p>These references will be resolved before the task is executed.</p>
+
+<p>Tasks have a common structure:</p>
+
+<pre>
+ <name attribute1="value1" attribute2="value2" ... />
+</pre>
+
+<p>where <em>name</em> is the name of the task, <em>attributeN</em>
+is the attribute name, and <em>valueN</em> is the value for this
+attribute.</p>
+
+<p>There is a set of core tasks (see <a href="appendixes/AppendixB-CoreTasks.html">Appendix
+ B</a>) along with a number of optional tasks. It is also very easy to write
+ your own tasks (see <a href="ExtendingPhing.html">Extending Phing</a>).</p>
+
+<p>Tasks can be assigned an <em>id</em> attribute:</p>
+
+<pre>
+ <taskname id="taskID" ... />
+</pre>
+
+<p>By doing this you can refer to specific tasks later on in the
+code of other tasks.</p>
+
+
+<h3><a name="PropertyElement"></a>Property Element</h3>
+
+<p><em>Properties</em> are essentially variables that can be used in the buildfile.
+ These might be set in the buildfile by calling the <a href="appendixes/AppendixB-CoreTasks.html#PropertyTask">PropertyTask</a>,
+ or might be set outside Phing on the command line (properties set on the command line
+ always override the ones in the buildfile). A property has a name and a
+ value only. Properties may be used in the value of task attributes. This is
+ done by placing the property name between " <tt>${</tt> " and "
+ <tt>}</tt> " in the attribute value. For example, if there is a BC_BUILD_DIR
+ property with the value 'build', then this could be used in an attribute like
+ this: <em>${BC_BUILD_DIR}/en</em> . This is resolved to <em>build/en</em>.</p>
+
+<p>It should be noted that if you use a property that is not defined via the property
+ task, the system environment table is searched for this name. For example, if
+ you would use the property <tt>${BCHOME}</tt> and you did not define this prior
+ in the buildfile or at the command line, Phing uses the environment variable
+ <tt>BCHOME</tt> if it exists.</p>
+
+<h4><a name="BuiltInProperties"></a>Built-in Properties</h4>
+
+<p>Phing provides access to system properties as if they had been
+defined using a <em><property></em> task. For example,
+<em>${os.name}</em> expands to the name of the operating
+system. See
+<a href="appendixes/AppendixA-FactSheet.html#BuildInProperties">Appendix A</a>
+for a complete list</p>
+
+
+<h2><a name="ComplexBuildfile"></a>More Complex Buildfile</h2>
+
+<pre title="More complex build file"><?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="testsite" basedir="." default="main">
+ <property file="./build.properties" />
+
+ <property name="package" value="${phing.project.name}" override="true" />
+ <property name="builddir" value="./build/testsite" override="true" />
+ <property name="srcdir" value="${project.basedir}" override="true" />
+
+ <!-- Fileset for all files -->
+ <fileset dir="." id="allfiles">
+ <include name="**" />
+ </fileset>
+
+ <!-- ============================================ -->
+ <!-- (DEFAULT) Target: main -->
+ <!-- ============================================ -->
+ <target name="main" description="main target">
+ <copy todir="${builddir}">
+ <fileset refid="allfiles" />
+ </copy>
+ </target>
+
+ <!-- ============================================ -->
+ <!-- Target: Rebuild -->
+ <!-- ============================================ -->
+ <target name="rebuild" description="rebuilds this package">
+ <delete dir="${builddir}" />
+ <phingcall target="main" />
+ </target>
+</project>
+</pre>
+
+<p>
+This build file first defines some properties with the <em><property></em>
+task call to <em>PropertyTask</em>. Then, it defines a fileset and two targets.
+Let us have a quick rundown of this build file.
+</p>
+
+<p> The first five four within the <em>project</em> tag define properties. They
+ appear in the two ways this tag can occur: </p>
+<ul>
+ <li>The second <em>property</em> tag contains only the <em>file</em> attribute.
+ The value has to be a relative or absolute path to a property file (for the
+ format, see <a href="appendixes/AppendixF-FileFormats.html">Appendix F</a>).
+ </li>
+ <li>The other times, the tag has a <em>name</em> and a <em>value</em> attribute.
+ After the call, the value defined in the attribute <em>value</em> is available
+ through the key enclosed in "${" and "}". </li>
+</ul>
+<p>
+The next noticeable thing in the build file is the <em><fileset></em> tag.
+It defines a fileset, i.e. a set of multiple files. You can include and exclude
+files with the <em>include</em> and <em>exclude</em> tags within the <em>fileset</em>
+tag. For more information concerning Filesets (i.e. Patterns) see
+<a href="appendixes/AppendixD-CoreTypes.html#Fileset">Appendix D</a>.
+The fileset is given an <em>id</em> attribute, so it can be referenced later on.
+</p>
+<p>One thing is worth noting here though and that is the use of double star expression,
+i.e. "**". This special regexp refers to all files in all subdirectories as well. Compare
+this with a single "*" which would only refer to all files in the <i>current</i> subdirectory.
+So for example the expression "**/*.phps" would refer to all files with suffix "'.phps" in all
+subdirectories below the current directory.</p>
+
+<p>
+The first task only contains a call to <em>CopyTask</em> via
+<em><copy></em>. The interesting thing is within the
+<em>copy</em> tag. Here, a fileset task is not written out with
+nested <em>include</em> or <em>exclude</em> elements, but
+via the <em>refid</em>, the Fileset created earlier is referenced.
+This way, you can use a once defined fileset multiple times in
+your build files.
+</p>
+
+<p> The only noticeable thing in the second target is the call to <em>PhingTask</em>
+ with the <em><phingcall></em> tag (see <a href="appendixes/AppendixB-CoreTasks.html#PhingCallTask">Appendix
+ B</a> for more information). The task executes a specified target within the
+ same build file. So, the second target removes the build directory and calls
+ <em>main</em> again, thus rebuilding the project. </p>
+
+<p> A variant is to override properties defined in the build file
+with properties specified on the command line using the <i>-D</i> switch. For example to
+override the <i>builddir</i> in the build file above one could call Phing as</p>
+<code>
+$ phing -Dbuilddir=/tmp/system-test
+</code>
+
+
+<h2><a name="RelaxNGGrammar"></a>Relax NG Grammar</h2>
+
+<p>With a little bit of experience it is not that difficult to write and
+understand Phing build files since the XML format in itself tends to be quite
+verbose. However, it can become a bit tedious and the large (and growing)
+ amount of built-in tasks and filters can sometimes make it difficult to
+ remember the exact syntax of all the available features.</p>
+<p>To help with this the Phing distribution contains a <i>Relax NG Grammar</i>
+(<b>RE</b>gular <b>LA</b>nguage for <b>X</b>ML <b>N</b>ext <b>G</b>eneration,
+<a href="http://www.relaxng.org/">http://www.relaxng.org/</a>)
+that describes the (formal) syntax of the build files.
+This grammar can help validate and write
+Phing build files since there are many XML editors which can make use of this
+type of grammar to validate, on the fly, as well as do context-sensitive
+auto-completion. Especially the auto-complete feature can significantly reduce
+the time it takes to write a correct, and possible complex, Phing build
+ files.</p>
+<p>This grammar is available (as a plain text file) in the distribution at:</p>
+<code>
+/etc/phing-grammar.rng
+</code>
+<p>Since we do not want to neither endorse nor forget
+ any particular XML editor with this capability we do not make available such
+ a list of editors. Instead, spending a few minutes with Google searching
+for XML-editors is bound to find a number of editors with this capability.</p>
+<p>For only validating Phing build files there are several
+excellent free Java based command line tool validators (unfortunately we are
+ not aware of any existing PHP based validator).
+One such validator is Sun Microsystems "Sun Multi-Schema Validator" or
+<i>MSV</i> (available at
+<a href="https://msv.dev.java.net/">https://msv.dev.java.net/</a>).
+This validator can take an RNG grammar and validate a given XML file against
+the supplied grammar.</p>
+<p>For example, to use MSV to validate a Phing build file the following
+command line could be used:</p>
+<pre>
+$ java -jar msv.jar phing-grammar.rng build.xml
+start parsing a grammar.
+validating /home/joe/build.xml
+the document is valid.
+$
+</pre>
+
+</body>
+</html>
diff --git a/docs/phing_guide/book/chapters/ProjectComponents.html b/docs/phing_guide/book/chapters/ProjectComponents.html
index 851f99a..bdf3516 100644
--- a/docs/phing_guide/book/chapters/ProjectComponents.html
+++ b/docs/phing_guide/book/chapters/ProjectComponents.html
@@ -1,5 +1,5 @@
<!--
--File $Id: ProjectComponents.html 803 2010-07-23 11:49:47Z mrook $
+-File $Id: ProjectComponents.html 864 2010-09-16 20:30:40Z victor $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -47,7 +47,7 @@
<h2><a name="Version"></a>Version</h2>
-<p>Since Phing 2.4.2 it is possible to include a <em>version</em> attribute
+<p>Since Phing 2.4.2 it is possible to include a <em>phingVersion</em> attribute
in the <em><project></em> tag. This attribute allows you to define
the minimum Phing version required to execute a build file, in order
to prevent compatibility issues.</p>
@@ -55,7 +55,7 @@
<pre title="An Example for the use of the Version attribute">
<?xml version="1.0"?>
-<project name="test" version="2.4.2" >
+<project name="test" phingVersion="2.4.2" >
<!-- Everything else here -->
<project>
</pre>
diff --git a/docs/phing_guide/book/chapters/Setup.html b/docs/phing_guide/book/chapters/Setup.html
index cb47b56..65a907e 100644
--- a/docs/phing_guide/book/chapters/Setup.html
+++ b/docs/phing_guide/book/chapters/Setup.html
@@ -1,5 +1,5 @@
<!--
--File $Id: Setup.html 597 2009-10-07 11:07:09Z johan162 $
+-File $Id: Setup.html 841 2010-08-30 22:00:04Z mrook $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -22,11 +22,9 @@
<h2><a name="SystemRequirements"></a>System Requirements</h2>
-<p> To use Phing you must have installed PHP version 5.0.0b1 or above compiled
- --with-libxml2, as well as --with-xsl if you want to make use of advanced functionality.
- At the time of writing PHP5.0.0b2-dev is currently unable to run Phing due to
- segmentation faults arising somewhere in the XML parsing of the build file.</p>
-
+<p> To use Phing you must have installed PHP version 5.2 or above compiled
+ --with-libxml2, as well as --with-xsl if you want to make use of advanced functionality.</p>
+
<p> For more information on PHP and the required modules see the PHP <a href="Bibliography.html#php">[php]</a>
website. For a brief list of software dependencies see below. </p>
@@ -60,12 +58,12 @@ find out additional software requirements.</p>
</thead>
<tbody>
<tr>
- <td>PHP 5.0.2+</td>
+ <td>PHP 5.2+</td>
<td>Execution</td>
<td><a href="http://www.php.net">http://www.php.net</a></td>
</tr>
<tr>
- <td>PHPUnit2 3.2.0+</td>
+ <td>PHPUnit 3.4.0+</td>
<td>Additional functionality (task)</td>
<td><a href="http://www.phpunit.de">http://www.phpunit.de</a></td>
</tr>
@@ -114,76 +112,46 @@ find out additional software requirements.</p>
<p> The easiest way to obtain the distribution package is to visit the Phing website
<a href="Bibliography.html#phing">[phing] </a>and download the current distribution
package in the format you desire. </p>
-<p>As of version 2.0.0b1, you have the option of downloading a PEAR-installable
+<p>As of version 2.0, you have the option of downloading a PEAR-installable
package or the full phing distribution. If you wish to modify phing we suggestion
downloading the full version so that you can (e.g.) create your own PEAR package.
If you simply wish to use Phing for your own project or need it to build another
package, download & install the PEAR package.</p>
-<h3><a name="GettingFromCVS"></a>Getting A Development Copy From CVS</h3>
+<h3><a name="GettingFromCVS"></a>Getting A Development Copy From Subversion</h3>
<p>You are encouraged to contibute to the development of Phing. If
-you want to participate in Phing development or if you are simply
-intereseted in the latest features and development, obtain a CVS
+you want to participate or if you are simply
+interested in the latest features and development, obtain a Subversion
copy as described in the following paragraphs.</p>
-<p><strong>The CVS revisions of Phing are not bullet-proof and may
-fail to execute properly on your machine. Only obtain the CVS
+<p><strong>The SVN revisions of Phing are not bullet-proof and may
+fail to execute properly on your machine. Only obtain the development
versions if you are absolutely aware of limitations and constraints
of such an action. Additionally you should sign up to the
development mailinglist to report and notice errors and
incompatibilities.</strong></p>
<p>We assume that you are running a Unix style operating system. So
-we expect the CVS software is installed ant the <tt>cvs</tt>
-executable is in your system's search path.. However, the steps for
+we expect the Subversion software is installed ant the <tt>svn</tt>
+executable is in your system's search path. However, the steps for
a Windows based system are very similar. There is plenty additional
-resources available on how to use CVS
-<a href="Bibliography.html#cvs-howto">[cvs-howto]</a> and on CVS
-speciaities on the Tigris project management platfrom
-<a href="Bibliography.html#cvs-tigris">[cvs-tigris]</a>.</p>
-
-<p>The frist thing you have to do is log onto the CVS server.
-Therefore type the following line at your command promt:</p>
-
-<pre>
- cvs -d :pserver:guest at cvs.tigris.org:/cvs login
-</pre>
-
-<p>If you signed-up as developer at the Tigris website, login with
-your own password, the same as the one you use to access the site.
-Or use the password "guest" with username "guest".</p>
+information available on how to use Subversion
+<a href="Bibliography.html#cvs-howto">[svn-howto]</a>.</p>
-<p>If this is the only project you working on, you only need to set
-the cvsroot once. Thereafter when you log in to this domain, the
-cvs repository for this project is assumed. If you are working
-multiple projects, however, you must specify the cvsroot each time
-you log in to ensure that the cvs repository you are accessing is
-the right one.</p>
+<p>To check out the project source repository type:</p>
-<p>To check out the project source repository an individual module
-(if you don't need the entire repository), type:</p>
+<pre>$> svn checkout http://svn.phing.info/trunk</pre>
-<pre>
-cvs -d :pserver:guest at cvs.tigris.org:/cvs checkout phing
-</pre>
-
-<p>This command should result in a scrolling list of files being
-added to the local directory you specified on your machine. Now you
-are ready to use your favourite file editor to work with individual
-files and make changes.</p>
+<p>You can also browse the entire Phing source (including previous versions
+and development branches) on <a href="http://www.phing.info/trac/browser" target="_blank">http://www.phing.info/trac/browser</a>.</p>
-<p>The top-level CVS module contains the Phing project website in addition to
- the phing application; the Phing files, therefore, reside in the phing/ subdirectory:</p>
-
-<pre>
-./phing/phing
-</pre>
<h2><a name="Setup.PearInstall"></a>PEAR Install</h2>
<p>The easiest way to install Phing is using the PEAR installer. Provided that
the package you downloaded is a the PEAR-ready package, you can install Phing
simply from the command line (Unix or Windows):</p>
-<pre>$> pear install phing-2.0.0b1-pear.tar.gz</pre>
+<pre>$> pear channel-discover pear.phing.info
+$> pear install phing/phing</pre>
<p>The pear installer will check any dependencies and place the phing script (phing
or phing.bat) into your PHP script directoy (i.e. where the "pear"
script resides).</p>
@@ -198,7 +166,7 @@ files and make changes.</p>
already have done this in a prior step). This directory will be known as <em>PHING_HOME</em>
.</p>
-<p><strong>On Windows 95 and Windows 98, the script used to launch Phing will
+<p><strong>On earlier Windows installations, the script used to launch Phing will
have problems if PHING_HOME is a long filepath. This is due to limitations in
the OS's handling of the "for" batch-file statement. It is recommended, therefore,
that Phing be installed in a short path, such as C:\opt\phing.</strong></p>
@@ -210,8 +178,8 @@ will need to do perform:</p>
<li>Add the full path to the <em>bin/</em> directory to your path.</li>
<li>Set the <em>PHING_HOME</em> environment variable to the directory
where you installed Phing. On some operating systems the Phing
- wrapper scripts can guess PHING_HOME (Unix dialects and Windows
- NT/2000). However, it is better to not rely on this behavior.</li>
+ wrapper scripts can guess PHING_HOME (Unix dialects and Windows).
+ However, it is better to not rely on this behavior.</li>
<li>Set the <em>PHP_COMMAND</em> environment variable to where your
Php binary is located (including the binary i.e.
PHP_COMMAND=/usr/bin/php).</li>
diff --git a/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html b/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
index 2d44c80..8e2e2e5 100644
--- a/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
+++ b/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
@@ -1,5 +1,5 @@
<!--
--File $Id: AppendixB-CoreTasks.html 680 2010-01-04 13:36:02Z mrook $
+-File $Id: AppendixB-CoreTasks.html 996 2010-11-21 20:47:26Z mrook $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -530,6 +530,16 @@ i.e. copying a file to the same name for security reasons.
<td>0755</td>
<td>No</td>
</tr>
+ <tr>
+ <td>haltonerror</td>
+ <td>Boolean</td>
+ <td>
+ If set to <em>true</em>, halts the build when errors are
+ encountered.
+ </td>
+ <td>true</td>
+ <td>No</td>
+ </tr>
</tbody>
</table>
<h3>Supported Nested Tags</h3>
@@ -1123,7 +1133,7 @@ Causes the current build script execution to fail and the script to exit with an
<td>Yes</td>
</tr>
<tr>
- <td>param</td>
+ <td>absparam</td>
<td>string</td>
<td>The name of the absolute pathparameter to pass the tokens in as to the target (used while processing nested filesets).</td>
<td>n/a</td>
@@ -2240,7 +2250,7 @@ These properties can be used in the build-file, for instance, to create time-sta
<p>UpToDateTask tests if a resource/file is set and sets a certain property
to a certain value if it exists. </p>
<pre title="Example of how to use AvailableTask"><uptodate property="propelBuild.notRequired" targetfile="${deploy}/propelClasses.tgz" >
- <fileset dir= "${src}/propel">
+ <fileset dir="${src}/propel">
<include="**/*.php"/>
</fileset>
</uptodate></pre>
diff --git a/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html b/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html
index 4d95013..da24f4c 100644
--- a/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html
+++ b/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html
@@ -1,5 +1,5 @@
<!--
--File $Id: AppendixC-OptionalTasks.html 800 2010-07-15 07:47:01Z bschultz $
+-File $Id: AppendixC-OptionalTasks.html 1057 2011-03-03 09:51:22Z victor $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -17,97 +17,9 @@
but can assist in various aspects of development and deployment. </p>
<p> This reference lists the tasks alphabetically by the name of the classes that implement the tasks.
So if you are searching for the reference to the <code><phplint></code> tag, for example,
- you will want to look at the reference of PhpLintTask. </p><h2><a name="DbDeployTask"></a>DbDeployTask</h2><p>The <em>DbDeployTask</em> creates .sql files for making revisions to a database, based on dbdeploy conventions centering around a changelog table in the database. See <a
- href="http://dbdeploy.com/documentation/getting-started/rules-for-using-dbdeploy/"
- >rules for using dbdeploy</a> for more information. You will need a changelog table like so:</p>
- <pre>CREATE TABLE changelog (
- change_number BIGINT NOT NULL,
- delta_set VARCHAR(10) NOT NULL,
- start_dt TIMESTAMP NOT NULL,
- complete_dt TIMESTAMP NULL,
- applied_by VARCHAR(100) NOT NULL,
- description VARCHAR(500) NOT NULL
-)</pre>
- <h3>Example</h3>
- <pre>
-<taskdef name="dbdeploy" classname="phing.tasks.ext.dbdeploy.DbDeployTask"/>
-
-<dbdeploy
- url="sqlite:${project.basedir}/data/db.sqlite"
- userid="dbdeploy"
- password="dbdeploy"
- dir="${project.basedir}/data/dbdeploy/deltas"
-/>
-</pre>
- <p>The above example uses a sqlite database and delta scripts located in dbdeploy/deltas in the project base dir.</p><h3>Attributes</h3><table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Description</th>
- <th>Default</th>
- <th>Required</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>url</td>
- <td>String</td>
- <td>PDO connection url</td>
- <td>n/a</td>
- <td>Yes</td>
- </tr>
- <tr>
- <td>userid</td>
- <td>String</td>
- <td>DB userid to use for accessing the changelog table</td>
- <td>none</td>
- <td>As required by db</td>
- </tr>
- <tr>
- <td>password</td>
- <td>String</td>
- <td>DB password to use for accessing the changelog table</td>
- <td>none</td>
- <td>As required by db</td>
- </tr>
- <tr>
- <td>dir</td>
- <td>String</td>
- <td>Directory containing dbdeploy delta scripts</td>
- <td>none</td>
- <td>Yes</td>
- </tr>
- <tr>
- <td>outputfile</td>
- <td>String</td>
- <td>Filename in which deployment SQL will be generated</td>
- <td>dbdeploy_deploy.sql</td>
- <td>No</td>
- </tr>
- <tr>
- <td>undooutputfile</td>
- <td>String</td>
- <td>Filename in which undo SQL will be generated</td>
- <td>dbdeploy_undo.sql</td>
- <td>No</td>
- </tr>
- <tr>
- <td>deltaset</td>
- <td>String</td>
- <td>deltaset to check within db</td>
- <td>Main</td>
- <td>No</td>
- </tr>
- <tr>
- <td>lastchangetoapply</td>
- <td>Integer</td>
- <td>Highest-numbered delta script to apply to db</td>
- <td>999</td>
- <td>No</td>
- </tr>
- </tbody>
- </table><h2><a name="CoverageMergerTask"></a>CoverageMergerTask</h2><p>The CoverageMergerTask merges code coverage information from external sources with an existing code coverage database.</p><p>The format of the code coverage files is expected to be identical to:</p>
+ you will want to look at the reference of PhpLintTask. </p>
+
+<h2><a name="CoverageMergerTask"></a>CoverageMergerTask</h2><p>The CoverageMergerTask merges code coverage information from external sources with an existing code coverage database.</p><p>The format of the code coverage files is expected to be identical to:</p>
<pre>
file_put_contents('/www/live/testcases/coverage.data', serialize(xdebug_get_code_coverage));
</pre>
@@ -277,6 +189,95 @@ file_put_contents('/www/live/testcases/coverage.data', serialize(xdebug_get_code
</pre>
<p>Validates the code coverage database (from CoverageSetupTask) against the specified thresholds.</p>
+<h2><a name="DbDeployTask"></a>DbDeployTask</h2><p>The <em>DbDeployTask</em> creates .sql files for making revisions to a database, based on dbdeploy conventions centering around a changelog table in the database. See <a
+ href="http://dbdeploy.com/documentation/getting-started/rules-for-using-dbdeploy/"
+ >rules for using dbdeploy</a> for more information. You will need a changelog table like so:</p>
+ <pre>CREATE TABLE changelog (
+ change_number BIGINT NOT NULL,
+ delta_set VARCHAR(10) NOT NULL,
+ start_dt TIMESTAMP NOT NULL,
+ complete_dt TIMESTAMP NULL,
+ applied_by VARCHAR(100) NOT NULL,
+ description VARCHAR(500) NOT NULL
+)</pre>
+ <h3>Example</h3>
+ <pre>
+<dbdeploy
+ url="sqlite:${project.basedir}/data/db.sqlite"
+ userid="dbdeploy"
+ password="dbdeploy"
+ dir="${project.basedir}/data/dbdeploy/deltas"
+/>
+</pre>
+ <p>The above example uses a sqlite database and delta scripts located in dbdeploy/deltas in the project base dir.</p><h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>url</td>
+ <td>String</td>
+ <td>PDO connection url</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>userid</td>
+ <td>String</td>
+ <td>DB userid to use for accessing the changelog table</td>
+ <td>none</td>
+ <td>As required by db</td>
+ </tr>
+ <tr>
+ <td>password</td>
+ <td>String</td>
+ <td>DB password to use for accessing the changelog table</td>
+ <td>none</td>
+ <td>As required by db</td>
+ </tr>
+ <tr>
+ <td>dir</td>
+ <td>String</td>
+ <td>Directory containing dbdeploy delta scripts</td>
+ <td>none</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>outputfile</td>
+ <td>String</td>
+ <td>Filename in which deployment SQL will be generated</td>
+ <td>dbdeploy_deploy.sql</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>undooutputfile</td>
+ <td>String</td>
+ <td>Filename in which undo SQL will be generated</td>
+ <td>dbdeploy_undo.sql</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>deltaset</td>
+ <td>String</td>
+ <td>deltaset to check within db</td>
+ <td>Main</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>lastchangetoapply</td>
+ <td>Integer</td>
+ <td>Highest-numbered delta script to apply to db</td>
+ <td>999</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+ </table>
<h2><a name="ExportPropertiesTask"></a>ExportPropertiesTask</h2>
<p>Exports all defined properties to a specified file.</p>
<h3>Example</h3>
@@ -473,11 +474,1354 @@ file_put_contents('/www/live/testcases/coverage.data', serialize(xdebug_get_code
<td>false</td>
<td>No</td>
</tr>
+ <tr>
+ <td>level</td>
+ <td>String</td>
+ <td>Control the level at which the task reports status messages. One of <em>error</em>, <em>warning</em>, <em>info</em>, <em>verbose</em>, <em>debug</em>.
+ </td>
+ <td><em>verbose</em></td>
+ <td>No</td>
+ </tr>
</tbody>
</table><h3>Supported Nested Tags</h3><ul>
<li>fileset <p>The files to deploy</p></li>
</ul>
+<h2><a name="GitInitTask"></a>GitInitTask</h2>
+<p>Create an empty git repository or reinitialize an existing one.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>bare</td>
+ <td>Boolean</td>
+ <td>Create bare repository. See --bare option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-init.html">git-init</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- Initialize normal repository -->
+<gitinit repository="${repo.dir.resolved}" />
+
+<!-- Initialize bare repository -->
+<gitinit bare="true" repository="${repo.dir.resolved}" />
+</pre>
+
+
+<h2><a name="GitCloneTask"></a>GitCloneTask</h2>
+<p>Clone a repository into a new directory.</p>
+
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>The (possibly remote) repository to clone from.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>targetPath</td>
+ <td>String</td>
+ <td>The name of a new directory to clone into. Cloning into an existing directory is only allowed if the
+ directory is empty.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>bare</td>
+ <td>Boolean</td>
+ <td>Create bare repository. See --bare option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-clone.html">git-clone</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- Clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- Clone bare repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}"
+ bare="true" />
+</pre>
+
+<h2><a name="GitGcTask"></a>GitGcTask</h2>
+<p>Cleanup unnecessary files and optimize the local repository.</p>
+
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>The repository to cleanup.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>aggressive</td>
+ <td>Boolean</td>
+ <td>This option will cause git gc to more aggressively optimize the repository at the expense of taking much
+ more time. See --aggressive option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html">git-gc</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>auto</td>
+ <td>Boolean</td>
+ <td>With this option, git gc checks whether any housekeeping is required; if not, it exits without
+ performing any work. See --auto option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html">git-gc</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>noprune</td>
+ <td>Boolean</td>
+ <td>Do not prune any loose objects. See --no-prune option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html">git-gc</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>prune</td>
+ <td>string</td>
+ <td>Prune loose objects older than date. See --prune option of <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html">git-gc</a>.</td>
+ <td>2.weeks.ago</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- Clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- Cleanup repository-->
+<gitgc
+ repository="${repo.dir.resolved}"
+ aggressive="true"
+ prune="1.week.ago" />
+</pre>
+
+<h2><a name="GitBranchTask"></a>GitBranchTask</h2>
+<p>Create, move or delete repository branches. See official <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">documentation</a> (branch listing functionality is omitted in current implementation).</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>branchname</td>
+ <td>String</td>
+ <td>The name of the branch to create or delete.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>newbranch</td>
+ <td>String</td>
+ <td>The new name for an existing branch.</td>
+ <td>n/a</td>
+ <td>Yes, if branch move invoked</td>
+ </tr>
+ <tr>
+ <td>startpoint</td>
+ <td>String</td>
+ <td>The new branch head will point to this commit. It may be given as a branch name, a commit-id, or a tag. If this option is omitted, the current HEAD will be used instead. See <start-point> argument of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">git-branch</a>.</td>
+ <td></td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>setupstream</td>
+ <td>String</td>
+ <td>If specified branch does not exist yet or if --force has been given, acts exactly like --track. Otherwise sets up configuration like --track would when creating the branch, except that where branch points to is not changed. See --set-upstream option of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">git-branch</a>.</td>
+ <td></td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>track</td>
+ <td>Boolean</td>
+ <td>See --track option of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">git-branch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>notrack</td>
+ <td>Boolean</td>
+ <td>See --no-track option of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html">git-branch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>Reset <branchname> to <startpoint> if <branchname> exists already. Without -f git branch refuses to change an existing branch. </td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>move</td>
+ <td>Boolean</td>
+ <td>Move/rename a branch and the corresponding reflog.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>forcemove</td>
+ <td>Boolean</td>
+ <td>Move/rename a branch even if the new branch name already exists.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>delete</td>
+ <td>Boolean</td>
+ <td>Delete a branch. The branch must be fully merged in its upstream branch, or in HEAD if no upstream was set with --track or --set-upstream. </td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>forcedelete</td>
+ <td>Boolean</td>
+ <td>Delete a branch irrespective of its merged status.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- Initialize normal repository -->
+<gitinit repository="${repo.dir.resolved}" />
+
+<!-- Create branch "sample-branch" tracking current HEAD -->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="sample-branch" />
+
+<!--
+Create branch "sample-branch" tracking origin/master
+Note that you can omit both startpoint and track attributes in this case
+-->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="sample-branch"
+ startpoint="origin/master"
+ track="true" />
+
+<!-- Delete fully merged branch "sample-branch" -->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="sample-branch"
+ delete="true" />
+
+<!-- Force delete even unmerged branch "sample-branch" -->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="sample-branch"
+ forcedelete="true" />
+
+<!-- Renabe "branch1" to "branch2" -->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="branch1"
+ newbranch="branch2"
+ move="true" />
+
+</pre>
+
+<h2><a name="GitFetchTask"></a>GitFetchTask</h2>
+<p>Download objects and refs from another repository. See official <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>source</td>
+ <td>String</td>
+ <td>The "remote" repository that is the source of a fetch or pull operation. See <repository> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>origin</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>refspec</td>
+ <td>String</td>
+ <td>See <refspec> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td></td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>group</td>
+ <td>String</td>
+ <td>A name referring to a list of repositories as the value of remotes.<group> in the configuration file. See <group> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td></td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>quiet</td>
+ <td>Boolean</td>
+ <td>Silence any internally used git commands. Progress is not reported to the standard error stream. See --quiet in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>all</td>
+ <td>Boolean</td>
+ <td>Fetch all remotes. See --all in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>keep</td>
+ <td>Boolean</td>
+ <td>Keep downloaded pack. See --keep in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>prune</td>
+ <td>Boolean</td>
+ <td>After fetching, remove any remote tracking branches which no longer exist on the remote. See --prune in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>tags</td>
+ <td>Boolean</td>
+ <td>See --tags in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>notags</td>
+ <td>Boolean</td>
+ <td>See --no-tags in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>When git fetch is used with <rbranch>:<lbranch> refspec, it refuses to update the local branch <lbranch> unless the remote branch <rbranch> it fetches is a descendant of <lbranch>. This option overrides that check. See --force in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html">git-fetch</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- Initialize normal repository -->
+<gitinit repository="${repo.dir.resolved}" />
+
+<!-- Fetch objects from all remotes -->
+<gitfetch
+ repository="${repo.dir.resolved}" all="true" />
+
+<!-- Fetch from origin/master to "refspec-branch" local branch -->
+<gitfetch
+ repository="${repo.dir.resolved}"
+ source="origin"
+ refspec="master:refspec-branch"
+ quiet="true" />
+</pre>
+
+<h2><a name="GitCheckoutTask"></a>GitCheckoutTask</h2>
+<p>Checkout a branch or paths to the working tree. See official <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>branchname</td>
+ <td>String</td>
+ <td>Branch to checkout. See <branch> in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>origin</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>startpoint</td>
+ <td>String</td>
+ <td>The name of a commit at which to start the new branch; Defaults to HEAD. See <start_point> in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td></td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>create</td>
+ <td>Boolean</td>
+ <td>Create a new branch named <branchname> and start it at <startpoint></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>forcecreate</td>
+ <td>Boolean</td>
+ <td>Creates the branch <branchname> and start it at <startpoint>; if it already exists, then
+ reset it to <startpoint>. This is equivalent to running "git branch" with "-f".</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>merge</td>
+ <td>Boolean</td>
+ <td>See --merge in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>track</td>
+ <td>Boolean</td>
+ <td>See --track in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>notrack</td>
+ <td>Boolean</td>
+ <td>See --no-track in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>quiet</td>
+ <td>Boolean</td>
+ <td>Quiet, suppress feedback messages. See --quiet in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>When switching branches, proceed even if the index or the working tree differs from HEAD. This is used
+ to throw away local changes. See --force in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html">git-checkout</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- create and switch to "mybranch" branch -->
+<gitcheckout
+ repository="${repo.dir.resolved}"
+ branchname="mybranch" quiet="true" create="true" />
+
+<!-- get back to "master" branch -->
+<gitcheckout
+ repository="${repo.dir.resolved}"
+ branchname="master" quiet="true" />
+
+<!-- create (force) already created branch -->
+<gitcheckout
+ repository="${repo.dir.resolved}"
+ branchname="mybranch" quiet="true"
+ forceCreate="true" />
+</pre>
+
+<h2><a name="GitMergeTask"></a>GitMergeTask</h2>
+<p>Join two or more development histories together. See official <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>remote</td>
+ <td>String</td>
+ <td>Space separated list of branches to merge into current HEAD.
+ See <commit> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>message</td>
+ <td>String</td>
+ <td>Commit message to be used for the merge commit (in case one is created).
+ See <msg> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>fastForwardCommit</td>
+ <td>Boolean</td>
+ <td>If set false (default), will not generate a merge commit if the merge resolved as a fast-forward, only update the branch pointer.<br />
+ If set true, will generate a merge commit even if the merge resolved as a fast-forward.
+ See --ff/--no-ff options in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>False</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>strategy</td>
+ <td>String</td>
+ <td>Merge strategy. One of "resolve", "recursive", "octopus", "ours", or "subtree".
+ See <strategy> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>strategyOption</td>
+ <td>String</td>
+ <td>Pass merge strategy specific option through to the merge strategy.
+ See <strategy-option> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>commit</td>
+ <td>Boolean</td>
+ <td>See --commit in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>nocommit</td>
+ <td>Boolean</td>
+ <td>See --no-commit in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>quiet</td>
+ <td>Boolean</td>
+ <td>Quiet, suppress feedback messages. See --quiet in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-merge.html">git-merge</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- create couple of test branches -->
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+<gitbranch
+ repository="${repo.dir.resolved}"
+ branchname="merge-test-2" startpoint="origin/master" />
+
+<!-- Merge those branches back into master -->
+<gitmerge
+ repository="${repo.dir.resolved}"
+ remote="merge-test-1 merge-test-2"
+ message="merging repos" commit="true" />
+</pre>
+
+<h2><a name="GitPullTask"></a>GitPullTask</h2>
+<p>Fetch from and merge with another repository or a local branch. See official <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>all</td>
+ <td>Boolean</td>
+ <td>Fetch all remotes</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>source</td>
+ <td>String</td>
+ <td>The "remote" repository that is the source of a fetch or pull operation.
+ See <repository> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>origin</td>
+ <td>Yes, if allRemotes set to false</td>
+ </tr>
+ <tr>
+ <td>refspec</td>
+ <td>String</td>
+ <td>See <refspec> in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>strategy</td>
+ <td>String</td>
+ <td>Merge strategy. One of "resolve", "recursive", "octopus", "ours", or "subtree".
+ See <strategy> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>strategyOption</td>
+ <td>String</td>
+ <td>Pass merge strategy specific option through to the merge strategy.
+ See <strategy-option> in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>rebase</td>
+ <td>Boolean</td>
+ <td>See --rebase in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>norebase</td>
+ <td>Boolean</td>
+ <td>See --no-rebase in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>tags</td>
+ <td>Boolean</td>
+ <td>Enable tag references following. See --tags in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>notags</td>
+ <td>Boolean</td>
+ <td>Disable tag references following. See --no-tags in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>keepFiles</td>
+ <td>Boolean</td>
+ <td>See --keep in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>append</td>
+ <td>Boolean</td>
+ <td>See --append in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>quiet</td>
+ <td>Boolean</td>
+ <td>Quiet, suppress feedback messages. See --quiet in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>Force update. See --force in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-pull.html">git-pull</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- pull from all remotes -->
+<gitpull
+ repository="${repo.dir.resolved}" all="true" />
+
+<!-- pull remote origin/foobranch and rebase when merging -->
+<gitpull
+ repository="${repo.dir.resolved}"
+ source="origin" refspec="foobranch"
+ strategy="recursive" keep="true"
+ force="true" quiet="true" rebase="true" />
+</pre>
+
+
+<h2><a name="GitPushTask"></a>GitPushTask</h2>
+<p>Update remote refs along with associated objects. See official <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>all</td>
+ <td>Boolean</td>
+ <td>Push all references</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>destination</td>
+ <td>String</td>
+ <td>The "remote" repository that is destination of a push operation.
+ See <repository> in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>origin</td>
+ <td>Yes, if allRemotes set to false</td>
+ </tr>
+ <tr>
+ <td>refspec</td>
+ <td>String</td>
+ <td>See <refspec> in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>mirror</td>
+ <td>Boolean</td>
+ <td>See --mirror in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>delete</td>
+ <td>Boolean</td>
+ <td>Delete "remote" reference. Same as prefixing the refspec with colon. See --delete in <a href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>tags</td>
+ <td>Boolean</td>
+ <td>Push all references under refs/tags. See --tags in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>quiet</td>
+ <td>Boolean</td>
+ <td>Quiet, suppress feedback messages. See --quiet in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>Force update. See --force in <a
+ href="http://www.kernel.org/pub/software/scm/git/docs/git-push.html">git-push</a>.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<!-- push branch "master" into "foobranch" on "origin" remote -->
+<gitpush
+ repository="${repo.dir.resolved}"
+ refspec="master:foobranch" tags="true" />
+
+<!-- create new branch "newbranch" on "origin" remote -->
+<gitpush
+ repository="${repo.dir.resolved}"
+ refspec="master:newbranch" quiet="true" />
+
+<!-- delete "newbranch" branch from "origin" remote -->
+<gitpush
+ repository="${repo.dir.resolved}"
+ delete="true"
+ refspec="newbranch" quiet="true" />
+</pre>
+
+<h2><a name="GitTagTask"></a>GitTagTask</h2>
+<p>Create, list, delete or verify a tag object signed with GPG. See official
+<a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>message</td>
+ <td>String</td>
+ <td>Use given tag message.
+ See -m of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>name</td>
+ <td>String</td>
+ <td>Tag name</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>commit</td>
+ <td>String</td>
+ <td><commit> argument to git-tag</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>object</td>
+ <td>String</td>
+ <td><object> argument to git-tag</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>pattern</td>
+ <td>String</td>
+ <td><pattern> argument to git-tag</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>outputProperty</td>
+ <td>String</td>
+ <td>Property name to set with output value from git-tag</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>file</td>
+ <td>String</td>
+ <td>Take tag message from given file.
+ See -F of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>annotate</td>
+ <td>Boolean</td>
+ <td>Make unsigned, annotated tag object.
+ See -a of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>Boolean</td>
+ <td>Replace existing tag with given name.
+ See -f of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>delete</td>
+ <td>Boolean</td>
+ <td>Delete existing tags with given names.
+ See -d of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>list</td>
+ <td>Boolean</td>
+ <td>List tags with names matching given pattern.
+ See -l of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>num</td>
+ <td>Integer</td>
+ <td>Specifies how many lines from the annotation, if any, are printed when using -l.
+ See -n of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>contains</td>
+ <td>String</td>
+ <td>Only list tags containing specified commit.
+ See --contains of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>sign</td>
+ <td>Boolean</td>
+ <td>Make GPG-signed tag.
+ See -a of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>keySign</td>
+ <td>String</td>
+ <td>Make GPG-signed tag, using given key.
+ See -u of git-tag of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>verify</td>
+ <td>Boolean</td>
+ <td>Verify GPG signature of given tag names.
+ See -v of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html">git-tag</a></td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+
+<gittag repository="${repo.dir.resolved}" name="ver1.0" />
+<!-- Force duplicate tag creation -->
+<gittag
+ repository="${repo.dir.resolved}"
+ name="ver1.0" force="true"/>
+<!-- Create tag with annotation and message -->
+<gittag
+ repository="${repo.dir.resolved}"
+ name="ver1.0"
+ annotate="true" message="Version 1.0 tag"/>
+<!-- Delete tag -->
+<gittag
+ repository="${repo.dir.resolved}"
+ name="ver2.0" delete="true" />
+<!-- List tags matching to pattern "marked" into "tags" variable -->
+<gittag repository="${repo.dir.resolved}"
+ list="true"
+ outputProperty="tags"
+ pattern="marked" />
+</pre>
+
+<h2><a name="GitLogTask"></a>GitLogTask</h2>
+<p>Show commit logs. See official
+<a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html">documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>gitPath</td>
+ <td>String</td>
+ <td>Path to Git binary</td>
+ <td>/usr/bin/git</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repository</td>
+ <td>String</td>
+ <td>Path to Git repository</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>paths</td>
+ <td>String</td>
+ <td><path> arguments to git-log. Accepts one or more paths delimited by PATH_SEPARATOR</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>outputProperty</td>
+ <td>String</td>
+ <td>Property name to set with output value from git-log</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>format</td>
+ <td>String</td>
+ <td>Commit format. See --format of git-log. Can be one of <i>oneline</i>, <i>short</i>, <i>medium</i>,
+ <i>full</i>, <i>fuller</i>, <i>email</i>, <i>raw</i> and <i>format:<string></i></td>
+ <td>medium</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>date</td>
+ <td>String</td>
+ <td>Date format. See --date of git-log.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>since</td>
+ <td>String</td>
+ <td><since> argument to git-log.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>until</td>
+ <td>String</td>
+ <td><until> argument to git-log.</td>
+ <td>HEAD</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>stat</td>
+ <td>String</td>
+ <td>Generate a diffstat. See --stat of git-log</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>nameStatus</td>
+ <td>Boolean</td>
+ <td>Names + status of changed files. See --name-status of git-log.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>maxCount</td>
+ <td>Integer</td>
+ <td>Number of commits to show. See -<n>|-n|--max-count of git-log.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>noMerges</td>
+ <td>boolean</td>
+ <td>Don't show commits with more than one parent. See --no-merges of git-log.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Example</h3>
+<pre>
+<property name="repo.dir" value="./relative/path/to/repo" />
+<resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" />
+
+<!-- clone repository -->
+<gitclone
+ repository="git://github.com/path/to/repo/repo.git"
+ targetPath="${repo.dir.resolved}" />
+<!-- write git-log output to "logs" variable -->
+<gitlog
+ paths="${repo.dir.resolved}"
+ format="oneline"
+ maxCount="2"
+ stat="true"
+ noMerges="false"
+ since="Sun Jan 23 23:55:42 2011 +0300"
+ until="Mon Jan 24 09:59:33 2011 +0300"
+ outputProperty="logs"
+ repository="${repo.dir.resolved}" />
+</pre>
+
+<h2><a name="HttpGetTask"></a>HttpGetTask</h2>
+ <p>This task will download a file through HTTP GET and save it to a specified directory. You need an installed version of HTTP_Request2 to use this task.</p>
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>url</td>
+ <td>String</td>
+ <td>The request URL</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>dir</td>
+ <td>String</td>
+ <td>The directory to save the file</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>filename</td>
+ <td>String</td>
+ <td>The filename for the downloaded file</td>
+ <td>The filename part of the URL</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+ </table>
+ <h3>Example</h3>
+<pre>
+ <httpget url="http://buildserver.com/builds/latest.stable.tar.bz2" dir="/usr/local/lib"/>
+</pre>
+
<h2><a name="HttpRequestTask"></a>HttpRequestTask</h2>
<p>This task will make an HTTP request to the provided URL and match the response against the provided regular expression. If an regular expression is provided and doesn't match the build will fail. You need an installed version of HTTP_Request2 to use this task.</p>
<h3>Attributes</h3><table>
@@ -1009,6 +2353,56 @@ file_put_contents('/www/live/testcases/coverage.data', serialize(xdebug_get_code
<li>fileset <p>JavaScript files to be minified.</p></li>
</ul>
+ <h2><a name="MailTask"></a>MailTask</h2>
+ <p>A task to send email.</p>
+
+ <h3>Example</h3>
+ <pre><mail tolist="user at example.org" subject="build complete"">The build process is a success...</mail></pre>
+
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>from</td>
+ <td>String</td>
+ <td>Email address of sender.</td>
+ <td>none</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>tolist</td>
+ <td>String</td>
+ <td>Comma-separated list of recipients.</td>
+ <td>none</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>message</td>
+ <td>String</td>
+ <td>Message to send in the body of the email.</td>
+ <td>none</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>subject</td>
+ <td>String</td>
+ <td>Email subject line.</td>
+ <td>none</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+ </table><h3>Supported Nested Tags</h3><ul>
+ <li>fileset <p>JavaScript files to be minified.</p></li>
+ </ul>
+
<h2><a name="PatchTask"></a>PatchTask</h2>
<p>
The <em>PatchTask</em> uses the <a href="http://savannah.gnu.org/projects/patch"
@@ -1315,7 +2709,7 @@ to be executed using the same PDO connection and commit operation in between.</p
</li>
</ul><h2><a name="PearPackageTask"></a> PearPackageTask</h2><p> With the PearPackageTask, you can create a package.xml which can be installed using the PEAR installer. Use this in conjunction with the <a
href="#Tasks.TarTask"
- >TarTask</a> to completely script the building of a PEAR pacakge. </p>
+ >TarTask</a> to completely script the building of a PEAR package. </p>
<p><strong>Note that this task creates a <em>version 1</em> package.xml file.</strong></p>
<p>This task uses the <code>PEAR_PackageFileManager</code> class.
@@ -1393,9 +2787,9 @@ to be executed using the same PDO connection and commit operation in between.</p
<h2><a name="PearPackage2Task"></a>PearPackage2Task</h2><p> With the PearPackage2Task, you can create a <em>version 2</em> package.xml which can be installed using the PEAR installer. Use this in conjunction with the <a
href="#Tasks.TarTask"
- >TarTask</a> to completely script the building of a PEAR pacakge. </p><p> This task uses the PEAR_PackageFileManager2 class. In order to be maximally flexible, the majority of options are set generically (using <em><option></em> tag) and are set using PEAR_PackageFileManager::setOptions(). Use the <em><mapping></em> tag to represent complex values. </p><p> Note that Travis Swicegood has created a more complete implementation of this functionality which can be found here: <a
- href="http://pear.domain51.com/index.php?package=Phing_d51PearPkg2Task"
- >http://pear.domain51.com/index.php?package=Phing_d51PearPkg2Task</a>. </p><h3>Example</h3>
+ >TarTask</a> to completely script the building of a PEAR package. </p><p> This task uses the PEAR_PackageFileManager2 class. In order to be maximally flexible, the majority of options are set generically (using <em><option></em> tag) and are set using PEAR_PackageFileManager::setOptions(). Use the <em><mapping></em> tag to represent complex values. </p><p> Note that Travis Swicegood has created a more complete implementation of this functionality which can be found here: <a
+ href="http://pear.domain51.com/"
+ >pear.domain51.com</a>. </p><h3>Example</h3>
<pre><pearpkg2 name="phing" dir="${build.src.dir}">
<option name="outputdirectory" value="./build"/><br/> <option name="packagefile" value="package2.xml"/><br/> <option name="packagedirectory" value="./${build.dist.dir}"/><br/> <option name="baseinstalldir" value="${pkg.prefix}"/><br/> <option name="channel" value="my.pear-channel.com"/><br/> <option name="summary" value="${pkg.summary}"/><br/> <option name="description" value="${pkg.description}"/><br/> <option name="apiversion" value="${pkg.version}"/><br/> <option name="apistability" value="beta"/><br/> <option name="releaseversion" value="${pkg.version}"/><br/> <option name="releasestability" value="beta"/><br/> <option name="license" value="none"/><br/> <option name="phpdep" value="5.0.0"/><br/> <option name="pearinstallerdep" value="1.4.6"/><br/> <option name="packagetype" value="php"/><br/> <option name="notes" value="${pkg.relnotes}"/><br/> <mapping name="maintainers"><br/> <element><br/> <element key="handle" value="hlellelid"/><br/> <element key="name" value="Hans"/><br/> <element key="email" value="hans at xmpl.org"/><br/> <element key="role" value="lead"/><br/> </element><br/> </mapping><br/></pearpkg2></pre>
<h3>Attributes</h3><table>
@@ -1541,6 +2935,12 @@ to be executed using the same PDO connection and commit operation in between.</p
<ul>
<li>
deps (optional)
+ <br />
+ see <a
+ href="http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.adddependency.php">PEAR_PackageFileManager::addDependency()</a>
+ for more info
+ <br />
+ <br />
<table>
<thead>
@@ -1591,8 +2991,65 @@ to be executed using the same PDO connection and commit operation in between.</p
</tbody>
</table>
</li>
+ <li>
+ extdeps (optional)
+ <br />
+ see <a
+ href="http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.adddependency.php">PEAR_PackageFileManager::addDependency()</a>
+ for more info
+ <br />
+ <br />
+
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>name</td>
+ <td>String</td>
+ <td>Package name.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>version</td>
+ <td>String</td>
+ <td>Minimal version.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>max</td>
+ <td>String</td>
+ <td>Maximum version.</td>
+ <td>Same as version.</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>recommended</td>
+ <td>String</td>
+ <td>Recommended version.</td>
+ <td>Same as version.</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+ </table>
+ </li>
<li>
maintainers (required at least one)
+ <br />
+ see <a
+ href="http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.addmaintainer.php">PEAR_PackageFileManager::addMaintainer()</a>
+ for more info
+ <br />
+ <br />
<table>
<thead>
@@ -1636,6 +3093,57 @@ to be executed using the same PDO connection and commit operation in between.</p
</tbody>
</table>
</li>
+ <li>
+ replacements (optional)
+ <br />
+ see <a
+ href="http://pear.php.net/manual/en/package.pear.pear-packagefilemanager.pear-packagefilemanager.addreplacement.php">PEAR_PackageFileManager::addReplacement()</a>
+ for more info
+ <br />
+ <br />
+
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>path</td>
+ <td>String</td>
+ <td>Relative path of file.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>type</td>
+ <td>String</td>
+ <td>Variable type, either php-const, pear-config or package-info.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>from</td>
+ <td>String</td>
+ <td>Text to replace in the source file.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>to</td>
+ <td>String</td>
+ <td>Variable name to use for replacement.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ </tbody>
+ </table>
+ </li>
</ul>
</li>
</ul>
@@ -2336,13 +3844,6 @@ It also generates the documentation for the selected coding standard and writes
<td>No</td>
</tr>
<tr>
- <td>optimization</td>
- <td>String</td>
- <td>Which optimization strategy should be choosen (best, none) ?</td>
- <td>best</td>
- <td>No</td>
- </tr>
- <tr>
<td>debug</td>
<td>Boolean</td>
<td>Enable debug output?</td>
@@ -3000,6 +4501,164 @@ It also generates the documentation for the selected coding standard and writes
styledir="/home/phing/etc"/>
</pre>
<p>Generates a framed report in the directory <em>reports/tests</em> using the file <em>reports/testsuites.xml</em> as input.</p><p><b>Important note:</b> testclasses that are not explicitly placed in a package (by using a '@package' tag in the class-level DocBlock) are listed under the "default" package.</p>
+
+ <h2><a name="S3PutTask"></a>S3PutTask</h2>
+ <p>Uploads an object to Amazon S3. This task requires the PEAR package <a href="http://pear.php.net/package/Services_Amazon_S3" title="Services_Amazon_S3" target="_blank">Services_Amazon_S3</a></p>
+ <h3>Examples</h3>
+ <p>Uploading a file</p>
+ <pre><s3put source="/path/to/file.txt" object="file.txt" bucket="mybucket" key="AmazonKey" secret="AmazonSecret" /></pre>
+ <p>You can also define "bucket, key, secret" outside of the task call:</p>
+ <pre>
+<property name="amazon.key" value="my_key" />
+<property name="amazon.secret" value="my_secret" />
+<property name="amazon.bucket" value="mybucket" />
+
+<s3put source="/path/to/file.txt" object="file.txt" />
+ </pre>
+ <p>You can also specify inline content instead of a file to upload:</p>
+ <pre>
+<property name="amazon.key" value="my_key" />
+<property name="amazon.secret" value="my_secret" />
+<property name="amazon.bucket" value="mybucket" />
+
+<s3put content="Some content here" object="file.txt" />
+ </pre>
+ <p>It also works with filesets</p>
+ <pre>
+<property name="amazon.key" value="my_key" />
+<property name="amazon.secret" value="my_secret" />
+<property name="amazon.bucket" value="mybucket" />
+<s3put>
+ <fileset dir="${project.basedir}">
+ <include name="**/*.jpg" />
+ </fileset>
+</s3put>
+ </pre>
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>key</td>
+ <td>String</td>
+ <td>Amazon S3 key</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.key)</td>
+ </tr>
+ <tr>
+ <td>secret</td>
+ <td>String</td>
+ <td>Amazon S3 secret</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.secret)</td>
+ </tr>
+ <tr>
+ <td>bucket</td>
+ <td>String</td>
+ <td>Bucket to store the object in</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.bucket)</td>
+ </tr>
+ <tr>
+ <td>content</td>
+ <td>String</td>
+ <td>Content to store in the object</td>
+ <td>n/a</td>
+ <td>Yes (or source or fileset)</td>
+ </tr>
+ <tr>
+ <td>source</td>
+ <td>String</td>
+ <td>Where to read content for the object from</td>
+ <td>n/a</td>
+ <td>Yes (or content or fileset)</td>
+ </tr>
+ <tr>
+ <td>object</td>
+ <td>String</td>
+ <td>Object name</td>
+ <td>n/a</td>
+ <td>Yes (unless fileset)</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h3>Supported Nested Tags</h3>
+ <ul>
+ <li>fileset</li>
+ </ul>
+
+ <h2><a name="S3GetTask"></a>S3GetTask</h2>
+ <p>Downloads an object from Amazon S3. This task requires the PEAR package <a href="http://pear.php.net/package/Services_Amazon_S3" title="Services_Amazon_S3" target="_blank">Services_Amazon_S3</a></p>
+ <h3>Examples</h3>
+ <p>Downloading an object</p>
+ <pre>
+<s3get object="file.txt" target="${project.basedir}" bucket="mybucket" key="AmazonKey" secret="AmazonSecret" />
+ </pre>
+ <p>You can also define "bucket, key, secret" outside of the task call:</p>
+ <pre>
+<property name="amazon.key" value="my_key" />
+<property name="amazon.secret" value="my_secret" />
+<property name="amazon.bucket" value="mybucket" />
+
+<s3get object="file.txt" target="${project.basedir}" />
+ </pre>
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>key</td>
+ <td>String</td>
+ <td>Amazon S3 key</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.key)</td>
+ </tr>
+ <tr>
+ <td>secret</td>
+ <td>String</td>
+ <td>Amazon S3 secret</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.secret)</td>
+ </tr>
+ <tr>
+ <td>bucket</td>
+ <td>String</td>
+ <td>Bucket containing the object</td>
+ <td>n/a</td>
+ <td>Yes (or defined before task call as: amazon.bucket)</td>
+ </tr>
+ <tr>
+ <td>object</td>
+ <td>String</td>
+ <td>Object name</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>target</td>
+ <td>String</td>
+ <td>Where to store the object after download</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ </tbody>
+ </table>
+
<h2><a name="ScpTask"></a>ScpTask</h2><p> The <em>ScpTask</em> copies files to and from a remote host using scp. This task requires the <a href="http://pecl.php.net/package/ssh2" target="_blank">PHP SSH2 extension</a> to function.</p>
<h3>Examples</h3>
<pre><scp username="john" password="smith"
@@ -3743,6 +5402,13 @@ host="webserver" command="ls" /></pre>
<td>No</td>
</tr>
<tr>
+ <td>lastChanged</td>
+ <td>Boolean</td>
+ <td>Sets whether to store actual last changed revision of the directory/file mentioned</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
<td>forceCompatible</td>
<td>Boolean</td>
<td>Sets whether to force compatibility with older SVN versions (< 1.2)</td>
@@ -3823,7 +5489,151 @@ host="webserver" command="ls" /></pre>
<td>No</td>
</tr>
</tbody>
- </table><h2><a name="TarTask"></a>TarTask</h2><p> The <em>TarTask</em> creates a tarball from a fileset or directory.</p><h3>Examples</h3>
+ </table><h2><a name="SvnSwitchTask"></a>SvnSwitchTask</h2><p> The <em>SvnSwitchTask</em> changes a local directory from one repository to another.</p><h3>Examples</h3>
+ <pre><svnswitch
+ svnpath="/usr/bin/svn"
+ username="anony"
+ password="anony"
+ nocache="true"
+ repositoryurl="http://svn.phing.info/tags/2.4.2"
+ todir="/home/user/svnwc"/>
+</pre>
+ <pre><svnswitch
+ svnpath="C:/Subversion/bin/svn.exe"
+ repositoryurl="http://svn.phing.info/tags/2.4.2"
+ todir="C:/projects/svnwc"/>
+</pre>
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>svnpath</td>
+ <td>String</td>
+ <td>Path to Subversion binary</td>
+ <td>/usr/bin/svn</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>repositoryurl</td>
+ <td>String</td>
+ <td>URL of remote repository</td>
+ <td>none</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>todir</td>
+ <td>String</td>
+ <td>Path to the checked out project</td>
+ <td>none</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>username</td>
+ <td>String</td>
+ <td>A username used to connect to the SVN server</td>
+ <td>none</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>password</td>
+ <td>String</td>
+ <td>A password used to connect to the SVN server</td>
+ <td>none</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>nocache</td>
+ <td>Boolean</td>
+ <td>Connection credentials will not be cached</td>
+ <td>False</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>recursive</td>
+ <td>Boolean</td>
+ <td>Recursive behavior</td>
+ <td>True</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>ignoreexternals</td>
+ <td>Boolean</td>
+ <td>Ignore externals definitions</td>
+ <td>False</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h2><a name="SymlinkTask"></a>SymlinkTask</h2>
+ <p>Creates symlink(s) to a specified file / directory or a collection of files / directories.</p>
+ <h3>Examples</h3>
+ <p>Single symlink</p>
+ <pre><symlink target="/path/to/original/file" link="/where/to/symlink" /></pre>
+ <p>Using filesets</p>
+ <pre>
+<symlink link="/where/to/symlink">
+ <fileset dir="/some/directory">
+ <include name="*" />
+ </fileset>
+</symlink>
+ </pre>
+ <p>
+ In the fileset example, assuming the contents of "/some/directory" were:
+ </p>
+ <ul>
+ <li>Somedir</li>
+ <li>somefile</li>
+ </ul>
+ <p>
+ Then the contents of "/where/to/symlink" would be:
+ </p>
+ <ul>
+ <li>Somedir -> /some/directory/Somedir</li>
+ <li>somefile -> /some/directory/somefile</li>
+ </ul>
+ <h3>Attributes</h3><table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>target</td>
+ <td>String</td>
+ <td>What you're trying to symlink from</td>
+ <td>n/a</td>
+ <td>Yes (or nested FileSet)</td>
+ </tr>
+ <tr>
+ <td>link</td>
+ <td>String</td>
+ <td>Where you'd like the symlink(s)</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <h3>Supported Nested Tags</h3>
+ <ul>
+ <li>fileset</li>
+ </ul>
+
+<h2><a name="TarTask"></a>TarTask</h2><p> The <em>TarTask</em> creates a tarball from a fileset or directory.</p><h3>Examples</h3>
<pre><tar destfile="phing.tar" compression="gzip">
<fileset dir=".">
<include name="**/**" />
@@ -4026,6 +5836,13 @@ host="webserver" command="ls" /></pre>
<td>n/a</td>
<td>No</td>
</tr>
+ <tr>
+ <td>haltonfailure</td>
+ <td>Boolean</td>
+ <td>Stops the build when validation fails</td>
+ <td>true</td>
+ <td>No</td>
+ </tr>
</tbody>
</table><h3>Supported Nested Tags</h3><ul>
<li>fileset</li>
@@ -4185,7 +6002,336 @@ a2.a3.a4=false</pre>
</fileset>
</zendcodeanalyzer>
</pre>
- <p>Analyze a set of PHP source files and disable a few warnings.</p><p><b>NOTE:</b> the <em>analyze</em> tag has been deprecated as of Phing 2.4.</p><h2><a
+ <p>Analyze a set of PHP source files and disable a few warnings.</p><p><b>NOTE:</b> the <em>analyze</em> tag has been deprecated as of Phing 2.4.</p>
+
+<h2><a name="ZendGuardEncodeTask"></a>ZendGuardEncodeTask</h2>
+<p>The <em>ZendGuardEncodeTask</em> is a wrapper for
+ZendGuard zendenc executable. It pre-compiles the PHP code which
+improves speed and can prevent unauthorized code modification.
+Additionally it allows signing or licensing the code so it can only be
+used with a valid license. </p>
+<p>For more information about ZendGuard encode
+parameters see the <a
+ href="http://static.zend.com/topics/Zend-Guard-User-Guidev5x.pdf">ZendGuard
+documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead> <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead> <tbody>
+ <tr>
+ <td>zendEncoderPath</td>
+ <td>String</td>
+ <td>Path to zendenc or zendenc5 binary.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>deleteSource</td>
+ <td>Boolean</td>
+ <td>Whether to delete the original file and replace with
+encoded.</td>
+ <td>true</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>renameSourceExt</td>
+ <td>String</td>
+ <td>If defined the original file will be copied
+to originalfile.renameSourceExt before encoding. This property
+overrides the deleteSource property.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>shortTags</td>
+ <td>Boolean</td>
+ <td>Turns on/off support for PHP short tags (<?).
+True to enable support.</td>
+ <td>true</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>aspTags</td>
+ <td>Boolean</td>
+ <td>Turns on/off support for ASP tags (<%). True to
+enable support.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>noHeader</td>
+ <td>Boolean</td>
+ <td>Disables the PHP-compatible header that is added to the
+top of every encoded file by default and is displayed if the Zend
+Optimizer is not properly installed.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>useCrypto</td>
+ <td>Boolean</td>
+ <td>Enables cryptography support.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>encodedOnly</td>
+ <td>Boolean</td>
+ <td>If enabled the encoded files will only work with other
+encoded files ( I.e. encoded and not-encoded files cannot be used
+together).</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>forceEncode</td>
+ <td>Boolean</td>
+ <td>Allow encoding previously encoded files. Not
+recommended.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>expires</td>
+ <td>String</td>
+ <td>Make an encoded file to expire on the given data. Date
+is in yyyy-mm-dd format.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>obfuscationLevel</td>
+ <td>Integer</td>
+ <td>Level of obfuscation. Defaults to 0 (no
+obfuscation). </td>
+ <td>0</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>optMask</td>
+ <td>Integer</td>
+ <td>Optimization mask. Integer representing a bit mask.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>privateKeyPath</td>
+ <td>String</td>
+ <td>Path to the company private key. This is required when
+either signProduct or licenseProduct is enabled.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>licenseProduct</td>
+ <td>Boolean</td>
+ <td>Enabled product licensing. The encoded files won't work
+without a valid license. If enabled privateKeyPath property also needs
+to be defined.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>signProduct</td>
+ <td>Boolean</td>
+ <td>Enabled product signing. If signing is enabled the
+files will be encoded with license support. However valid license won't
+be required for the files to work. If enabled privatKeyPath property
+also needs to be defined.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>productName</td>
+ <td>String</td>
+ <td>Name of the product. This must match the product name
+in the license and is required when either licenseProduct or
+signProduct is enabled.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>prologFile</td>
+ <td>String</td>
+ <td>Path to a file containing a text that will be prepended
+to each encoded file and displayed in case the Zend Optimizer is not
+installed.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<h3>Supported Nested Tags</h3>
+<ul>
+ <li>fileset</li>
+</ul>
+<h3>Example</h3>
+<pre><zendguardencode<br /> shortTags="false"<br /> productName="Phing"<br /> privateKeyPath="/var/data/phing.key"<br /> licenseProduct="true"<br /> zendEncoderPath="/usr/local/Zend/ZendGuard-5_0_1/bin/zendenc5"<br /> ><br /><br /> <fileset dir="src"><br /> <include name="**/*.php" /><br /> <exclude name="cache/**" /><br /> <exclude name="plugins/**" /><br /> </fileset><br /> <br /> <fileset dir="src"><br /> <include name="plugins/cs*/**/*.php" /><br /> <include name="plugins/cs*/*.php" /><br /> </fileset><br /></zendguardencode><br /></pre>
+<p>Encode all php files in the current directory and
+subdirectories. Exlude everything in cache/ and plugins/ but include
+everything in plugins that starts with cs.</p>
+<p></p>
+<h2><a name="ZendGuardLicenseTask"></a>ZendGuardLicenseTask</h2>
+<p>The <em>ZendGuardLicenseTask</em> is a wrapper
+for
+ZendGuard zendenc_sign executable. It generates ZendGuard
+license either from a license template file or from the defined
+properties.</p>
+<p>For more information about ZendGuard sign
+parameters see the <a
+ href="http://static.zend.com/topics/Zend-Guard-User-Guidev5x.pdf">ZendGuard
+documentation</a>.</p>
+<h3>Attributes</h3>
+<table>
+ <thead> <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead> <tbody>
+ <tr>
+ <td>zendsignPath</td>
+ <td>String</td>
+ <td>Path to zendenc_sign binary.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>privateKeyPath</td>
+ <td>String</td>
+ <td>Path to the company private key. </td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>outputFile</td>
+ <td>String</td>
+ <td>Path where should the license be generated.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>licenseTemplate</td>
+ <td>String</td>
+ <td>Path to a license template file. If defined
+all other licensing properties will be ignored (even if they are
+otherwise required).</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>productName</td>
+ <td>String</td>
+ <td>Name of the product. This has to match the product name
+that was used to encode the files (see ZendGuardEncodeTask).</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>registeredTo</td>
+ <td>String</td>
+ <td>Name to which the product will be registered to.</td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>expires</td>
+ <td>Mixed</td>
+ <td>This allows to define when the license will expire.
+ The license can be issued so it either never expires or
+expires at a specified data. <br />
+Use:<br />
+ <ul>
+ <li> 'Never', 0 or false to set expiry data to
+Never.</li>
+ <li>Date in yyyy-mm-dd format to set the expiry date to a
+specific date.</li>
+ <li>Relative format supported by strtotime function (e.g.
+'+6
+months' to generate a license that will expire in half a year).</li>
+ </ul>
+ </td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>ipRange</td>
+ <td>String</td>
+ <td>Limits the use of the license to IP addresses that fall
+within specification. Supports wildcards for any of the IP place
+holders, as well as the two types of the net masks (e.g. 10.1.0.0/16 or
+10.1.0.0./255.255.0.0).</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>hardwareLocked</td>
+ <td>Boolean</td>
+ <td>Option that indicates if the license will be locked to
+a specific machine using the Zend Host ID code(s). If set to true the
+Host-ID property is required.</td>
+ <td>false</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>hostID</td>
+ <td>String</td>
+ <td>Coded string (Zend Host ID) used to lock the license to
+a specific hardware. The Zend Host Id obtained from the machine where
+the encoded files and license are to be installed. Can be obtained by
+using the zendid utility.<br />
+ <br />
+This is REQUIRED if the Hardware-Locked property is set to true. You
+can define multiple Host IDs separated by semicolon.</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>userDefinedValues</td>
+ <td>String</td>
+ <td>Optional user defined values in format key=value.
+Multiple key-value pairs can be defined and separated by semicolon.
+These values then will be part of the license and can be obtained using
+the zend guard api (provided by Zend Optimizer). These values CANNOT be
+modified after the license is generated. Their modification would
+invalidate the license.<br />
+Example: Drink=Tea;Material=Wood</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ <tr>
+ <td>xUserDefinedValues</td>
+ <td>String</td>
+ <td>Optional user defined values in format key=value.
+Multiple key-value
+pairs can be defined and separated by semicolon. These values then will
+be part of the license and can be obtained using the zend guard api
+(provided by Zend Optimizer). These values CAN be modified after the
+license is generated. Their modification won't invalidate the license.<br />
+Example: Drink=Tea;Material=Wood</td>
+ <td>n/a</td>
+ <td>No</td>
+ </tr>
+ </tbody>
+</table>
+<br />
+<span style="font-weight: bold;">Examples</span>
+<pre><zendguardlicense<br /> privateKeyPath="/var/data/phing.key"<br /> zendsignPath="/usr/local/Zend/ZendGuard-5_0_1/bin/zendenc_sign"<br /> outputFile="./data/license/license.zl"<br /> productName="Phing"<br /> registeredTo="YourCustomerName"<br /> hardwareLocked="true"<br /> expires="+6 months"<br /> HostID="H:MFM43-Q9CXC-B9EDX-GWYSU;H:MFM43-Q9CXC-B9EDX-GWYTY"<br /> ipRange="10.1.*.*"<br /> userDefinedValues="Drink=Tea;Material=Wood"<br /> xUserDefinedValues="Drink=Tea;Material=Wood"<br />/><br /></pre>
+<p>Creates a license using the given properties.</p>
+<pre><zendguardlicense<br /> privateKeyPath="/var/data/phing.key"<br /> zendsignPath="/usr/local/Zend/ZendGuard-5_0_1/bin/zendenc_sign"<br /> outputFile="./data/license/license.zl"<br /> licenseTemplate="./data/license/license.template.zl"<br />/><br /></pre>
+<p>Creates a license using a license template file.</p>
+<p></p>
+
+
+ <h2><a
name="ZipTask"></a>ZipTask</h2><p> The <em>ZipTask</em> creates a .zip archive from a fileset or directory.</p><h3>Examples</h3>
<pre><zip destfile="phing.zip">
<fileset dir=".">
@@ -4227,6 +6373,15 @@ a2.a3.a4=false</pre>
<td>none</td>
<td>No</td>
</tr>
+ <tr>
+ <td>includeemptydirs</td>
+ <td>Boolean</td>
+ <td>
+ If set to <em>true</em>, also empty directories are copied.
+ </td>
+ <td>true</td>
+ <td>No</td>
+ </tr>
</tbody>
</table><p><b>Important note:</b> using basedir and fileset simultaneously can result in strange contents in the archive.</p><h3>Supported Nested Tags</h3><ul>
<li>fileset</li>
diff --git a/docs/phing_guide/book/chapters/appendixes/AppendixD2-CoreFilters.html b/docs/phing_guide/book/chapters/appendixes/AppendixD2-CoreFilters.html
index 3b45d17..6b24c3d 100644
--- a/docs/phing_guide/book/chapters/appendixes/AppendixD2-CoreFilters.html
+++ b/docs/phing_guide/book/chapters/appendixes/AppendixD2-CoreFilters.html
@@ -173,6 +173,54 @@ are not further passed through the filter chain. Usage example:
</tbody>
</table>
+<h2><a name="IconvFilter"></a>IconvFilter</h2>
+
+<p>
+The IconvFilter encodes file from <code>in</code> encoding to <code>out</code> encoding. Usage example:
+</p>
+
+<pre>
+<filterchain>
+ <iconvfilter inputencoding="UTF-8" outputencoding="CP1251" />
+</filterchain>
+</pre>
+
+<h3>Attributes</h3>
+<table>
+ <caption>
+ Attributes for the <em><iconvfilter> </em>tag
+ </caption>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Required</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>inputencoding</td>
+ <td>string</td>
+ <td>
+ Input encoding.
+ </td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <td>outputencoding</td>
+ <td>string</td>
+ <td>
+ Output encoding.
+ </td>
+ <td>n/a</td>
+ <td>Yes</td>
+ </tr>
+ </tbody>
+</table>
+
<h2><a name="LineContains"></a>Line Contains</h2>
<p>
This filter is only "permeable" for lines that contain
diff --git a/docs/phing_guide/book/frame/DocFrame.html b/docs/phing_guide/book/frame/DocFrame.html
old mode 100755
new mode 100644
diff --git a/docs/phing_guide/book/index.html b/docs/phing_guide/book/index.html
old mode 100755
new mode 100644
diff --git a/docs/phing_guide/book/toc/FrameToC.html b/docs/phing_guide/book/toc/FrameToC.html
index bf6608f..8758f45 100644
--- a/docs/phing_guide/book/toc/FrameToC.html
+++ b/docs/phing_guide/book/toc/FrameToC.html
@@ -1,5 +1,5 @@
<!--
--File $Id: FrameToC.html 775 2010-05-11 13:51:39Z mrook $
+-File $Id: FrameToC.html 1053 2011-03-02 21:14:35Z victor $
-License GNU FDL (http://www.gnu.org/copyleft/fdl.html)
-Copyright 2002, turing
-Author alex black, enigma at turingstudio.com
@@ -7,7 +7,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title> binarycloud contributor guide </title>
+ <title>Phing User Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="Stylesheet" rev="Stylesheet" href="../css/FrameToc.css" type="text/css" media="All" charset="iso-8859-1" />
</head>
@@ -120,20 +120,33 @@
</li></ul>
<ul><li>
<a href="../chapters/appendixes/AppendixC-OptionalTasks.html" target="Content">Appendix C: Optional Tasks</a><ul>
-<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#DbDeployTask" target="Content">DbDeployTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageMergerTask" target="Content">CoverageMergerTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageReportTask" target="Content">CoverageReportTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageSetupTask" target="Content">CoverageSetupTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageThresholdTask" target="Content">CoverageThresholdTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#DbDeployTask" target="Content">DbDeployTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ExportPropertiesTask" target="Content">ExportPropertiesTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FileHashTask" target="Content">FileHashTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FileSizeTask" target="Content">FileSizeTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FtpDeployTask" target="Content">FtpDeployTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitInitTask" target="Content">GitInitTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitCloneTask" target="Content">GitCloneTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitGcTask" target="Content">GitGcTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitBranchTask" target="Content">GitBranchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitFetchTask" target="Content">GitFetchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitCheckoutTask" target="Content">GitCheckoutTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitMergeTask" target="Content">GitMergeTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitPullTask" target="Content">GitPullTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitPushTask" target="Content">GitPushTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitTagTask" target="Content">GitTagTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitLogTask" target="Content">GitLogTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#HttpGetTask" target="Content">HttpGetTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#HttpRequestTask" target="Content">HttpRequestTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeEncoderTask" target="Content">IoncubeEncoderTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeLicenseTask" target="Content">IoncubeLicenseTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#JslLintTask" target="Content">JslLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#JsMinTask" target="Content">JsMinTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#MailTask" target="Content">MailTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PatchTask" target="Content">PatchTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PDOSQLExecTask" target="Content">PDOSQLExecTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackageTask" target="Content"> PearPackageTask</a></li>
@@ -149,6 +162,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask" target="Content">PhpLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitTask" target="Content">PHPUnitTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitReport" target="Content">PHPUnitReport</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#S3PutTask" target="Content">S3PutTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#S3GetTask" target="Content">S3GetTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ScpTask" target="Content">ScpTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SshTask" target="Content">SshTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SimpleTestTask" target="Content">SimpleTestTask</a></li>
@@ -158,6 +173,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnExportTask" target="Content">SvnExportTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnLastRevisionTask" target="Content">SvnLastRevisionTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnUpdateTask" target="Content">SvnUpdateTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnSwitchTask" target="Content">SvnSwitchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SymlinkTask" target="Content">SymlinkTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#TarTask" target="Content">TarTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#UntarTask" target="Content">
UntarTask</a></li>
@@ -166,6 +183,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#XmlLintTask" target="Content">XmlLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#XmlPropertyTask" target="Content">XmlPropertyTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendCodeAnalyzerTask" target="Content">ZendCodeAnalyzerTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendGuardEncodeTask" target="Content">ZendGuardEncodeTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendGuardLicenseTask" target="Content">ZendGuardLicenseTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZipTask" target="Content">ZipTask</a></li>
</ul>
</li></ul>
@@ -181,6 +200,7 @@
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#PhingFilterReader" target="Content">PhingFilterReader</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#ExpandProperties" target="Content">ExpandProperties</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#HeadFilter" target="Content">HeadFilter</a></li>
+<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#IconvFilter" target="Content">IconvFilter</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#LineContains" target="Content">Line Contains</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#LineContainsRegexp" target="Content">LineContainsRegexp</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#PrefixLines" target="Content">PrefixLines</a></li>
diff --git a/docs/phing_guide/book/toc/FrameToC.html.rej b/docs/phing_guide/book/toc/FrameToC.html.rej
deleted file mode 100644
index 03c6d03..0000000
--- a/docs/phing_guide/book/toc/FrameToC.html.rej
+++ /dev/null
@@ -1,18 +0,0 @@
---- docs/phing_guide/book/toc/FrameToC.html (revision 723)
-+++ docs/phing_guide/book/toc/FrameToC.html (working copy)
-@@ -138,8 +138,8 @@
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhkPackageTask" target="Content">PhkPackageTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpCodeSnifferTask" target="Content">PhpCodeSnifferTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpCpdTask" target="Content">PhpCpdTask</a></li>
-+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPMDTask" target="Content">PHPMDTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDependTask" target="Content">PhpDependTask</a></li>
--<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPMDTask" target="Content">PHPMDTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorTask" target="Content">PhpDocumentorTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorExternalTask" target="Content">PhpDocumentorExternalTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask" target="Content">PhpLintTask</a></li>
-@@ -228,4 +228,4 @@
-
- </body>
- </html>
--<!-- $Id -->
-+<!-- $Id -->
\ No newline at end of file
diff --git a/docs/phing_guide/book/toc/ToC.html b/docs/phing_guide/book/toc/ToC.html
index 1adb62f..6106524 100644
--- a/docs/phing_guide/book/toc/ToC.html
+++ b/docs/phing_guide/book/toc/ToC.html
@@ -105,20 +105,33 @@
</li></ul>
<ul><li>
<a href="../chapters/appendixes/AppendixC-OptionalTasks.html">Appendix C: Optional Tasks</a><ul>
-<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#DbDeployTask">DbDeployTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageMergerTask">CoverageMergerTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageReportTask">CoverageReportTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageSetupTask">CoverageSetupTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#CoverageThresholdTask">CoverageThresholdTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#DbDeployTask">DbDeployTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ExportPropertiesTask">ExportPropertiesTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FileHashTask">FileHashTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FileSizeTask">FileSizeTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#FtpDeployTask">FtpDeployTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitInitTask">GitInitTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitCloneTask">GitCloneTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitGcTask">GitGcTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitBranchTask">GitBranchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitFetchTask">GitFetchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitCheckoutTask">GitCheckoutTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitMergeTask">GitMergeTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitPullTask">GitPullTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitPushTask">GitPushTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitTagTask">GitTagTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#GitLogTask">GitLogTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#HttpGetTask">HttpGetTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#HttpRequestTask">HttpRequestTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeEncoderTask">IoncubeEncoderTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeLicenseTask">IoncubeLicenseTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#JslLintTask">JslLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#JsMinTask">JsMinTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#MailTask">MailTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PatchTask">PatchTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PDOSQLExecTask">PDOSQLExecTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackageTask"> PearPackageTask</a></li>
@@ -134,6 +147,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask">PhpLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitTask">PHPUnitTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPUnitReport">PHPUnitReport</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#S3PutTask">S3PutTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#S3GetTask">S3GetTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ScpTask">ScpTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SshTask">SshTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SimpleTestTask">SimpleTestTask</a></li>
@@ -143,6 +158,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnExportTask">SvnExportTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnLastRevisionTask">SvnLastRevisionTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnUpdateTask">SvnUpdateTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SvnSwitchTask">SvnSwitchTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#SymlinkTask">SymlinkTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#TarTask">TarTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#UntarTask">
UntarTask</a></li>
@@ -151,6 +168,8 @@
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#XmlLintTask">XmlLintTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#XmlPropertyTask">XmlPropertyTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendCodeAnalyzerTask">ZendCodeAnalyzerTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendGuardEncodeTask">ZendGuardEncodeTask</a></li>
+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZendGuardLicenseTask">ZendGuardLicenseTask</a></li>
<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#ZipTask">ZipTask</a></li>
</ul>
</li></ul>
@@ -166,6 +185,7 @@
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#PhingFilterReader">PhingFilterReader</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#ExpandProperties">ExpandProperties</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#HeadFilter">HeadFilter</a></li>
+<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#IconvFilter">IconvFilter</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#LineContains">Line Contains</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#LineContainsRegexp">LineContainsRegexp</a></li>
<li><a href="../chapters/appendixes/AppendixD2-CoreFilters.html#PrefixLines">PrefixLines</a></li>
diff --git a/docs/phing_guide/book/toc/ToC.html.rej b/docs/phing_guide/book/toc/ToC.html.rej
deleted file mode 100644
index bc79fcd..0000000
--- a/docs/phing_guide/book/toc/ToC.html.rej
+++ /dev/null
@@ -1,18 +0,0 @@
---- docs/phing_guide/book/toc/ToC.html (revision 723)
-+++ docs/phing_guide/book/toc/ToC.html (working copy)
-@@ -123,8 +123,8 @@
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhkPackageTask">PhkPackageTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpCodeSnifferTask">PhpCodeSnifferTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpCpdTask">PhpCpdTask</a></li>
-+<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPMDTask">PHPMDTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDependTask">PhpDependTask</a></li>
--<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PHPMDTask">PHPMDTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorTask">PhpDocumentorTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpDocumentorExternalTask">PhpDocumentorExternalTask</a></li>
- <li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PhpLintTask">PhpLintTask</a></li>
-@@ -214,4 +214,4 @@
-
- </body>
- </html>
--<!-- $Id -->
-+<!-- $Id -->
\ No newline at end of file
diff --git a/etc/VERSION.TXT b/etc/VERSION.TXT
index dea6b7b..8ef2710 100644
--- a/etc/VERSION.TXT
+++ b/etc/VERSION.TXT
@@ -1 +1 @@
-Phing 2.4.2
\ No newline at end of file
+Phing 2.4.5
\ No newline at end of file
diff --git a/etc/coverage-frames.xsl b/etc/coverage-frames.xsl
old mode 100755
new mode 100644
diff --git a/etc/log.xsl b/etc/log.xsl
old mode 100755
new mode 100644
diff --git a/etc/phing-grammar.rng b/etc/phing-grammar.rng
index 8227f0f..2c1b63e 100644
--- a/etc/phing-grammar.rng
+++ b/etc/phing-grammar.rng
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- -File $Id: phing-grammar.rng 739 2010-02-22 11:32:23Z mrook $
+ -File $Id: phing-grammar.rng 867 2010-09-19 21:02:54Z alexeyshockov $
-License GNU LGPL (http://www.gnu.org/copyleft/lgpl.html)
-Author Johan Persson, johanp at aditus.nu
-->
@@ -94,6 +94,7 @@
<ref name="filterchain"/>
<ref name="ftpdeploy" />
<ref name="headfilter"/>
+ <ref name="iconvfilter"/>
<ref name="ioncubeencoder"/>
<ref name="ioncubelicense"/>
<ref name="jsllint" />
@@ -2556,6 +2557,7 @@
<ref name="filterreader"/>
<ref name="expandproperties"/>
<ref name="headfilter"/>
+ <ref name="iconvfilter"/>
<ref name="linecontains"/>
<ref name="linecontainsregexp"/>
<ref name="prefixlines"/>
@@ -2715,6 +2717,14 @@
</element>
</define>
+ <define name="iconvfilter">
+ <element name="iconvfilter">
+ <attribute name="inputencoding"/>
+ <attribute name="outputencoding"/>
+ <empty/>
+ </element>
+ </define>
+
<define name="tidyfilter">
<element name="tidyfilter">
<optional>
diff --git a/etc/phpunit-frames.xsl b/etc/phpunit-frames.xsl
old mode 100755
new mode 100644
diff --git a/etc/phpunit-noframes.xsl b/etc/phpunit-noframes.xsl
old mode 100755
new mode 100644
diff --git a/etc/str.replace.function.xsl b/etc/str.replace.function.xsl
old mode 100755
new mode 100644
diff --git a/test/bootstrap.php b/test/bootstrap.php
new file mode 100644
index 0000000..b6ea5e8
--- /dev/null
+++ b/test/bootstrap.php
@@ -0,0 +1,12 @@
+<?php
+defined('PHING_TEST_BASE') || define('PHING_TEST_BASE', dirname(__FILE__));
+set_include_path(
+ realpath(dirname(__FILE__) . '/../classes') . PATH_SEPARATOR .
+ realpath(dirname(__FILE__) . '/classes') . PATH_SEPARATOR .
+ get_include_path() // trunk version of phing classes should take precedence
+);
+
+require_once(dirname(__FILE__) . '/classes/phing/BuildFileTest.php');
+require_once('phing/Phing.php');
+
+Phing::startup();
diff --git a/test/build.xml b/test/build.xml
index 8827e36..788b937 100644
--- a/test/build.xml
+++ b/test/build.xml
@@ -24,14 +24,13 @@
<property name="test.class" value="${test}"/>
<resolvepath propertyName="tests.dir.resolved" file="${tests.phpunit.dir}"/>
+ <resolvepath propertyName="tests.reports.dir.resolved" file="${tests.phpunit.dir}/reports"/>
<resolvepath propertyName="tests.classes.dir.resolved" file="${tests.phpunit.dir}/classes"/>
- <resolvepath propertyName="phing.classes.dir.resolved" file="../classes"/>
<resolvepath propertyName="phing.etc.dir.resolved" file="../etc"/>
<path id="incthis">
<pathelement dir="${tests.dir.resolved}"/>
<pathelement dir="${tests.classes.dir.resolved}"/>
- <pathelement dir="${phing.classes.dir.resolved}"/>
</path>
<target name="configure">
@@ -45,6 +44,8 @@
<!-- startup will have changed the include_path, so set it back now -->
<includepath classpathRef="incthis"/>
+
+ <mkdir dir="${tests.reports.dir.resolved}"/>
<fileset dir="${tests.classes.dir.resolved}" id="relevant-tests">
<include name="**/*${test.class}Test.php"/>
@@ -53,13 +54,13 @@
<target name="reports" depends="configure">
<phpunit haltonerror="true" haltonfailure="true" printsummary="true">
- <formatter type="xml" usefile="true" todir="${tests.reports.dir}" outfile="test-results.xml" />
+ <formatter type="xml" usefile="true" todir="${tests.reports.dir.resolved}" outfile="test-results.xml" />
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset refid="relevant-tests"/>
</batchtest>
</phpunit>
- <phpunitreport format="noframes" todir="${tests.reports.dir}" infile="${tests.reports.dir}/test-results.xml"
+ <phpunitreport format="noframes" todir="${tests.reports.dir.resolved}" infile="${tests.reports.dir.resolved}/test-results.xml"
styledir="${phing.etc.dir.resolved}"/>
</target>
@@ -73,4 +74,4 @@
<target name="phpunit" depends="initialize,reports" description="Executes the PHPUnit test suite"/>
-</project>
\ No newline at end of file
+</project>
diff --git a/test/classes/phing/BuildFileTest.php b/test/classes/phing/BuildFileTest.php
old mode 100755
new mode 100644
index 119223c..8866632
--- a/test/classes/phing/BuildFileTest.php
+++ b/test/classes/phing/BuildFileTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: BuildFileTest.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: BuildFileTest.php 1032 2011-01-24 07:59:30Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -33,6 +33,7 @@ require_once 'phing/system/io/PhingFile.php';
*
* @author Nico Seessle <nico at seessle.de>
* @author Conor MacNeill
+ * @author Victor Farazdagi <simple.square at gmail.com>
*/
abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
@@ -49,7 +50,7 @@ abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
/**
* Asserts that the log buffer contains specified message at specified priority.
- * @param string $$expected Message subsctring
+ * @param string $expected Message subsctring
* @param int $priority Message priority (default: any)
* @param string $errmsg The error message to display.
*/
@@ -57,11 +58,29 @@ abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
{
foreach($this->logBuffer as $log) {
if (false !== stripos($log, $expected)) {
+ $this->assertEquals(1, 1); // increase number of positive assertions
return;
}
}
$this->fail(sprintf($errormsg, $expected, var_export($this->logBuffer,true)));
}
+
+ /**
+ * Asserts that the log buffer does NOT contain specified message at specified priority.
+ * @param string $expected Message subsctring
+ * @param int $priority Message priority (default: any)
+ * @param string $errmsg The error message to display.
+ */
+ protected function assertNotInLogs($message, $priority = null, $errormsg = "Unexpected string '%s' found in logs: %s")
+ {
+ foreach($this->logBuffer as $log) {
+ if (false !== stripos($log, $message)) {
+ $this->fail(sprintf($errormsg, $message, var_export($this->logBuffer,true)));
+ }
+ }
+
+ $this->assertEquals(1, 1); // increase number of positive assertions
+ }
/**
* run a target, expect for any build exception
@@ -232,6 +251,7 @@ abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
. "' with message '" . $msg
. "' (actual message '" . $ex->getMessage() . "' instead)");
}
+ $this->assertEquals(1, 1); // increase number of positive assertions
return;
}
$this->fail("Should throw BuildException because: " . $cause);
@@ -254,6 +274,7 @@ abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
if ((null != $contains) && (false === strpos($ex->getMessage(), $contains))) {
$this->fail("Should throw BuildException because '" . $cause . "' with message containing '" . $contains . "' (actual message '" . $ex->getMessage() . "' instead)");
}
+ $this->assertEquals(1, 1); // increase number of positive assertions
return;
}
$this->fail("Should throw BuildException because: " . $cause);
@@ -280,7 +301,7 @@ abstract class BuildFileTest extends PHPUnit_Framework_TestCase {
*/
protected function assertPropertyEquals($property, $value) {
$result = $this->project->getProperty($property);
- $this->assertEquals("property " . $property,$value,$result);
+ $this->assertEquals($value, $result, "property " . $property);
}
/**
diff --git a/test/classes/phing/components/TargetTest.php b/test/classes/phing/components/TargetTest.php
new file mode 100644
index 0000000..8daabf6
--- /dev/null
+++ b/test/classes/phing/components/TargetTest.php
@@ -0,0 +1,48 @@
+<?php
+
+/*
+ * $Id: TargetTest.php 918 2010-10-12 02:37:57Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * UTs for Target component
+ *
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @package phing.system
+ */
+class TargetTest extends BuildFileTest {
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE
+ . "/etc/components/Target/Target.xml");
+ }
+
+ public function testHiddenTargets()
+ {
+ $phingExecutable = PHING_TEST_BASE . '/../bin/phing';
+ $buildFile = PHING_TEST_BASE . '/etc/components/Target/HiddenTargets.xml';
+ $cmd = $phingExecutable . ' -l -f ' . $buildFile;
+ exec($cmd, $out);
+ $out = implode("\n", $out);
+ $this->assertFalse(strpos($out, 'HideInListTarget'));
+ $this->assertTrue(strpos($out, 'ShowInListTarget') !== false);
+ }
+}
diff --git a/test/classes/phing/regression/590/PhpLintTest.php b/test/classes/phing/regression/590/PhpLintTest.php
new file mode 100644
index 0000000..864f68d
--- /dev/null
+++ b/test/classes/phing/regression/590/PhpLintTest.php
@@ -0,0 +1,43 @@
+<?php
+
+/*
+ * $Id: PhpLintTest.php 1022 2011-01-04 09:57:38Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * Regression test for ticket http://www.phing.info/trac/ticket/590
+ * - PhpLintTask don't flag files that can't be parsed as bad files
+ *
+ * @package phing.regression
+ */
+class PhpLintFlagTest extends BuildFileTest {
+
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE . "/etc/regression/590/build.xml");
+ }
+
+ public function testPhpLintTask () {
+ $this->executeTarget("main");
+ $this->assertInLogs("Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in ." . DIRECTORY_SEPARATOR . "my_file.php");
+ $this->assertInLogs("." . DIRECTORY_SEPARATOR . "my_file_ok.php: No syntax errors detected");
+ $this->assertInLogs("Deprecated: Assigning the return value of new by reference is deprecated in ." . DIRECTORY_SEPARATOR . "my_file_depr.php");
+ }
+}
diff --git a/test/classes/phing/regression/610/AdhocTaskdefTaskTest.php b/test/classes/phing/regression/610/AdhocTaskdefTaskTest.php
new file mode 100644
index 0000000..9ccfce9
--- /dev/null
+++ b/test/classes/phing/regression/610/AdhocTaskdefTaskTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * $Id: AdhocTaskdefTaskTest.php 1016 2010-12-21 21:10:58Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * Regression test for ticket http://www.phing.info/trac/ticket/610
+ * - AdhocTaskdefTask fails when creating a task that extends from an existing task
+ *
+ * @package phing.regression
+ */
+class AdhocTaskdefTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE . "/etc/regression/610/build.xml");
+ }
+
+ public function testPhingCallTask () {
+ $this->executeTarget("main");
+ $this->assertInLogs("doThisTask success!");
+ }
+}
diff --git a/test/classes/phing/regression/CopyMoveNoExceptionTest.php b/test/classes/phing/regression/CopyMoveNoExceptionTest.php
new file mode 100644
index 0000000..ca74862
--- /dev/null
+++ b/test/classes/phing/regression/CopyMoveNoExceptionTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * $Id: CopyMoveNoExceptionTest.php 985 2010-11-11 15:58:35Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * Regression test for ticket http://www.phing.info/trac/ticket/582
+ * - Add haltonerror attribute to copy/move tasks
+ *
+ * @package phing.regression
+ */
+class CopyMoveNoExceptionTest extends BuildFileTest {
+
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE . "/etc/regression/582/build.xml");
+ }
+
+ public function testPhingCallTask () {
+ $this->executeTarget("main");
+ $this->assertInLogs("Could not find file ");
+ }
+}
diff --git a/test/classes/phing/regression/CopyTaskFileListTest.php b/test/classes/phing/regression/CopyTaskFileListTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/CustomTaskFileSetTest.php b/test/classes/phing/regression/CustomTaskFileSetTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/ExcludeZipTest.php b/test/classes/phing/regression/ExcludeZipTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/ForeachFileSetTest.php b/test/classes/phing/regression/ForeachFileSetTest.php
old mode 100755
new mode 100644
index cbe9cef..c251432
--- a/test/classes/phing/regression/ForeachFileSetTest.php
+++ b/test/classes/phing/regression/ForeachFileSetTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: ForeachFileSetTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: ForeachFileSetTest.php 1022 2011-01-04 09:57:38Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -35,7 +35,8 @@ class ForeachFileSetTest extends BuildFileTest {
}
public function testCustomTask () {
+ $f = new PhingFile(PHING_TEST_BASE . "/etc/regression/252/build.xml");
$this->executeTarget("main");
- $this->assertInLogs("Calling Buildfile '" . PHING_TEST_BASE . "/etc/regression/252/build.xml' with target 'subtask'");
+ $this->assertInLogs("Calling Buildfile '" . $f->getAbsolutePath() . "' with target 'subtask'");
}
}
diff --git a/test/classes/phing/regression/HtmlEntitiesTest.php b/test/classes/phing/regression/HtmlEntitiesTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/MoveReplaceRegexpTest.php b/test/classes/phing/regression/MoveReplaceRegexpTest.php
old mode 100755
new mode 100644
index 3dea93d..0dd9fea
--- a/test/classes/phing/regression/MoveReplaceRegexpTest.php
+++ b/test/classes/phing/regression/MoveReplaceRegexpTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: MoveReplaceRegexpTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: MoveReplaceRegexpTest.php 886 2010-09-27 05:19:00Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -34,6 +34,11 @@ class MoveReplaceRegexpTest extends BuildFileTest {
$this->configureProject(PHING_TEST_BASE . "/etc/regression/307/build.xml");
}
+ public function tearDown()
+ {
+ @unlink(PHING_TEST_BASE . "/etc/regression/307/anotherfile.bak");
+ }
+
public function testPhingCallTask () {
$this->executeTarget("main");
diff --git a/test/classes/phing/regression/PearPkg2CompatibilityTest.php b/test/classes/phing/regression/PearPkg2CompatibilityTest.php
new file mode 100644
index 0000000..a4aa6e1
--- /dev/null
+++ b/test/classes/phing/regression/PearPkg2CompatibilityTest.php
@@ -0,0 +1,63 @@
+<?php
+/*
+ * $Id: PearPkg2CompatibilityTest.php 862 2010-09-15 02:17:59Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * Regression test for tickets
+ * http://www.phing.info/trac/ticket/524
+ *
+ * @package phing.regression
+ */
+class PearPkg2CompatibilityTest extends BuildFileTest {
+ private $savedErrorLevel;
+
+ public function setUp() {
+ $this->savedErrorLevel = error_reporting();
+ error_reporting(E_ERROR);
+ $buildFile = PHING_TEST_BASE . "/etc/regression/524/build.xml";
+ $this->configureProject($buildFile);
+ }
+
+ public function tearDown()
+ {
+ error_reporting($this->savedErrorLevel);
+ unlink(PHING_TEST_BASE . '/etc/regression/524/out/package2.xml');
+ }
+
+ public function testInactiveMaintainers () {
+ $this->executeTarget("inactive");
+ $content = file_get_contents(PHING_TEST_BASE . '/etc/regression/524/out/package2.xml');
+ $this->assertTrue(strpos($content, '<active>no</active>') !== false);
+ }
+
+ public function testActiveMaintainers () {
+ $this->executeTarget("active");
+ $content = file_get_contents(PHING_TEST_BASE . '/etc/regression/524/out/package2.xml');
+ $this->assertTrue(strpos($content, '<active>yes</active>') !== false);
+ }
+
+ public function testNotSetMaintainers () {
+ $this->executeTarget("notset");
+ $content = file_get_contents(PHING_TEST_BASE . '/etc/regression/524/out/package2.xml');
+ $this->assertTrue(strpos($content, '<active>yes</active>') !== false);
+ }
+}
diff --git a/test/classes/phing/regression/PearStyleNamingTest.php b/test/classes/phing/regression/PearStyleNamingTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/PhingCallAdhocTest.php b/test/classes/phing/regression/PhingCallAdhocTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/PhpUnit34Test.php b/test/classes/phing/regression/PhpUnit34Test.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/regression/PropertyCommentsTest.php b/test/classes/phing/regression/PropertyCommentsTest.php
new file mode 100644
index 0000000..da8ad64
--- /dev/null
+++ b/test/classes/phing/regression/PropertyCommentsTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * $Id: PropertyCommentsTest.php 991 2010-11-16 10:33:07Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * Regression test for ticket http://www.phing.info/trac/ticket/585
+ * - Same line comments in property files are included in the property value
+ *
+ * @package phing.regression
+ */
+class PropertyCommentsTest extends BuildFileTest {
+
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE . "/etc/regression/585/build.xml");
+ }
+
+ public function testPhingCallTask () {
+ $this->executeTarget("main");
+ $this->assertPropertyEquals('setting', 'value');
+ }
+}
diff --git a/test/classes/phing/regression/RecursivePropertyTest.php b/test/classes/phing/regression/RecursivePropertyTest.php
index 46e8ed5..043c7b6 100644
--- a/test/classes/phing/regression/RecursivePropertyTest.php
+++ b/test/classes/phing/regression/RecursivePropertyTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: RecursivePropertyTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: RecursivePropertyTest.php 885 2010-09-27 04:20:43Z victor $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -34,6 +34,11 @@ class RecursivePropertyTest extends BuildFileTest {
$this->configureProject(PHING_TEST_BASE . "/etc/regression/269/build.xml");
}
+ public function tearDown()
+ {
+ @unlink(PHING_TEST_BASE . "/etc/regression/269/testoutput");
+ }
+
public function testCopyTask () {
$this->executeTarget("main");
diff --git a/test/classes/phing/regression/ReplaceTokenBooleanTest.php b/test/classes/phing/regression/ReplaceTokenBooleanTest.php
old mode 100755
new mode 100644
diff --git a/test/classes/phing/system/FileOutputStreamTest.php b/test/classes/phing/system/FileOutputStreamTest.php
index 4dfe510..bb416ef 100644
--- a/test/classes/phing/system/FileOutputStreamTest.php
+++ b/test/classes/phing/system/FileOutputStreamTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: FileOutputStreamTest.php 552 2009-08-29 12:18:13Z mrook $
+ * $Id: FileOutputStreamTest.php 1021 2011-01-04 09:57:13Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -38,11 +38,12 @@ class FileOutputStreamTest extends PHPUnit_Framework_TestCase {
private $outStream;
public function setUp() {
- $this->tmpFile = new PhingFile("tmp/" . get_class($this) . ".txt");
+ $this->tmpFile = new PhingFile(PHING_TEST_BASE . "/tmp/" . get_class($this) . ".txt");
$this->outStream = new FileOutputStream($this->tmpFile);
}
public function tearDown() {
+ $this->outStream->close();
FileSystem::getFileSystem()->unlink($this->tmpFile->getAbsolutePath());
}
diff --git a/test/classes/phing/system/io/UnixFileSystemTest.php b/test/classes/phing/system/io/UnixFileSystemTest.php
new file mode 100644
index 0000000..630098c
--- /dev/null
+++ b/test/classes/phing/system/io/UnixFileSystemTest.php
@@ -0,0 +1,53 @@
+<?php
+
+/*
+ * $Id: UnixFileSystemTest.php 984 2010-11-11 10:52:50Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+
+require_once 'PHPUnit/Framework/TestCase.php';
+include_once 'phing/system/io/UnixFileSystem.php';
+
+/**
+ * Unit test for UnixFileSystem
+ *
+ * @author Michiel Rook <mrook at php.net>
+ * @package phing.system.io
+ */
+class UnixFileSystemTest extends PHPUnit_Framework_TestCase {
+
+ /**
+ * @var FileSystem
+ */
+ private $fs;
+
+ public function setUp() {
+ $this->fs = new UnixFileSystem();
+ }
+
+ public function tearDown() {
+ }
+
+ public function testCompare() {
+ $f1 = new PhingFile(__FILE__);
+ $f2 = new PhingFile(__FILE__);
+
+ $this->assertEquals($this->fs->compare($f1, $f2), 0);
+ }
+}
diff --git a/test/classes/phing/tasks/ImportTaskTest.php b/test/classes/phing/tasks/ImportTaskTest.php
index bbcccda..6adc422 100644
--- a/test/classes/phing/tasks/ImportTaskTest.php
+++ b/test/classes/phing/tasks/ImportTaskTest.php
@@ -1,7 +1,7 @@
<?php
/*
- * $Id: ImportTaskTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: ImportTaskTest.php 1022 2011-01-04 09:57:38Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -33,35 +33,47 @@ class ImportTaskTest extends BuildFileTest {
}
public function testOverloadedTarget () {
+ $f1 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/importing.xml");
+
$this->executeTarget("main");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/importing.xml main target.");
+ $this->assertInLogs("This is " . $f1->getAbsolutePath() . " main target.");
}
public function testImportedTarget () {
+ $f1 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/imports/imported.xml");
+ $f2 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/imports");
+
$this->executeTarget("imported");
- $this->assertInLogs("phing.file.imported=" . PHING_TEST_BASE . "/etc/tasks/imports/imported.xml");
- $this->assertInLogs("imported.basedir=" . PHING_TEST_BASE . "/etc/tasks/imports");
+ $this->assertInLogs("phing.file.imported=" . $f1->getAbsolutePath());
+ $this->assertInLogs("imported.basedir=" . $f2->getAbsolutePath());
}
public function testImported2Target () {
+ $f1 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/imports/importedImport.xml");
+
$this->executeTarget("imported2");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/imports/importedImport.xml imported2 target.");
+ $this->assertInLogs("This is " . $f1->getAbsolutePath() . " imported2 target.");
}
public function testCascadeTarget () {
+ $f1 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/imports/imported.xml");
+ $f2 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/importing.xml");
+
$this->executeTarget("cascade");
$this->assertInLogs("This comes from the imported.properties file");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/imports/imported.xml main target.");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/importing.xml cascade target.");
+ $this->assertInLogs("This is " . $f1->getAbsolutePath() . " main target.");
+ $this->assertInLogs("This is " . $f2->getAbsolutePath() . " cascade target.");
}
public function testFlipFlopTarget () {
// calls target in main that depends on target in import that depends on
// target orverridden in main
$this->executeTarget("flipflop");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/importing.xml flop target.");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/imports/imported.xml flip target.");
- $this->assertInLogs("This is " . PHING_TEST_BASE . "/etc/tasks/importing.xml flipflop target.");
+ $f1 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/importing.xml");
+ $f2 = new PhingFile(PHING_TEST_BASE . "/etc/tasks/imports/imported.xml");
+ $this->assertInLogs("This is " . $f1->getAbsolutePath() . " flop target.");
+ $this->assertInLogs("This is " . $f2->getAbsolutePath() . " flip target.");
+ $this->assertInLogs("This is " . $f1->getAbsolutePath() . " flipflop target.");
}
}
diff --git a/test/classes/phing/tasks/TaskdefTaskTest.php b/test/classes/phing/tasks/TaskdefTaskTest.php
index df9752a..379f14d 100644
--- a/test/classes/phing/tasks/TaskdefTaskTest.php
+++ b/test/classes/phing/tasks/TaskdefTaskTest.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: TaskdefTaskTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: TaskdefTaskTest.php 1014 2010-12-17 20:51:26Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -22,7 +22,7 @@
require_once 'phing/BuildFileTest.php';
/**
- * @version $Revision: 655 $
+ * @version $Revision: 1014 $
* @package phing.tasks.system
*/
class TaskdefTaskTest extends BuildFileTest {
@@ -43,6 +43,9 @@ class TaskdefTaskTest extends BuildFileTest {
$this->expectBuildException("noClassname", "required argument not specified");
}
+ /**
+ * @expectedException PHPUnit_Framework_Error
+ */
public function testClassNotFound() {
try {
$this->expectBuildException("classNotFound", "classname specified doesn't exist");
diff --git a/test/classes/phing/tasks/TypedefTaskTest.php b/test/classes/phing/tasks/TypedefTaskTest.php
index 7507445..762d584 100644
--- a/test/classes/phing/tasks/TypedefTaskTest.php
+++ b/test/classes/phing/tasks/TypedefTaskTest.php
@@ -1,6 +1,6 @@
<?php
/*
- * $Id: TypedefTaskTest.php 655 2009-12-14 12:53:15Z mrook $
+ * $Id: TypedefTaskTest.php 1014 2010-12-17 20:51:26Z mrook $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -24,7 +24,7 @@ require_once 'phing/BuildFileTest.php';
/**
* @author Hans Lellelid <hans at xmpl.org> (Phing)
* @author Stefan Bodewig <stefan.bodewig at epost.de> (Ant)
- * @version $Revision: 655 $
+ * @version $Revision: 1014 $
* @package phing.tasks.system
*/
class TypedefTaskTest extends BuildFileTest {
@@ -45,6 +45,9 @@ class TypedefTaskTest extends BuildFileTest {
$this->expectBuildException("noClassname", "required argument not specified");
}
+ /**
+ * @expectedException PHPUnit_Framework_Error
+ */
public function testClassNotFound() {
try {
$this->executeTarget("classNotFound");
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php b/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php
new file mode 100644
index 0000000..b309b98
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php
@@ -0,0 +1,66 @@
+<?php
+/*
+ * $Id: GitBaseTest.php 851 2010-09-10 07:07:54Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitBaseTask.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitBaseTest.php 851 2010-09-10 07:07:54Z victor $
+ * @package phing.tasks.ext
+ */
+class GitBaseTest extends BuildFileTest {
+
+ protected $mock;
+
+ public function setUp() {
+ $this->configureProject(PHING_TEST_BASE
+ . "/etc/tasks/ext/GitBaseTest.xml");
+ $this->mock = $this->getMockForAbstractClass('GitBaseTask');
+ }
+
+ public function testInitialization()
+ {
+ $this->assertType('GitBaseTask', $this->mock);
+ }
+
+ /**
+ * @todo - make sure that required arguments are checked
+ */
+ public function testArguments()
+ {}
+
+ public function testMutators()
+ {
+ // gitPath
+ $gitPath = $this->mock->getGitPath();
+ $this->mock->setGitPath('my-new-path');
+ $this->assertEquals('my-new-path', $this->mock->getGitPath());
+ $this->mock->setGitPath($gitPath);
+
+ // repository
+ $repository = $this->mock->getRepository();
+ $this->mock->setRepository('/tmp');
+ $this->assertEquals('/tmp', $this->mock->getRepository());
+ $this->mock->setRepository($repository);
+ }
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php
new file mode 100644
index 0000000..268ba58
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php
@@ -0,0 +1,159 @@
+<?php
+/*
+ * $Id: GitBranchTaskTest.php 890 2010-09-27 07:17:05Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitBranchTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitBranchTaskTest.php 890 2010-09-27 07:17:05Z victor $
+ * @package phing.tasks.ext
+ */
+class GitBranchTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitBranchTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-branch output: Branch all-params-set set up to track remote branch master from origin.');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoBranchnameSpecified()
+ {
+ $this->expectBuildExceptionContaining('noBranchname',
+ 'Branchname dir is required',
+ '"branchname" is required parameter');
+ }
+
+ public function testTrackParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('trackParamSet');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ $this->assertInLogs( 'git-branch output: Branch track-param-set set up to track local branch master.');
+ }
+
+ public function testNoTrackParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('noTrackParamSet');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ $this->assertInLogs('git-branch output: '); // no output actually
+ }
+
+ public function testSetUpstreamParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('setUpstreamParamSet');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ $this->assertInLogs('Branch set-upstream-param-set set up to track local branch master.'); // no output actually
+ }
+
+ public function testForceParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('forceParamSet');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ $this->assertInLogs('git-branch output: '); // no output actually
+ }
+
+ public function testDeleteBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('deleteBranch');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ $this->assertInLogs('Branch delete-branch-1 set up to track local branch master.');
+ $this->assertInLogs('Branch delete-branch-2 set up to track local branch master.');
+ $this->assertInLogs('Deleted branch delete-branch-1');
+ $this->assertInLogs('Deleted branch delete-branch-2');
+ }
+
+ public function testMoveBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('moveBranch');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ // try to delete new branch (thus understanding that rename worked)
+ $this->assertInLogs('Deleted branch move-branch-2');
+ }
+
+ public function testForceMoveBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->executeTarget('forceMoveBranch');
+ $this->assertInLogs('git-branch: branch "' . $repository . '" repository');
+ // try to delete new branch (thus understanding that rename worked)
+ $this->assertInLogs('Deleted branch move-branch-2');
+ }
+
+ public function testForceMoveBranchNoNewbranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->expectBuildExceptionContaining('forceMoveBranchNoNewbranch',
+ 'New branch name is required in branch move',
+ '"newbranch" is required parameter');
+ }
+
+ public function testMoveBranchNoNewbranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+
+ $this->expectBuildExceptionContaining('moveBranchNoNewbranch',
+ 'New branch name is required in branch move',
+ '"newbranch" is required parameter');
+ }
+
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php
new file mode 100644
index 0000000..f25545d
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php
@@ -0,0 +1,118 @@
+<?php
+/*
+ * $Id: GitCheckoutTaskTest.php 894 2010-09-28 03:58:35Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitCheckoutTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitCheckoutTaskTest.php 894 2010-09-28 03:58:35Z victor $
+ * @package phing.tasks.ext
+ */
+class GitCheckoutTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitCheckoutTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testCheckoutExistingBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('checkoutExistingBranch');
+ $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository');
+ $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.');
+ // @todo - actually make sure that Ebihara updates code to return (not
+ // echo output from $command->execute()
+ //$this->assertInLogs("Switched to branch 'test'");
+ $this->assertInLogs('git-checkout output: '); // no output actually
+ }
+
+ public function testCheckoutNonExistingBranch()
+ {
+ $this->expectBuildExceptionContaining('checkoutNonExistingBranch',
+ 'Checkout of non-existent repo is impossible',
+ 'Task execution failed');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoBranchnameSpecified()
+ {
+ $this->expectBuildExceptionContaining('noBranchname',
+ 'Branchname is required',
+ '"branchname" is required parameter');
+ }
+
+ public function testCheckoutMerge()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('checkoutMerge');
+ $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository');
+ $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.');
+ $this->assertInLogs('git-branch output: Deleted branch master');
+ }
+
+ public function testCheckoutCreateBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('checkoutCreateBranch');
+ $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository');
+ $this->assertInLogs('git-checkout output: Branch co-create-branch set up to track remote branch master from origin.');
+ $this->assertInLogs('git-branch output: Deleted branch co-create-branch');
+ }
+
+ public function testForceCheckoutCreateBranch()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('checkoutForceCreateBranch');
+ $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository');
+ $this->assertInLogs('git-branch output: Deleted branch co-create-branch');
+ }
+
+ public function testForceCheckoutCreateBranchFailed()
+ {
+ $this->expectBuildExceptionContaining('checkoutForceCreateBranchFailed',
+ 'Branch already exists',
+ 'Task execution failed.');
+ }
+
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php
new file mode 100644
index 0000000..f769dd3
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php
@@ -0,0 +1,101 @@
+<?php
+/*
+ * $Id: GitCloneTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitCloneTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitCloneTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ * @package phing.tasks.ext
+ */
+class GitCloneTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitCloneTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testWrongRepository()
+ {
+ $this->expectBuildExceptionContaining('wrongRepository',
+ 'Repository not readable',
+ 'The remote end hung up unexpectedly');
+ }
+
+ public function testWrongTargetPath()
+ {
+ $this->expectBuildExceptionContaining('wrongTargetPath',
+ 'Repository not readable',
+ 'You must specify readable directory as repository');
+ }
+
+ public function testGitClone()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $gitFilesDir = $repository . '/.git';
+ $this->executeTarget('gitClone');
+
+ $this->assertInLogs('git-clone: cloning "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory');
+ $this->assertTrue(is_dir($repository));
+ $this->assertTrue(is_dir($gitFilesDir));
+ // test that file is actully cloned
+ $this->assertTrue(is_readable($repository . '/README'));
+ }
+
+ public function testGitCloneBare()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $gitFilesDir = $repository . '/.git';
+ $this->executeTarget('gitCloneBare');
+ $this->assertInLogs('git-clone: cloning (bare) "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory');
+ $this->assertTrue(is_dir($repository));
+ $this->assertTrue(is_dir($repository . '/branches'));
+ $this->assertTrue(is_dir($repository . '/info'));
+ $this->assertTrue(is_dir($repository . '/hooks'));
+ $this->assertTrue(is_dir($repository . '/refs'));
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoTargetPathSpecified()
+ {
+ $this->expectBuildExceptionContaining('noTargetPath',
+ 'Target path is required',
+ '"targetPath" is required parameter');
+ }
+
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php
new file mode 100644
index 0000000..c3ecc7b
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php
@@ -0,0 +1,89 @@
+<?php
+/*
+ * $Id: GitFetchTaskTest.php 890 2010-09-27 07:17:05Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitFetchTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitFetchTaskTest.php 890 2010-09-27 07:17:05Z victor $
+ * @package phing.tasks.ext
+ */
+class GitFetchTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitFetchTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-fetch: branch "' . $repository . '" repository');
+ $this->assertInLogs('git-fetch output: '); // no output actually
+ }
+
+ public function testFetchAllRemotes()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('fetchAllRemotes');
+ $this->assertInLogs('git-fetch: branch "' . $repository . '" repository');
+ $this->assertInLogs('git-fetch output: Fetching origin');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoTargetSpecified()
+ {
+ $this->expectBuildExceptionContaining('noTarget',
+ 'Target is required',
+ 'No remote repository specified');
+ }
+
+ public function testRefspecSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('refspecSet');
+ $this->assertInLogs('git-fetch: branch "' . $repository . '" repository');
+ $this->assertInLogs('git-fetch output: ');
+ $this->assertInLogs('Deleted branch refspec-branch');
+ }
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php
new file mode 100644
index 0000000..9723ed2
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php
@@ -0,0 +1,100 @@
+<?php
+/*
+ * $Id: GitGcTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitGcTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitGcTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ * @package phing.tasks.ext
+ */
+class GitGcTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitGcTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-gc: cleaning up "' . $repository . '" repository');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testAutoParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $msg = 'git-gc: cleaning up "' . $repository . '" repository';
+
+ $this->executeTarget('autoParamSet');
+ $this->assertInLogs($msg);
+ }
+
+ public function testNoPruneParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $msg = 'git-gc: cleaning up "' . $repository . '" repository';
+
+ $this->executeTarget('nopruneParamSet');
+ $this->assertInLogs($msg);
+ }
+
+ public function testAggressiveParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $msg = 'git-gc: cleaning up "' . $repository . '" repository';
+
+ $this->executeTarget('aggressiveParamSet');
+ $this->assertInLogs($msg);
+ }
+
+ public function testPruneParameter()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $msg = 'git-gc: cleaning up "' . $repository . '" repository';
+
+ $this->executeTarget('pruneParamSet');
+ $this->assertInLogs($msg);
+ }
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php
new file mode 100644
index 0000000..5ef5b90
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php
@@ -0,0 +1,84 @@
+<?php
+/*
+ * $Id: GitInitTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitInitTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitInitTaskTest.php 903 2010-10-05 09:14:43Z victor $
+ * @package phing.tasks.ext
+ */
+class GitInitTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitInitTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testWrongRepository()
+ {
+ $this->expectBuildExceptionContaining('wrongRepository',
+ 'Repository directory not readable',
+ 'You must specify readable directory as repository.');
+ }
+
+ public function testGitInit()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $gitFilesDir = $repository . '/.git';
+ $this->executeTarget('gitInit');
+
+ $this->assertInLogs('git-init: initializing "' . $repository . '" repository');
+ $this->assertTrue(is_dir($repository));
+ $this->assertTrue(is_dir($gitFilesDir));
+ }
+
+ public function testGitInitBare()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $gitFilesDir = $repository . '/.git';
+ $this->executeTarget('gitInitBare');
+ $this->assertInLogs('git-init: initializing (bare) "' . $repository . '" repository');
+ $this->assertTrue(is_dir($repository));
+ $this->assertTrue(is_dir($repository . '/branches'));
+ $this->assertTrue(is_dir($repository . '/info'));
+ $this->assertTrue(is_dir($repository . '/hooks'));
+ $this->assertTrue(is_dir($repository . '/refs'));
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.php
new file mode 100644
index 0000000..029cff1
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.php
@@ -0,0 +1,302 @@
+<?php
+/*
+ * $Id: GitLogTaskTest.php 1034 2011-01-24 08:03:52Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitLogTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitLogTaskTest.php 1034 2011-01-24 08:03:52Z victor $
+ * @package phing.tasks.ext
+ */
+class GitLogTaskTest extends BuildFileTest {
+
+ private $testCommits = array(
+ array(
+ 'commit' => '6dbaf4508e75dcd426b5b974a67c462c70d46e1f',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Sun Sep 26 21:14:44 2010 +0400',
+ 'msg' => 'Inited',
+ 'msg-full' => '',
+ 'From' => '6dbaf4508e75dcd426b5b974a67c462c70d46e1f Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Sun, 26 Sep 2010 21:14:44 +0400',
+ 'Subject' => '[PATCH] Inited',
+ ),
+ array(
+ 'commit' => 'b8cddb3fa5f408560d0d00d6c8721fe333895888',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Sun Jan 23 22:53:07 2011 +0300',
+ 'msg' => 'Added file1 + file2',
+ 'msg-full' => '',
+ 'From' => 'b8cddb3fa5f408560d0d00d6c8721fe333895888 Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Sun, 23 Jan 2011 22:53:07 +0300',
+ 'Subject' => '[PATCH] Added file1 + file2',
+ ),
+ array(
+ 'commit' => 'c573116f395d36497a1ac1dba565ecd3d3944277',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Sun Jan 23 22:53:19 2011 +0300',
+ 'msg' => 'Added file3',
+ 'msg-full' => '',
+ 'From' => 'c573116f395d36497a1ac1dba565ecd3d3944277 Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Sun, 23 Jan 2011 22:53:19 +0300',
+ 'Subject' => '[PATCH] Added file3',
+ ),
+ array(
+ 'commit' => '2b4a5409bf60813b6a84d583bbdcbed25c7c3a00',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Sun Jan 23 22:53:42 2011 +0300',
+ 'msg' => 'Removed file3',
+ 'msg-full' => '',
+ 'From' => '2b4a5409bf60813b6a84d583bbdcbed25c7c3a00 Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Sun, 23 Jan 2011 22:53:42 +0300',
+ 'Subject' => '[PATCH] Removed file3',
+ ),
+ array(
+ 'commit' => 'ee07085160003ffd1100867deb6059bae0c45455',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Sun Jan 23 23:38:34 2011 +0300',
+ 'msg' => 'Title: file4 was added',
+ 'msg-full' => 'Full commit message: and here goes some elaboration on what has been done.',
+ 'From' => 'ee07085160003ffd1100867deb6059bae0c45455 Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Sun, 23 Jan 2011 23:38:34 +0300',
+ 'Subject' => '[PATCH] Title: file4 was added',
+ ),
+ array(
+ 'commit' => '1b767b75bb5329f4e53345c516c0a9f4ed32d330',
+ 'author' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'date' => 'Mon Jan 24 09:58:33 2011 +0300',
+ 'msg' => 'Added file5',
+ 'msg-full' => 'This file was added one day after file1, file2, file3 and file4 were added',
+ 'From' => '1b767b75bb5329f4e53345c516c0a9f4ed32d330 Mon Sep 17 00:00:00 2001',
+ 'From:' => 'Victor Farazdagi <simple.square at gmail.com>',
+ 'Date' => 'Mon, 24 Jan 2011 09:58:33 +0300',
+ 'Subject' => '[PATCH] Added file5',
+ ),
+
+ );
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitLogTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testGitLogWithoutParams()
+ {
+ $this->executeTarget('gitLogWithoutParams');
+ foreach($this->testCommits as $commit) {
+ $this->assertInLogs($commit['date']);
+ $this->assertInLogs($commit['author']);
+ $this->assertInLogs($commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ if (strlen($commit['msg-full'])) {
+ $this->assertInLogs($commit['msg-full']);
+ }
+ }
+ }
+
+ public function testGitWithMostParams()
+ {
+ $this->executeTarget('gitLogWithMostParams');
+ $lastTwoCommits = array_slice($this->testCommits, -2);
+ $allOtherCommits = array_slice($this->testCommits, 0, -2);
+
+ // test max-count
+ foreach($lastTwoCommits as $commit) {
+ $this->assertInLogs($commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ }
+ foreach($allOtherCommits as $commit) {
+ $this->assertNotInLogs($commit['commit']);
+ $this->assertNotInLogs($commit['msg']);
+ }
+
+ $this->assertInLogs('0 files changed, 0 insertions(+), 0 deletions(-)');
+
+ }
+
+ public function testGitOutputPropertySet()
+ {
+ $this->executeTarget('gitLogOutputPropertySet');
+ $this->assertPropertyEquals('gitLogOutput', '1b767b75bb5329f4e53345c516c0a9f4ed32d330 Added file5' . "\n");
+ }
+
+ public function testGitLogNameStatus()
+ {
+ $this->executeTarget('gitLogNameStatusSet');
+ $this->assertInLogs("A\tfile1");
+ $this->assertInLogs("A\tfile2");
+ $this->assertInLogs("A\tfile3");
+ $this->assertInLogs("A\tREADME");
+ $this->assertInLogs("D\tfile3");
+ }
+
+ public function testGitDateRelative()
+ {
+ $this->executeTarget('gitLogDateRelative');
+ foreach($this->testCommits as $commit) {
+ $timestamp = strtotime($commit['date']);
+ $this->assertInLogs(GitTestsHelper::getRelativeDate($timestamp));
+ }
+ }
+
+ public function testGitSinceUntilSet()
+ {
+ $this->executeTarget('gitLogSinceUntilSet');
+ $this->assertNotInLogs('6dbaf4508e75dcd426b5b974a67c462c70d46e1f Inited');
+ $this->assertNotInLogs('1b767b75bb5329f4e53345c516c0a9f4ed32d330 Added file5');
+ $this->assertInLogs('ee07085160003ffd1100867deb6059bae0c45455 Title: file4 was added');
+ $this->assertInLogs('2b4a5409bf60813b6a84d583bbdcbed25c7c3a00 Removed file3');
+ $this->assertInLogs('c573116f395d36497a1ac1dba565ecd3d3944277 Added file3');
+ $this->assertInLogs('b8cddb3fa5f408560d0d00d6c8721fe333895888 Added file1 + file2');
+ }
+
+ public function testGitBeforeAfterSet()
+ {
+ $this->executeTarget('gitLogBeforeAfterSet');
+ $this->assertNotInLogs('6dbaf4508e75dcd426b5b974a67c462c70d46e1f Inited');
+ $this->assertNotInLogs('1b767b75bb5329f4e53345c516c0a9f4ed32d330 Added file5');
+ $this->assertInLogs('ee07085160003ffd1100867deb6059bae0c45455 Title: file4 was added');
+ $this->assertInLogs('2b4a5409bf60813b6a84d583bbdcbed25c7c3a00 Removed file3');
+ $this->assertInLogs('c573116f395d36497a1ac1dba565ecd3d3944277 Added file3');
+ $this->assertInLogs('b8cddb3fa5f408560d0d00d6c8721fe333895888 Added file1 + file2');
+ }
+
+ public function testGitFormatOneLine()
+ {
+ $this->executeTarget('gitLogFormatOneLine');
+ foreach($this->testCommits as $commit) {
+ $this->assertNotInLogs($commit['author']);
+ $this->assertNotInLogs($commit['date']);
+ $this->assertInLogs($commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ }
+ }
+
+ public function testGitFormatShort()
+ {
+ $this->executeTarget('gitLogFormatShort');
+ foreach($this->testCommits as $commit) {
+ $this->assertNotInLogs($commit['date']);
+ $this->assertInLogs($commit['author']);
+ $this->assertInLogs($commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ }
+ }
+
+ public function testGitFormatMedium()
+ {
+ $this->executeTarget('gitLogFormatMedium');
+ foreach($this->testCommits as $commit) {
+ $this->assertInLogs($commit['date']);
+ $this->assertInLogs($commit['author']);
+ $this->assertInLogs($commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ if (strlen($commit['msg-full'])) {
+ $this->assertInLogs($commit['msg-full']);
+ }
+ }
+ }
+
+ public function testGitFormatFull()
+ {
+ $this->executeTarget('gitLogFormatFull');
+ foreach($this->testCommits as $commit) {
+ $this->assertNotInLogs($commit['date']);
+ $this->assertInLogs('Author: ' . $commit['author']);
+ $this->assertInLogs('Commit: ' . $commit['author']);
+ $this->assertInLogs('commit ' . $commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ if (strlen($commit['msg-full'])) {
+ $this->assertInLogs($commit['msg-full']);
+ }
+ }
+ }
+
+ public function testGitFormatFuller()
+ {
+ $this->executeTarget('gitLogFormatFuller');
+ foreach($this->testCommits as $commit) {
+ $this->assertInLogs('Author: ' . $commit['author']);
+ $this->assertInLogs('AuthorDate: ' . $commit['date']);
+ $this->assertInLogs('Commit: ' . $commit['author']);
+ $this->assertInLogs('CommitDate: ' . $commit['date']);
+ $this->assertInLogs('commit ' . $commit['commit']);
+ $this->assertInLogs($commit['msg']);
+ if (strlen($commit['msg-full'])) {
+ $this->assertInLogs($commit['msg-full']);
+ }
+ }
+ }
+
+ public function testGitFormatEmail()
+ {
+ $this->executeTarget('gitLogFormatEmail');
+ foreach($this->testCommits as $commit) {
+ $this->assertInLogs('From ' . $commit['From']);
+ $this->assertInLogs('From: ' . $commit['From:']);
+ $this->assertInLogs('Date: ' . $commit['Date']);
+ $this->assertInLogs('Subject: ' . $commit['Subject']);
+ if (strlen($commit['msg-full'])) {
+ $this->assertInLogs($commit['msg-full']);
+ }
+ }
+ }
+
+ public function testGitFormatCustom()
+ {
+ $this->executeTarget('gitLogFormatCustom');
+ foreach($this->testCommits as $commit) {
+ $this->assertInLogs(
+ sprintf('The author of %s was %s', $commit['commit'], $commit['author']));
+ }
+ }
+
+
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php
new file mode 100644
index 0000000..1581491
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php
@@ -0,0 +1,103 @@
+<?php
+/*
+ * $Id: GitMergeTaskTest.php 1050 2011-03-02 19:39:58Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitMergeTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitMergeTaskTest.php 1050 2011-03-02 19:39:58Z victor $
+ * @package phing.tasks.ext
+ */
+class GitMergeTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitMergeTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-merge: replaying "merge-test-1 merge-test-2" commits');
+ $this->assertInLogs('git-merge output: Already up-to-date.');
+ }
+
+ public function testNoCommitSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('noCommitSet');
+ $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits');
+ $this->assertInLogs('git-merge output: Already up-to-date.');
+ }
+
+ public function testRemoteSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('remoteSet');
+ $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits');
+ $this->assertInLogs('git-merge output: Already up-to-date.');
+ }
+
+ public function testFastForwardCommitSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('fastForwardCommitSet');
+ $this->assertInLogs('git-merge command: /usr/bin/git merge --no-ff \'origin/master\'');
+ $this->assertInLogs('git-merge: replaying "origin/master" commits');
+ $this->assertInLogs('Merge remote branch \'origin/master\' into merge-test-1');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoRemotesSpecified()
+ {
+ $this->expectBuildExceptionContaining('noRemotes',
+ 'At least one commit is required',
+ '"remote" is required parameter');
+ }
+
+ public function testWrongStrategySet()
+ {
+ $this->expectBuildExceptionContaining('wrongStrategySet',
+ 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\'');
+ }
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php
new file mode 100644
index 0000000..35f31e6
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php
@@ -0,0 +1,132 @@
+<?php
+/*
+ * $Id: GitPullTaskTest.php 1018 2010-12-22 08:57:02Z mrook $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitPullTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitPullTaskTest.php 1018 2010-12-22 08:57:02Z mrook $
+ * @package phing.tasks.ext
+ */
+class GitPullTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitPullTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ /*$repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-pull: pulling from origin foobranch');
+ $this->assertInLogs('git-pull: complete');
+ $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3');
+ // make sure that foofile from foobranch made it to master
+ $this->assertTrue(is_readable($repository . '/foofile'));*/
+ }
+
+ public function testAllParamsSetRebase()
+ {
+ /*$repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSetRebase');
+ $this->assertInLogs('git-pull: pulling from origin foobranch');
+ $this->assertInLogs('git-pull: complete');
+ $this->assertInLogs('git-pull output: First, rewinding head to replay your work on top of it...');
+ $this->assertInLogs('Fast-forwarded master to 6ad2ea37a26ce3534073e89043f890c054fddb20.');
+ // make sure that foofile from foobranch made it to master
+ $this->assertTrue(is_readable($repository . '/foofile'));*/
+ }
+
+ public function testAllReposSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allReposSet');
+ $this->assertInLogs('git-pull: fetching from all remotes');
+ $this->assertInLogs('git-pull: complete');
+ }
+
+ public function testTagsSet()
+ {
+ /*$repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('tagsSet');
+ $this->assertInLogs('git-pull: pulling from origin foobranch');
+ $this->assertInLogs('git-pull: complete');
+ $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3');
+ // make sure that foofile from foobranch made it to master
+ $this->assertTrue(is_readable($repository . '/foofile'));*/
+ }
+
+ public function testAppendSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('appendSet');
+ $this->assertInLogs('git-pull: fetching from all remotes');
+ $this->assertInLogs('git-pull: complete');
+ $this->assertInLogs('git-pull output: Already up-to-date.');
+ }
+
+ public function testNoTagsSet()
+ {
+ /*$repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('noTagsSet');
+ $this->assertInLogs('git-pull: pulling from origin foobranch');
+ $this->assertInLogs('git-pull: complete');
+ $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3');
+ // make sure that foofile from foobranch made it to master
+ $this->assertTrue(is_readable($repository . '/foofile'));*/
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testNoSourceSpecified()
+ {
+ $this->expectBuildExceptionContaining('noSource',
+ 'At least one source must be provided',
+ 'No source repository specified');
+ }
+
+ public function testWrongStrategySet()
+ {
+ $this->expectBuildExceptionContaining('wrongStrategySet',
+ 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\'');
+ }
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php
new file mode 100644
index 0000000..dd3c082
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php
@@ -0,0 +1,113 @@
+<?php
+/*
+ * $Id: GitPushTaskTest.php 940 2010-10-16 08:43:41Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitPushTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitPushTaskTest.php 940 2010-10-16 08:43:41Z victor $
+ * @package phing.tasks.ext
+ */
+class GitPushTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitPushTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testAllParamsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allParamsSet');
+ $this->assertInLogs('git-push: pushing to origin master:foobranch');
+ $this->assertInLogs('git-push: complete');
+ }
+
+ public function testAllReposSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('allReposSet');
+ $this->assertInLogs('git-push: push to all refs');
+ $this->assertInLogs('git-push: complete');
+ }
+
+ public function testTagsSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('tagsSet');
+ $this->assertInLogs('git-push: pushing to origin master:foobranch');
+ $this->assertInLogs('git-push: complete');
+ }
+
+ public function testDeleteSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('deleteSet');
+ $this->assertInLogs('git-push: pushing to origin master:newbranch');
+ $this->assertInLogs('git-push: branch delete requested');
+ $this->assertInLogs('git-push: complete');
+ }
+
+ public function testMirrorSet()
+ {
+ $repository = PHING_TEST_BASE . '/tmp/git';
+ $this->executeTarget('mirrorSet');
+ $this->assertInLogs('git-push: mirror all refs');
+ $this->assertInLogs('git-push: complete');
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+ public function testWrongRepo()
+ {
+ $this->expectBuildExceptionContaining('wrongRepo',
+ 'Repo dir is wrong',
+ 'You must specify readable directory as repository.');
+ }
+
+ public function testNoDestinationSpecified()
+ {
+ $this->expectBuildExceptionContaining('noDestination',
+ 'No source set',
+ 'At least one destination must be provided');
+ }
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitTagTaskTest.php b/test/classes/phing/tasks/ext/GitTasks/GitTagTaskTest.php
new file mode 100644
index 0000000..497f2f8
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitTagTaskTest.php
@@ -0,0 +1,188 @@
+<?php
+/*
+ * $Id: GitTagTaskTest.php 1046 2011-03-02 16:53:08Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+require_once '../classes/phing/tasks/ext/git/GitTagTask.php';
+require_once dirname(__FILE__) . '/GitTestsHelper.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: GitTagTaskTest.php 1046 2011-03-02 16:53:08Z victor $
+ * @package phing.tasks.ext
+ */
+class GitTagTaskTest extends BuildFileTest {
+
+ public function setUp() {
+ if (is_readable(PHING_TEST_BASE . '/tmp/git')) {
+ // make sure we purge previously created directory
+ // if left-overs from previous run are found
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+ // set temp directory used by test cases
+ mkdir(PHING_TEST_BASE . '/tmp/git');
+
+ $this->configureProject(PHING_TEST_BASE
+ . '/etc/tasks/ext/GitTagTaskTest.xml');
+ }
+
+ public function tearDown()
+ {
+ GitTestsHelper::rmdir(PHING_TEST_BASE . '/tmp/git');
+ }
+
+ public function testGitTagCreate()
+ {
+ $this->executeTarget('gitTagCreate');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testGitTagReplaceCreateDuplicate()
+ {
+ $this->executeTarget('gitTagReplaceCreateDuplicate');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -f \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testGitTagForceCreateDuplicate()
+ {
+ $this->executeTarget('gitTagForceCreateDuplicate');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -f \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testGitTagCreateDuplicate()
+ {
+ $this->expectBuildExceptionContaining('gitTagCreateDuplicate',
+ 'Tag already exists',
+ "fatal: tag 'ver1.0' already exists");
+ }
+
+ public function testTagCreateAnnotatedNoMessage()
+ {
+ $this->expectBuildExceptionContaining('gitTagCreateAnnotatedNoMessage',
+ 'Message not provided..',
+ '"message" or "file" required to make a tag');
+ }
+
+ public function testTagCreateAnnotated()
+ {
+ $this->executeTarget('gitTagCreateAnnotated');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -a -m\'Version 1.0 tag\' \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testTagCreateAnnotatedImplicit()
+ {
+ $this->executeTarget('gitTagCreateAnnotatedImplicit');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -m\'Version 1.0 tag\' \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testTagDelete()
+ {
+ $this->executeTarget('gitTagDelete');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver2.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -d \'ver2.0\'');
+ $this->assertInLogs('git-tag output: Deleted tag \'ver2.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs(' ver1.0');
+ $this->assertNotInLogs("\n" . 'ver2.0');
+ }
+
+ public function testTagListByPattern()
+ {
+ $this->executeTarget('gitTagListByPattern');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver2.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'marked\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l \'marked\'');
+ $this->assertInLogs('git-tag output: marked');
+ }
+
+ public function testTagOutputPropertySet()
+ {
+ $this->executeTarget('gitTagOutpuPropertySet');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver2.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'marked\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l \'marked\'');
+ $this->assertInLogs('git-tag output: marked');
+ $this->assertPropertyEquals('gitLogOutput', 'marked' . "\n");
+ }
+
+ public function testTagWithCommitSet()
+ {
+ $this->executeTarget('gitTagWithCommitSet');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver1.0\' \'c573116f395d36497a1ac1dba565ecd3d3944277\'');
+ $this->assertInLogs('c573116f395d36497a1ac1dba565ecd3d3944277');
+ $this->assertInLogs('b8cddb3fa5f408560d0d00d6c8721fe333895888');
+ $this->assertInLogs('6dbaf4508e75dcd426b5b974a67c462c70d46e1f');
+ $this->assertNotInLogs('1b767b75bb5329f4e53345c516c0a9f4ed32d330');
+ $this->assertNotInLogs('ee07085160003ffd1100867deb6059bae0c45455');
+ }
+
+ public function testTagWithObjectSet()
+ {
+ $this->executeTarget('gitTagWithObjectSet');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag \'ver1.0\' \'c573116f395d36497a1ac1dba565ecd3d3944277\'');
+ $this->assertInLogs('c573116f395d36497a1ac1dba565ecd3d3944277');
+ $this->assertInLogs('b8cddb3fa5f408560d0d00d6c8721fe333895888');
+ $this->assertInLogs('6dbaf4508e75dcd426b5b974a67c462c70d46e1f');
+ $this->assertNotInLogs('1b767b75bb5329f4e53345c516c0a9f4ed32d330');
+ $this->assertNotInLogs('ee07085160003ffd1100867deb6059bae0c45455');
+ }
+
+ public function testTagCreateSignedDefaultKey()
+ {
+ $this->markTestSkipped('Involves configured GPG key');
+ $this->executeTarget('gitTagCreateSignedDefaultKey');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -m\'Version 1.0 tag\' \'ver1.0\'');
+ $this->assertInLogs('git-tag command: /usr/bin/git tag -l');
+ $this->assertInLogs('git-tag output: ver1.0');
+ }
+
+ public function testTagFileSet()
+ {
+ $msgFile = PHING_TEST_BASE . '/tmp/msg.txt';
+ $fp = fopen($msgFile, 'w');
+ fwrite($fp , 'test tag message');
+ fclose($fp);
+
+ $this->executeTarget('gitTagFileSet');
+ $this->assertInLogs("/usr/bin/git tag -F'{$msgFile}' 'ver1.0'");
+
+ unlink($msgFile);
+ }
+
+ public function testNoRepositorySpecified()
+ {
+ $this->expectBuildExceptionContaining('noRepository',
+ 'Repo dir is required',
+ '"repository" is required parameter');
+ }
+
+
+}
diff --git a/test/classes/phing/tasks/ext/GitTasks/GitTestsHelper.php b/test/classes/phing/tasks/ext/GitTasks/GitTestsHelper.php
new file mode 100644
index 0000000..0156c4d
--- /dev/null
+++ b/test/classes/phing/tasks/ext/GitTasks/GitTestsHelper.php
@@ -0,0 +1,56 @@
+<?php
+class GitTestsHelper
+{
+ public static function rmdir($dir)
+ {
+ if (!file_exists($dir)) return true;
+ if (!is_dir($dir)) return unlink($dir);
+ foreach (scandir($dir) as $item) {
+ if ($item == '.' || $item == '..') continue;
+ if (!self::rmdir($dir.DIRECTORY_SEPARATOR.$item)) return false;
+ }
+ return rmdir($dir);
+ }
+
+ /**
+ * Get relative date
+ *
+ * @param int $timestamp Timestamp to us as pin-point
+ * @param string $type Whether 'fulldate' or 'time'
+ */
+ public static function getRelativeDate($timestamp, $type = 'fulldate')
+ {
+ // calculate the diffrence
+ $timediff = time () - $timestamp ;
+
+ if ($timediff < 3600) {
+ if ($timediff < 120) {
+ $returndate = "1 minute ago";
+ } else {
+ $returndate = round($timediff / 60) . " minutes ago";
+ }
+ } else if ($timediff < 7200) {
+ $returndate = "1 hour ago.";
+ } else if ($timediff < 86400) {
+ $returndate = round($timediff / 3600) . " hours ago";
+ } else if ($timediff < 172800) {
+ $returndate = "1 day ago.";
+ } else if ($timediff < 604800) {
+ $returndate = round($timediff / 86400) . " days ago";
+ } else if ($timediff < 1209600) {
+ $returndate = "1 week ago.";
+ $returndate = round($timediff / 86400) . " days ago";
+ } else if ($timediff < 2629744) {
+ $returndate = round($timediff / 86400) . " days ago";
+ } else if ($timediff < 3024000) {
+ $returndate = round($timediff / 604900) . " weeks ago";
+ } else if ($timediff > 5259486) {
+ $returndate = round($timediff / 2629744) . " months ago";
+ } else {
+ $returndate = round($timediff / 604900) . " weeks ago";
+ }
+
+ return $returndate;
+ }
+
+}
diff --git a/test/classes/phing/tasks/system/UpToDateTaskTest.php b/test/classes/phing/tasks/system/UpToDateTaskTest.php
new file mode 100644
index 0000000..d615546
--- /dev/null
+++ b/test/classes/phing/tasks/system/UpToDateTaskTest.php
@@ -0,0 +1,64 @@
+<?php
+/*
+ * $Id: UpToDateTaskTest.php 911 2010-10-08 12:34:14Z victor $
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information please see
+ * <http://phing.info>.
+ */
+
+require_once 'phing/BuildFileTest.php';
+
+/**
+ * @author Victor Farazdagi <simple.square at gmail.com>
+ * @version $Id: UpToDateTaskTest.php 911 2010-10-08 12:34:14Z victor $
+ * @package phing.tasks.ext
+ */
+class UpToDateTaskTest extends BuildFileTest
+{
+
+ public function setUp()
+ {
+ $this->configureProject(PHING_TEST_BASE
+ . "/etc/tasks/system/UpToDateTest.xml");
+ }
+
+ /**
+ * @group ticket-559
+ */
+ public function testOverrideNoPropertySet()
+ {
+ $this->executeTarget("overrideNoPropertySet");
+ $this->assertInLogs('Property ${prop} has not been set.');
+ $this->assertInLogs('Property ${prop} => updated');
+ $this->assertInLogs('echo = ${prop}');
+ $this->assertInLogs('echo = updated');
+ }
+
+ /**
+ * @group ticket-559
+ */
+ public function testOverridePropertySet()
+ {
+ $this->executeTarget("overridePropertySet");
+ $this->assertInLogs('Setting project property: prop -> value exists');
+ $this->assertInLogs('Property ${prop} => value exists');
+ $this->assertInLogs('Property ${prop} => updated');
+ $this->assertInLogs('echo = value exists');
+ $this->assertInLogs('echo = updated');
+ }
+
+}
+
diff --git a/test/etc/components/Target/HiddenTargets.xml b/test/etc/components/Target/HiddenTargets.xml
new file mode 100644
index 0000000..1e168f6
--- /dev/null
+++ b/test/etc/components/Target/HiddenTargets.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<project name="IgnoreTargets" default="invalid">
+ <property name="cur.dir" value="." />
+ <resolvepath propertyName="cur.dir.resolved" file="${cur.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="ShowInListTarget" hidden="false"></target>
+ <target name="HideInListTarget" hidden="true"></target>
+
+</project>
diff --git a/test/etc/components/Target/Target.xml b/test/etc/components/Target/Target.xml
new file mode 100644
index 0000000..373296d
--- /dev/null
+++ b/test/etc/components/Target/Target.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<project name="TargetTest" default="invalid">
+ <property name="cur.dir" value="." />
+ <resolvepath propertyName="cur.dir.resolved" file="${cur.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+</project>
diff --git a/test/etc/regression/137/build.xml b/test/etc/regression/137/build.xml
old mode 100755
new mode 100644
index f7d47f5..32b602e
--- a/test/etc/regression/137/build.xml
+++ b/test/etc/regression/137/build.xml
@@ -5,15 +5,17 @@
<delete file="test.zip"/>
<zip destfile="test.zip">
- <fileset dir="." defaultexcludes="false">
- <include name="**"/>
- <exclude name="**/.gitignore"/>
- <exclude name=".git/"/>
- <exclude name="cache/"/>
- <exclude name="build.xml"/>
- <exclude name="data/config.php"/>
- </fileset>
- </zip>
+ <fileset dir="." defaultexcludes="false">
+ <include name="**"/>
+ <exclude name="**/.gitignore"/>
+ <exclude name=".git/"/>
+ <exclude name="cache/"/>
+ <exclude name="build.xml"/>
+ <exclude name="data/config.php"/>
+ </fileset>
+</zip>
+<!-- cleanup -->
+<delete file="test.zip" />
</target>
-</project>
\ No newline at end of file
+</project>
diff --git a/test/etc/regression/137/test.zip b/test/etc/regression/137/test.zip
deleted file mode 100644
index f4df82a..0000000
Binary files a/test/etc/regression/137/test.zip and /dev/null differ
diff --git a/test/etc/regression/204/Dir/Subdir/SampleTask.php b/test/etc/regression/204/Dir/Subdir/SampleTask.php
old mode 100755
new mode 100644
diff --git a/test/etc/regression/204/build.xml b/test/etc/regression/204/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/229/build.xml b/test/etc/regression/229/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/252/build.xml b/test/etc/regression/252/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/269/build.xml b/test/etc/regression/269/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/269/testoutput b/test/etc/regression/269/testoutput
deleted file mode 100644
index afa6179..0000000
--- a/test/etc/regression/269/testoutput
+++ /dev/null
@@ -1 +0,0 @@
-staging-user1
\ No newline at end of file
diff --git a/test/etc/regression/299/build.xml b/test/etc/regression/299/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/307/anotherfile.bak b/test/etc/regression/307/anotherfile.bak
deleted file mode 100644
index add8373..0000000
--- a/test/etc/regression/307/anotherfile.bak
+++ /dev/null
@@ -1 +0,0 @@
-BAR
\ No newline at end of file
diff --git a/test/etc/regression/307/build.xml b/test/etc/regression/307/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/337/TestPhpLintTask.php b/test/etc/regression/337/TestPhpLintTask.php
old mode 100755
new mode 100644
diff --git a/test/etc/regression/337/build.xml b/test/etc/regression/337/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/360/build.xml b/test/etc/regression/360/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/363/HelloWorld.php b/test/etc/regression/363/HelloWorld.php
old mode 100755
new mode 100644
diff --git a/test/etc/regression/363/HelloWorldTest.php b/test/etc/regression/363/HelloWorldTest.php
old mode 100755
new mode 100644
diff --git a/test/etc/regression/363/build.xml b/test/etc/regression/363/build.xml
old mode 100755
new mode 100644
diff --git a/test/etc/regression/376/build.xml b/test/etc/regression/376/build.xml
old mode 100755
new mode 100644
index 09370dd..61fd956
--- a/test/etc/regression/376/build.xml
+++ b/test/etc/regression/376/build.xml
@@ -11,5 +11,7 @@
</replacetokens>
</filterchain>
</copy>
+ <!-- clean up -->
+ <delete file="newfile" />
</target>
-</project>
\ No newline at end of file
+</project>
diff --git a/test/etc/regression/376/newfile b/test/etc/regression/376/newfile
deleted file mode 100644
index da29283..0000000
--- a/test/etc/regression/376/newfile
+++ /dev/null
@@ -1,2 +0,0 @@
-true
-false
diff --git a/test/etc/regression/501/bootstrap.php b/test/etc/regression/501/bootstrap.php
new file mode 100644
index 0000000..3bc7fd3
--- /dev/null
+++ b/test/etc/regression/501/bootstrap.php
@@ -0,0 +1,2 @@
+<?php
+defined('PHING_TEST_BASE') or define('PHING_TEST_BASE', dirname(__FILE__) . '/../../../');
diff --git a/test/etc/regression/501/build.xml b/test/etc/regression/501/build.xml
new file mode 100644
index 0000000..2b3908e
--- /dev/null
+++ b/test/etc/regression/501/build.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project name="test" default="main">
+ <target name="main" description="Unit testing and code coverage">
+ <property name="base.dir" value="../../../.." />
+ <property name="build.dir" value="." />
+ <resolvepath propertyName="base.dir.resolved" file="${base.dir}" />
+ <resolvepath propertyName="build.dir.resolved" file="${build.dir}" />
+ <coverage-setup database="${build.dir}/coverage.db">
+ <fileset dir="${base.dir.resolved}/classes/phing/system">
+ <exclude name="form/**/*.php"/>
+ </fileset>
+ </coverage-setup>
+
+ <phpunit codecoverage="true" bootstrap="${build.dir}/bootstrap.php">
+ <formatter todir="${build.dir}" type="clover"/>
+ <formatter todir="${build.dir}" type="xml"/>
+ <formatter usefile="false" type="plain"/>
+ <batchtest>
+ <fileset dir="${base.dir.resolved}/test/classes/phing/system">
+ <include name="**/*.php"/>
+ </fileset>
+ </batchtest>
+ </phpunit>
+ </target>
+</project>
diff --git a/test/etc/regression/501/clover-coverage.xml b/test/etc/regression/501/clover-coverage.xml
new file mode 100644
index 0000000..50d236f
--- /dev/null
+++ b/test/etc/regression/501/clover-coverage.xml
@@ -0,0 +1,1510 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<coverage generated="1289394418">
+ <project timestamp="1289394418">
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/BufferedReader.php">
+ <class name="BufferedReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="47" coveredstatements="0" elements="57" coveredelements="0"/>
+ </class>
+ <line num="50" type="method" name="__construct" crap="2" count="0"/>
+ <line num="51" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="60" type="method" name="read" crap="30" count="0"/>
+ <line num="63" type="stmt" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <line num="70" type="stmt" count="0"/>
+ <line num="71" type="stmt" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <line num="76" type="stmt" count="0"/>
+ <line num="77" type="stmt" count="0"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="82" type="stmt" count="0"/>
+ <line num="83" type="stmt" count="0"/>
+ <line num="85" type="stmt" count="0"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="87" type="stmt" count="0"/>
+ <line num="90" type="method" name="skip" crap="2" count="0"/>
+ <line num="91" type="stmt" count="0"/>
+ <line num="94" type="method" name="reset" crap="2" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="98" type="method" name="close" crap="2" count="0"/>
+ <line num="99" type="stmt" count="0"/>
+ <line num="102" type="method" name="open" crap="2" count="0"/>
+ <line num="103" type="stmt" count="0"/>
+ <line num="109" type="method" name="readLine" crap="30" count="0"/>
+ <line num="110" type="stmt" count="0"/>
+ <line num="111" type="stmt" count="0"/>
+ <line num="112" type="stmt" count="0"/>
+ <line num="113" type="stmt" count="0"/>
+ <line num="115" type="stmt" count="0"/>
+ <line num="116" type="stmt" count="0"/>
+ <line num="119" type="stmt" count="0"/>
+ <line num="120" type="stmt" count="0"/>
+ <line num="122" type="stmt" count="0"/>
+ <line num="129" type="method" name="readChar" crap="30" count="0"/>
+ <line num="131" type="stmt" count="0"/>
+ <line num="133" type="stmt" count="0"/>
+ <line num="134" type="stmt" count="0"/>
+ <line num="135" type="stmt" count="0"/>
+ <line num="136" type="stmt" count="0"/>
+ <line num="137" type="stmt" count="0"/>
+ <line num="138" type="stmt" count="0"/>
+ <line num="140" type="stmt" count="0"/>
+ <line num="144" type="stmt" count="0"/>
+ <line num="145" type="stmt" count="0"/>
+ <line num="146" type="stmt" count="0"/>
+ <line num="147" type="stmt" count="0"/>
+ <line num="148" type="stmt" count="0"/>
+ <line num="149" type="stmt" count="0"/>
+ <line num="152" type="stmt" count="0"/>
+ <line num="161" type="method" name="eof" crap="2" count="0"/>
+ <line num="162" type="stmt" count="0"/>
+ <line num="165" type="method" name="getResource" crap="2" count="0"/>
+ <line num="166" type="stmt" count="0"/>
+ <metrics loc="168" ncloc="89" classes="1" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="47" coveredstatements="0" elements="57" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/BufferedWriter.php">
+ <class name="BufferedWriter" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="0" elements="16" coveredelements="0"/>
+ </class>
+ <line num="43" type="method" name="__construct" crap="2" count="0"/>
+ <line num="44" type="stmt" count="0"/>
+ <line num="45" type="stmt" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="48" type="method" name="write" crap="2" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="52" type="method" name="newLine" crap="2" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="0"/>
+ <line num="56" type="method" name="getResource" crap="2" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="60" type="method" name="flush" crap="2" count="0"/>
+ <line num="61" type="stmt" count="0"/>
+ <line num="62" type="stmt" count="0"/>
+ <line num="67" type="method" name="close" crap="2" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <metrics loc="71" ncloc="36" classes="1" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="0" elements="16" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/ConsoleReader.php">
+ <class name="ConsoleReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="15" coveredelements="0"/>
+ </class>
+ <line num="34" type="method" name="readLine" crap="2" count="0"/>
+ <line num="36" type="stmt" count="0"/>
+ <line num="37" type="stmt" count="0"/>
+ <line num="39" type="stmt" count="0"/>
+ <line num="47" type="method" name="read" crap="2" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="60" type="method" name="close" crap="2" count="0"/>
+ <line num="62" type="stmt" count="0"/>
+ <line num="64" type="method" name="open" crap="2" count="0"/>
+ <line num="66" type="stmt" count="0"/>
+ <line num="72" type="method" name="eof" crap="2" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <line num="80" type="method" name="getResource" crap="2" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <metrics loc="84" ncloc="30" classes="1" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="15" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FileInputStream.php">
+ <class name="FileInputStream" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="3" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="0" elements="16" coveredelements="0"/>
+ </class>
+ <line num="43" type="method" name="__construct" crap="20" count="0"/>
+ <line num="44" type="stmt" count="0"/>
+ <line num="45" type="stmt" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="47" type="stmt" count="0"/>
+ <line num="48" type="stmt" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="64" type="method" name="__toString" crap="2" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <line num="72" type="method" name="markSupported" crap="2" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <metrics loc="76" ncloc="35" classes="1" methods="3" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="0" elements="16" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FileOutputStream.php">
+ <class name="FileOutputStream" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="2" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="15" coveredstatements="8" elements="17" coveredelements="9"/>
+ </class>
+ <line num="44" type="method" name="__construct" crap="6.97" count="2"/>
+ <line num="45" type="stmt" count="2"/>
+ <line num="46" type="stmt" count="2"/>
+ <line num="47" type="stmt" count="2"/>
+ <line num="48" type="stmt" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="50" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="2"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="0"/>
+ <line num="55" type="stmt" count="2"/>
+ <line num="57" type="stmt" count="2"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="60" type="stmt" count="2"/>
+ <line num="61" type="stmt" count="2"/>
+ <line num="67" type="method" name="__toString" crap="2" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <metrics loc="71" ncloc="33" classes="1" methods="2" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="15" coveredstatements="8" elements="17" coveredelements="9"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FileReader.php">
+ <class name="FileReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="4" coveredelements="0"/>
+ </class>
+ <line num="35" type="method" name="__construct" crap="2" count="0"/>
+ <line num="36" type="stmt" count="0"/>
+ <line num="37" type="stmt" count="0"/>
+ <line num="38" type="stmt" count="0"/>
+ <metrics loc="41" ncloc="14" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="4" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FileSystem.php">
+ <class name="FileSystem" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="39" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="222" coveredstatements="5" elements="261" coveredelements="7"/>
+ </class>
+ <line num="57" type="method" name="getFileSystem" crap="22.91" count="2"/>
+ <line num="58" type="stmt" count="2"/>
+ <line num="59" type="stmt" count="0"/>
+ <line num="60" type="stmt" count="0"/>
+ <line num="61" type="stmt" count="0"/>
+ <line num="62" type="stmt" count="0"/>
+ <line num="63" type="stmt" count="0"/>
+ <line num="64" type="stmt" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <line num="66" type="stmt" count="0"/>
+ <line num="67" type="stmt" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <line num="69" type="stmt" count="0"/>
+ <line num="70" type="stmt" count="0"/>
+ <line num="71" type="stmt" count="0"/>
+ <line num="72" type="stmt" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <line num="74" type="stmt" count="0"/>
+ <line num="75" type="stmt" count="0"/>
+ <line num="76" type="stmt" count="2"/>
+ <line num="84" type="method" name="getSeparator" crap="2" count="0"/>
+ <line num="89" type="method" name="getPathSeparator" crap="2" count="0"/>
+ <line num="95" type="method" name="normalize" crap="2" count="0"/>
+ <line num="101" type="method" name="prefixLength" crap="2" count="0"/>
+ <line num="108" type="method" name="resolve" crap="2" count="0"/>
+ <line num="114" type="method" name="resolveFile" crap="2" count="0"/>
+ <line num="121" type="method" name="getDefaultParent" crap="2" count="0"/>
+ <line num="129" type="method" name="fromURIPath" crap="2" count="0"/>
+ <line num="136" type="method" name="isAbsolute" crap="2" count="0"/>
+ <line num="142" type="method" name="canonicalize" crap="2" count="0"/>
+ <line num="143" type="stmt" count="0"/>
+ <line num="153" type="method" name="getBooleanAttributes" crap="2" count="0"/>
+ <line num="154" type="stmt" count="0"/>
+ <line num="165" type="method" name="checkAccess" crap="42" count="0"/>
+ <line num="168" type="stmt" count="0"/>
+ <line num="174" type="stmt" count="0"/>
+ <line num="179" type="stmt" count="0"/>
+ <line num="180" type="stmt" count="0"/>
+ <line num="181" type="stmt" count="0"/>
+ <line num="182" type="stmt" count="0"/>
+ <line num="183" type="stmt" count="0"/>
+ <line num="185" type="stmt" count="0"/>
+ <line num="187" type="stmt" count="0"/>
+ <line num="188" type="stmt" count="0"/>
+ <line num="190" type="stmt" count="0"/>
+ <line num="199" type="method" name="canDelete" crap="2" count="0"/>
+ <line num="201" type="stmt" count="0"/>
+ <line num="202" type="stmt" count="0"/>
+ <line num="203" type="stmt" count="0"/>
+ <line num="211" type="method" name="getLastModifiedTime" crap="12" count="0"/>
+ <line num="213" type="stmt" count="0"/>
+ <line num="214" type="stmt" count="0"/>
+ <line num="217" type="stmt" count="0"/>
+ <line num="218" type="stmt" count="0"/>
+ <line num="219" type="stmt" count="0"/>
+ <line num="220" type="stmt" count="0"/>
+ <line num="222" type="stmt" count="0"/>
+ <line num="223" type="stmt" count="0"/>
+ <line num="225" type="stmt" count="0"/>
+ <line num="234" type="method" name="getLength" crap="6" count="0"/>
+ <line num="235" type="stmt" count="0"/>
+ <line num="236" type="stmt" count="0"/>
+ <line num="237" type="stmt" count="0"/>
+ <line num="238" type="stmt" count="0"/>
+ <line num="240" type="stmt" count="0"/>
+ <line num="241" type="stmt" count="0"/>
+ <line num="257" type="method" name="createNewFile" crap="12" count="0"/>
+ <line num="258" type="stmt" count="0"/>
+ <line num="259" type="stmt" count="0"/>
+ <line num="262" type="stmt" count="0"/>
+ <line num="263" type="stmt" count="0"/>
+ <line num="264" type="stmt" count="0"/>
+ <line num="266" type="stmt" count="0"/>
+ <line num="267" type="stmt" count="0"/>
+ <line num="274" type="method" name="delete" crap="6" count="0"/>
+ <line num="275" type="stmt" count="0"/>
+ <line num="276" type="stmt" count="0"/>
+ <line num="278" type="stmt" count="0"/>
+ <line num="287" type="method" name="deleteOnExit" crap="2" count="0"/>
+ <line num="288" type="stmt" count="0"/>
+ <line num="296" type="method" name="listDir" crap="30" count="0"/>
+ <line num="297" type="stmt" count="0"/>
+ <line num="298" type="stmt" count="0"/>
+ <line num="299" type="stmt" count="0"/>
+ <line num="300" type="stmt" count="0"/>
+ <line num="302" type="stmt" count="0"/>
+ <line num="303" type="stmt" count="0"/>
+ <line num="304" type="stmt" count="0"/>
+ <line num="305" type="stmt" count="0"/>
+ <line num="306" type="stmt" count="0"/>
+ <line num="307" type="stmt" count="0"/>
+ <line num="308" type="stmt" count="0"/>
+ <line num="309" type="stmt" count="0"/>
+ <line num="310" type="stmt" count="0"/>
+ <line num="319" type="method" name="createDirectory" crap="2" count="0"/>
+ <line num="320" type="stmt" count="0"/>
+ <line num="321" type="stmt" count="0"/>
+ <line num="322" type="stmt" count="0"/>
+ <line num="323" type="stmt" count="0"/>
+ <line num="336" type="method" name="rename" crap="6" count="0"/>
+ <line num="338" type="stmt" count="0"/>
+ <line num="339" type="stmt" count="0"/>
+ <line num="340" type="stmt" count="0"/>
+ <line num="341" type="stmt" count="0"/>
+ <line num="342" type="stmt" count="0"/>
+ <line num="344" type="stmt" count="0"/>
+ <line num="353" type="method" name="setLastModifiedTime" crap="6" count="0"/>
+ <line num="354" type="stmt" count="0"/>
+ <line num="355" type="stmt" count="0"/>
+ <line num="356" type="stmt" count="0"/>
+ <line num="357" type="stmt" count="0"/>
+ <line num="359" type="stmt" count="0"/>
+ <line num="366" type="method" name="setReadOnly" crap="2" count="0"/>
+ <line num="367" type="stmt" count="0"/>
+ <line num="375" type="method" name="listRoots" crap="2" count="0"/>
+ <line num="376" type="stmt" count="0"/>
+ <line num="384" type="method" name="compare" crap="2" count="0"/>
+ <line num="385" type="stmt" count="0"/>
+ <line num="397" type="method" name="copy" crap="20" count="0"/>
+ <line num="398" type="stmt" count="0"/>
+ <line num="401" type="stmt" count="0"/>
+ <line num="402" type="stmt" count="0"/>
+ <line num="405" type="stmt" count="0"/>
+ <line num="406" type="stmt" count="0"/>
+ <line num="408" type="stmt" count="0"/>
+ <line num="410" type="stmt" count="0"/>
+ <line num="411" type="stmt" count="0"/>
+ <line num="415" type="stmt" count="0"/>
+ <line num="416" type="stmt" count="0"/>
+ <line num="420" type="stmt" count="0"/>
+ <line num="432" type="method" name="copyr" crap="56" count="0"/>
+ <line num="435" type="stmt" count="0"/>
+ <line num="436" type="stmt" count="0"/>
+ <line num="440" type="stmt" count="0"/>
+ <line num="441" type="stmt" count="0"/>
+ <line num="445" type="stmt" count="0"/>
+ <line num="446" type="stmt" count="0"/>
+ <line num="447" type="stmt" count="0"/>
+ <line num="450" type="stmt" count="0"/>
+ <line num="451" type="stmt" count="0"/>
+ <line num="453" type="stmt" count="0"/>
+ <line num="454" type="stmt" count="0"/>
+ <line num="458" type="stmt" count="0"/>
+ <line num="459" type="stmt" count="0"/>
+ <line num="462" type="stmt" count="0"/>
+ <line num="463" type="stmt" count="0"/>
+ <line num="475" type="method" name="chown" crap="12" count="0"/>
+ <line num="476" type="stmt" count="0"/>
+ <line num="477" type="stmt" count="0"/>
+ <line num="478" type="stmt" count="0"/>
+ <line num="480" type="stmt" count="0"/>
+ <line num="491" type="method" name="chgrp" crap="12" count="0"/>
+ <line num="492" type="stmt" count="0"/>
+ <line num="493" type="stmt" count="0"/>
+ <line num="494" type="stmt" count="0"/>
+ <line num="496" type="stmt" count="0"/>
+ <line num="509" type="method" name="chmod" crap="12" count="0"/>
+ <line num="510" type="stmt" count="0"/>
+ <line num="511" type="stmt" count="0"/>
+ <line num="512" type="stmt" count="0"/>
+ <line num="513" type="stmt" count="0"/>
+ <line num="515" type="stmt" count="0"/>
+ <line num="522" type="method" name="lock" crap="6" count="0"/>
+ <line num="523" type="stmt" count="0"/>
+ <line num="524" type="stmt" count="0"/>
+ <line num="525" type="stmt" count="0"/>
+ <line num="526" type="stmt" count="0"/>
+ <line num="527" type="stmt" count="0"/>
+ <line num="528" type="stmt" count="0"/>
+ <line num="530" type="stmt" count="0"/>
+ <line num="538" type="method" name="unlock" crap="6" count="0"/>
+ <line num="539" type="stmt" count="0"/>
+ <line num="540" type="stmt" count="0"/>
+ <line num="541" type="stmt" count="0"/>
+ <line num="542" type="stmt" count="0"/>
+ <line num="543" type="stmt" count="0"/>
+ <line num="544" type="stmt" count="0"/>
+ <line num="546" type="stmt" count="0"/>
+ <line num="556" type="method" name="unlink" crap="2.26" count="2"/>
+ <line num="557" type="stmt" count="2"/>
+ <line num="558" type="stmt" count="2"/>
+ <line num="559" type="stmt" count="0"/>
+ <line num="560" type="stmt" count="0"/>
+ <line num="562" type="stmt" count="2"/>
+ <line num="573" type="method" name="symlink" crap="6" count="0"/>
+ <line num="578" type="stmt" count="0"/>
+ <line num="580" type="stmt" count="0"/>
+ <line num="581" type="stmt" count="0"/>
+ <line num="584" type="stmt" count="0"/>
+ <line num="593" type="method" name="touch" crap="12" count="0"/>
+ <line num="594" type="stmt" count="0"/>
+ <line num="596" type="stmt" count="0"/>
+ <line num="597" type="stmt" count="0"/>
+ <line num="598" type="stmt" count="0"/>
+ <line num="599" type="stmt" count="0"/>
+ <line num="602" type="stmt" count="0"/>
+ <line num="604" type="stmt" count="0"/>
+ <line num="605" type="stmt" count="0"/>
+ <line num="607" type="stmt" count="0"/>
+ <line num="618" type="method" name="rmdir" crap="156" count="0"/>
+ <line num="619" type="stmt" count="0"/>
+ <line num="622" type="stmt" count="0"/>
+ <line num="624" type="stmt" count="0"/>
+ <line num="626" type="stmt" count="0"/>
+ <line num="627" type="stmt" count="0"/>
+ <line num="630" type="stmt" count="0"/>
+ <line num="632" type="stmt" count="0"/>
+ <line num="634" type="stmt" count="0"/>
+ <line num="636" type="stmt" count="0"/>
+ <line num="637" type="stmt" count="0"/>
+ <line num="642" type="stmt" count="0"/>
+ <line num="644" type="stmt" count="0"/>
+ <line num="650" type="stmt" count="0"/>
+ <line num="651" type="stmt" count="0"/>
+ <line num="652" type="stmt" count="0"/>
+ <line num="653" type="stmt" count="0"/>
+ <line num="660" type="stmt" count="0"/>
+ <line num="663" type="stmt" count="0"/>
+ <line num="664" type="stmt" count="0"/>
+ <line num="665" type="stmt" count="0"/>
+ <line num="666" type="stmt" count="0"/>
+ <line num="669" type="stmt" count="0"/>
+ <line num="672" type="stmt" count="0"/>
+ <line num="673" type="stmt" count="0"/>
+ <line num="674" type="stmt" count="0"/>
+ <line num="675" type="stmt" count="0"/>
+ <line num="679" type="stmt" count="0"/>
+ <line num="680" type="stmt" count="0"/>
+ <line num="684" type="stmt" count="0"/>
+ <line num="686" type="stmt" count="0"/>
+ <line num="688" type="stmt" count="0"/>
+ <line num="689" type="stmt" count="0"/>
+ <line num="694" type="stmt" count="0"/>
+ <line num="705" type="method" name="umask" crap="6" count="0"/>
+ <line num="706" type="stmt" count="0"/>
+ <line num="712" type="stmt" count="0"/>
+ <line num="714" type="stmt" count="0"/>
+ <line num="716" type="stmt" count="0"/>
+ <line num="717" type="stmt" count="0"/>
+ <line num="719" type="stmt" count="0"/>
+ <line num="734" type="method" name="compareMTimes" crap="30" count="0"/>
+ <line num="736" type="stmt" count="0"/>
+ <line num="737" type="stmt" count="0"/>
+ <line num="739" type="stmt" count="0"/>
+ <line num="741" type="stmt" count="0"/>
+ <line num="742" type="stmt" count="0"/>
+ <line num="743" type="stmt" count="0"/>
+ <line num="745" type="stmt" count="0"/>
+ <line num="746" type="stmt" count="0"/>
+ <line num="749" type="stmt" count="0"/>
+ <line num="750" type="stmt" count="0"/>
+ <line num="752" type="stmt" count="0"/>
+ <metrics loc="757" ncloc="324" classes="1" methods="39" coveredmethods="2" conditionals="0" coveredconditionals="0" statements="222" coveredstatements="5" elements="261" coveredelements="7"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FileWriter.php">
+ <class name="FileWriter" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="4" coveredelements="0"/>
+ </class>
+ <line num="37" type="method" name="__construct" crap="2" count="0"/>
+ <line num="38" type="stmt" count="0"/>
+ <line num="39" type="stmt" count="0"/>
+ <line num="40" type="stmt" count="0"/>
+ <metrics loc="42" ncloc="13" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="4" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/FilterReader.php">
+ <class name="FilterReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="7" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="16" coveredelements="0"/>
+ </class>
+ <line num="35" type="method" name="__construct" crap="2" count="0"/>
+ <line num="36" type="stmt" count="0"/>
+ <line num="37" type="stmt" count="0"/>
+ <line num="39" type="method" name="setReader" crap="2" count="0"/>
+ <line num="40" type="stmt" count="0"/>
+ <line num="41" type="stmt" count="0"/>
+ <line num="43" type="method" name="skip" crap="2" count="0"/>
+ <line num="44" type="stmt" count="0"/>
+ <line num="52" type="method" name="read" crap="2" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="56" type="method" name="reset" crap="2" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="60" type="method" name="close" crap="2" count="0"/>
+ <line num="61" type="stmt" count="0"/>
+ <line num="64" type="method" name="getResource" crap="2" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <metrics loc="68" ncloc="37" classes="1" methods="7" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="16" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/InputStream.php">
+ <class name="InputStream" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="47" coveredstatements="0" elements="57" coveredelements="0"/>
+ </class>
+ <line num="48" type="method" name="__construct" crap="6" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="50" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="59" type="method" name="skip" crap="12" count="0"/>
+ <line num="60" type="stmt" count="0"/>
+ <line num="62" type="stmt" count="0"/>
+ <line num="63" type="stmt" count="0"/>
+ <line num="64" type="stmt" count="0"/>
+ <line num="66" type="stmt" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <line num="69" type="stmt" count="0"/>
+ <line num="71" type="stmt" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <line num="81" type="method" name="read" crap="20" count="0"/>
+ <line num="83" type="stmt" count="0"/>
+ <line num="84" type="stmt" count="0"/>
+ <line num="87" type="stmt" count="0"/>
+ <line num="88" type="stmt" count="0"/>
+ <line num="89" type="stmt" count="0"/>
+ <line num="90" type="stmt" count="0"/>
+ <line num="91" type="stmt" count="0"/>
+ <line num="92" type="stmt" count="0"/>
+ <line num="93" type="stmt" count="0"/>
+ <line num="94" type="stmt" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="98" type="stmt" count="0"/>
+ <line num="105" type="method" name="mark" crap="6" count="0"/>
+ <line num="106" type="stmt" count="0"/>
+ <line num="107" type="stmt" count="0"/>
+ <line num="109" type="stmt" count="0"/>
+ <line num="110" type="stmt" count="0"/>
+ <line num="116" type="method" name="markSupported" crap="2" count="0"/>
+ <line num="117" type="stmt" count="0"/>
+ <line num="124" type="method" name="reset" crap="6" count="0"/>
+ <line num="125" type="stmt" count="0"/>
+ <line num="126" type="stmt" count="0"/>
+ <line num="129" type="stmt" count="0"/>
+ <line num="130" type="stmt" count="0"/>
+ <line num="131" type="stmt" count="0"/>
+ <line num="137" type="method" name="close" crap="12" count="0"/>
+ <line num="138" type="stmt" count="0"/>
+ <line num="139" type="stmt" count="0"/>
+ <line num="141" type="stmt" count="0"/>
+ <line num="143" type="stmt" count="0"/>
+ <line num="144" type="stmt" count="0"/>
+ <line num="146" type="stmt" count="0"/>
+ <line num="147" type="stmt" count="0"/>
+ <line num="153" type="method" name="eof" crap="2" count="0"/>
+ <line num="154" type="stmt" count="0"/>
+ <line num="166" type="method" name="readInto" crap="2" count="0"/>
+ <line num="167" type="stmt" count="0"/>
+ <line num="168" type="stmt" count="0"/>
+ <line num="169" type="stmt" count="0"/>
+ <line num="175" type="method" name="__toString" crap="2" count="0"/>
+ <line num="176" type="stmt" count="0"/>
+ <metrics loc="178" ncloc="91" classes="1" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="47" coveredstatements="0" elements="57" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/InputStreamReader.php">
+ <class name="InputStreamReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="0" elements="23" coveredelements="0"/>
+ </class>
+ <line num="45" type="method" name="__construct" crap="2" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="47" type="stmt" count="0"/>
+ <line num="52" type="method" name="close" crap="2" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="60" type="method" name="skip" crap="2" count="0"/>
+ <line num="61" type="stmt" count="0"/>
+ <line num="69" type="method" name="read" crap="2" count="0"/>
+ <line num="70" type="stmt" count="0"/>
+ <line num="77" type="method" name="mark" crap="2" count="0"/>
+ <line num="78" type="stmt" count="0"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="85" type="method" name="markSupported" crap="2" count="0"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="93" type="method" name="reset" crap="2" count="0"/>
+ <line num="94" type="stmt" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="101" type="method" name="eof" crap="2" count="0"/>
+ <line num="102" type="stmt" count="0"/>
+ <line num="116" type="method" name="readInto" crap="2" count="0"/>
+ <line num="117" type="stmt" count="0"/>
+ <line num="124" type="method" name="getResource" crap="2" count="0"/>
+ <line num="125" type="stmt" count="0"/>
+ <metrics loc="127" ncloc="49" classes="1" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="13" coveredstatements="0" elements="23" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/OutputStream.php">
+ <class name="OutputStream" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="5" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="28" coveredstatements="20" elements="33" coveredelements="24"/>
+ </class>
+ <line num="38" type="method" name="__construct" crap="2.06" count="2"/>
+ <line num="39" type="stmt" count="2"/>
+ <line num="40" type="stmt" count="0"/>
+ <line num="42" type="stmt" count="2"/>
+ <line num="43" type="stmt" count="2"/>
+ <line num="50" type="method" name="close" crap="3.47" count="1"/>
+ <line num="51" type="stmt" count="1"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="1"/>
+ <line num="55" type="stmt" count="1"/>
+ <line num="56" type="stmt" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="59" type="stmt" count="1"/>
+ <line num="60" type="stmt" count="1"/>
+ <line num="67" type="method" name="flush" crap="2" count="2"/>
+ <line num="68" type="stmt" count="2"/>
+ <line num="69" type="stmt" count="1"/>
+ <line num="71" type="stmt" count="2"/>
+ <line num="82" type="method" name="write" crap="9.00" count="2"/>
+ <line num="83" type="stmt" count="2"/>
+ <line num="84" type="stmt" count="2"/>
+ <line num="85" type="stmt" count="2"/>
+ <line num="86" type="stmt" count="1"/>
+ <line num="87" type="stmt" count="1"/>
+ <line num="88" type="stmt" count="0"/>
+ <line num="89" type="stmt" count="0"/>
+ <line num="90" type="stmt" count="1"/>
+ <line num="93" type="stmt" count="2"/>
+ <line num="95" type="stmt" count="2"/>
+ <line num="96" type="stmt" count="0"/>
+ <line num="98" type="stmt" count="2"/>
+ <line num="104" type="method" name="__toString" crap="2" count="0"/>
+ <line num="105" type="stmt" count="0"/>
+ <metrics loc="108" ncloc="54" classes="1" methods="5" coveredmethods="4" conditionals="0" coveredconditionals="0" statements="28" coveredstatements="20" elements="33" coveredelements="24"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/OutputStreamWriter.php">
+ <class name="OutputStreamWriter" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="5" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="12" coveredelements="0"/>
+ </class>
+ <line num="45" type="method" name="__construct" crap="2" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="47" type="stmt" count="0"/>
+ <line num="52" type="method" name="close" crap="2" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="64" type="method" name="write" crap="2" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <line num="71" type="method" name="flush" crap="2" count="0"/>
+ <line num="72" type="stmt" count="0"/>
+ <line num="73" type="stmt" count="0"/>
+ <line num="80" type="method" name="getResource" crap="2" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <metrics loc="84" ncloc="30" classes="1" methods="5" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="7" coveredstatements="0" elements="12" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/PhingFile.php">
+ <class name="PhingFile" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="54" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="210" coveredstatements="15" elements="264" coveredelements="20"/>
+ </class>
+ <line num="50" type="method" name="__construct" crap="37.09" count="2"/>
+ <line num="52" type="stmt" count="2"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="0"/>
+ <line num="55" type="stmt" count="0"/>
+ <line num="56" type="stmt" count="0"/>
+ <line num="59" type="stmt" count="2"/>
+ <line num="60" type="stmt" count="0"/>
+ <line num="61" type="stmt" count="2"/>
+ <line num="62" type="stmt" count="2"/>
+ <line num="63" type="stmt" count="2"/>
+ <line num="64" type="stmt" count="0"/>
+ <line num="65" type="stmt" count="0"/>
+ <line num="66" type="stmt" count="0"/>
+ <line num="67" type="stmt" count="0"/>
+ <line num="69" type="stmt" count="0"/>
+ <line num="70" type="stmt" count="0"/>
+ <line num="72" type="stmt" count="2"/>
+ <line num="75" type="method" name="getPrefixLength" crap="1" count="2"/>
+ <line num="76" type="stmt" count="2"/>
+ <line num="81" type="method" name="_constructPathname" crap="2.02" count="2"/>
+ <line num="83" type="stmt" count="2"/>
+ <line num="85" type="stmt" count="2"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="89" type="stmt" count="2"/>
+ <line num="90" type="stmt" count="2"/>
+ <line num="91" type="stmt" count="2"/>
+ <line num="93" type="method" name="_constructStringParentStringChild" crap="20" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="97" type="stmt" count="0"/>
+ <line num="98" type="stmt" count="0"/>
+ <line num="100" type="stmt" count="0"/>
+ <line num="101" type="stmt" count="0"/>
+ <line num="102" type="stmt" count="0"/>
+ <line num="103" type="stmt" count="0"/>
+ <line num="104" type="stmt" count="0"/>
+ <line num="106" type="stmt" count="0"/>
+ <line num="107" type="stmt" count="0"/>
+ <line num="109" type="stmt" count="0"/>
+ <line num="110" type="stmt" count="0"/>
+ <line num="112" type="method" name="_constructFileParentStringChild" crap="20" count="0"/>
+ <line num="114" type="stmt" count="0"/>
+ <line num="116" type="stmt" count="0"/>
+ <line num="117" type="stmt" count="0"/>
+ <line num="120" type="stmt" count="0"/>
+ <line num="121" type="stmt" count="0"/>
+ <line num="122" type="stmt" count="0"/>
+ <line num="123" type="stmt" count="0"/>
+ <line num="124" type="stmt" count="0"/>
+ <line num="126" type="stmt" count="0"/>
+ <line num="127" type="stmt" count="0"/>
+ <line num="129" type="stmt" count="0"/>
+ <line num="130" type="stmt" count="0"/>
+ <line num="144" type="method" name="getName" crap="12" count="0"/>
+ <line num="146" type="stmt" count="0"/>
+ <line num="147" type="stmt" count="0"/>
+ <line num="148" type="stmt" count="0"/>
+ <line num="150" type="stmt" count="0"/>
+ <line num="165" type="method" name="getParent" crap="30" count="0"/>
+ <line num="167" type="stmt" count="0"/>
+ <line num="168" type="stmt" count="0"/>
+ <line num="169" type="stmt" count="0"/>
+ <line num="170" type="stmt" count="0"/>
+ <line num="172" type="stmt" count="0"/>
+ <line num="174" type="stmt" count="0"/>
+ <line num="190" type="method" name="getParentFile" crap="6" count="0"/>
+ <line num="191" type="stmt" count="0"/>
+ <line num="192" type="stmt" count="0"/>
+ <line num="193" type="stmt" count="0"/>
+ <line num="195" type="stmt" count="0"/>
+ <line num="205" type="method" name="getPath" crap="1" count="2"/>
+ <line num="206" type="stmt" count="2"/>
+ <line num="218" type="method" name="getPathWithoutBase" crap="12" count="0"/>
+ <line num="220" type="stmt" count="0"/>
+ <line num="221" type="stmt" count="0"/>
+ <line num="222" type="stmt" count="0"/>
+ <line num="223" type="stmt" count="0"/>
+ <line num="224" type="stmt" count="0"/>
+ <line num="226" type="stmt" count="0"/>
+ <line num="228" type="stmt" count="0"/>
+ <line num="240" type="method" name="isAbsolute" crap="2" count="0"/>
+ <line num="241" type="stmt" count="0"/>
+ <line num="264" type="method" name="getAbsolutePath" crap="1" count="2"/>
+ <line num="265" type="stmt" count="2"/>
+ <line num="266" type="stmt" count="2"/>
+ <line num="276" type="method" name="getAbsoluteFile" crap="2" count="0"/>
+ <line num="277" type="stmt" count="0"/>
+ <line num="305" type="method" name="getCanonicalPath" crap="2" count="0"/>
+ <line num="306" type="stmt" count="0"/>
+ <line num="307" type="stmt" count="0"/>
+ <line num="318" type="method" name="getCanonicalFile" crap="2" count="0"/>
+ <line num="319" type="stmt" count="0"/>
+ <line num="338" type="method" name="toURL" crap="2" count="0"/>
+ <line num="343" type="stmt" count="0"/>
+ <line num="349" type="method" name="toURI" crap="2" count="0"/>
+ <line num="357" type="stmt" count="0"/>
+ <line num="359" type="method" name="_slashify" crap="30" count="0"/>
+ <line num="360" type="stmt" count="0"/>
+ <line num="362" type="stmt" count="0"/>
+ <line num="363" type="stmt" count="0"/>
+ <line num="364" type="stmt" count="0"/>
+ <line num="366" type="stmt" count="0"/>
+ <line num="367" type="stmt" count="0"/>
+ <line num="368" type="stmt" count="0"/>
+ <line num="370" type="stmt" count="0"/>
+ <line num="371" type="stmt" count="0"/>
+ <line num="372" type="stmt" count="0"/>
+ <line num="374" type="stmt" count="0"/>
+ <line num="387" type="method" name="canRead" crap="6" count="0"/>
+ <line num="388" type="stmt" count="0"/>
+ <line num="390" type="stmt" count="0"/>
+ <line num="391" type="stmt" count="0"/>
+ <line num="393" type="stmt" count="0"/>
+ <line num="406" type="method" name="canWrite" crap="2" count="0"/>
+ <line num="407" type="stmt" count="0"/>
+ <line num="408" type="stmt" count="0"/>
+ <line num="418" type="method" name="exists" crap="20" count="0"/>
+ <line num="419" type="stmt" count="0"/>
+ <line num="421" type="stmt" count="0"/>
+ <line num="422" type="stmt" count="0"/>
+ <line num="423" type="stmt" count="0"/>
+ <line num="424" type="stmt" count="0"/>
+ <line num="426" type="stmt" count="0"/>
+ <line num="439" type="method" name="isDirectory" crap="12" count="0"/>
+ <line num="440" type="stmt" count="0"/>
+ <line num="441" type="stmt" count="0"/>
+ <line num="442" type="stmt" count="0"/>
+ <line num="443" type="stmt" count="0"/>
+ <line num="445" type="stmt" count="0"/>
+ <line num="458" type="method" name="isFile" crap="2" count="0"/>
+ <line num="459" type="stmt" count="0"/>
+ <line num="461" type="stmt" count="0"/>
+ <line num="476" type="method" name="isHidden" crap="6" count="0"/>
+ <line num="477" type="stmt" count="0"/>
+ <line num="478" type="stmt" count="0"/>
+ <line num="479" type="stmt" count="0"/>
+ <line num="481" type="stmt" count="0"/>
+ <line num="491" type="method" name="isLink" crap="6" count="0"/>
+ <line num="493" type="stmt" count="0"/>
+ <line num="494" type="stmt" count="0"/>
+ <line num="495" type="stmt" count="0"/>
+ <line num="496" type="stmt" count="0"/>
+ <line num="498" type="stmt" count="0"/>
+ <line num="506" type="method" name="getLinkTarget" crap="2" count="0"/>
+ <line num="508" type="stmt" count="0"/>
+ <line num="520" type="method" name="lastModified" crap="6" count="0"/>
+ <line num="521" type="stmt" count="0"/>
+ <line num="522" type="stmt" count="0"/>
+ <line num="523" type="stmt" count="0"/>
+ <line num="525" type="stmt" count="0"/>
+ <line num="535" type="method" name="length" crap="6" count="0"/>
+ <line num="536" type="stmt" count="0"/>
+ <line num="537" type="stmt" count="0"/>
+ <line num="538" type="stmt" count="0"/>
+ <line num="540" type="stmt" count="0"/>
+ <line num="549" type="method" name="contents" crap="12" count="0"/>
+ <line num="550" type="stmt" count="0"/>
+ <line num="551" type="stmt" count="0"/>
+ <line num="553" type="stmt" count="0"/>
+ <line num="570" type="method" name="createNewFile" crap="2" count="0"/>
+ <line num="571" type="stmt" count="0"/>
+ <line num="572" type="stmt" count="0"/>
+ <line num="583" type="method" name="delete" crap="6" count="0"/>
+ <line num="584" type="stmt" count="0"/>
+ <line num="585" type="stmt" count="0"/>
+ <line num="586" type="stmt" count="0"/>
+ <line num="588" type="stmt" count="0"/>
+ <line num="601" type="method" name="deleteOnExit" crap="2" count="0"/>
+ <line num="602" type="stmt" count="0"/>
+ <line num="603" type="stmt" count="0"/>
+ <line num="604" type="stmt" count="0"/>
+ <line num="628" type="method" name="listDir" crap="2" count="0"/>
+ <line num="629" type="stmt" count="0"/>
+ <line num="630" type="stmt" count="0"/>
+ <line num="633" type="method" name="listFiles" crap="12" count="0"/>
+ <line num="634" type="stmt" count="0"/>
+ <line num="635" type="stmt" count="0"/>
+ <line num="636" type="stmt" count="0"/>
+ <line num="638" type="stmt" count="0"/>
+ <line num="639" type="stmt" count="0"/>
+ <line num="640" type="stmt" count="0"/>
+ <line num="641" type="stmt" count="0"/>
+ <line num="642" type="stmt" count="0"/>
+ <line num="643" type="stmt" count="0"/>
+ <line num="657" type="method" name="mkdirs" crap="42" count="0"/>
+ <line num="658" type="stmt" count="0"/>
+ <line num="659" type="stmt" count="0"/>
+ <line num="662" type="stmt" count="0"/>
+ <line num="663" type="stmt" count="0"/>
+ <line num="665" type="stmt" count="0"/>
+ <line num="668" type="stmt" count="0"/>
+ <line num="669" type="stmt" count="0"/>
+ <line num="678" type="method" name="mkdir" crap="6" count="0"/>
+ <line num="679" type="stmt" count="0"/>
+ <line num="681" type="stmt" count="0"/>
+ <line num="682" type="stmt" count="0"/>
+ <line num="684" type="stmt" count="0"/>
+ <line num="693" type="method" name="renameTo" crap="6" count="0"/>
+ <line num="694" type="stmt" count="0"/>
+ <line num="695" type="stmt" count="0"/>
+ <line num="696" type="stmt" count="0"/>
+ <line num="698" type="stmt" count="0"/>
+ <line num="708" type="method" name="copyTo" crap="12" count="0"/>
+ <line num="709" type="stmt" count="0"/>
+ <line num="711" type="stmt" count="0"/>
+ <line num="712" type="stmt" count="0"/>
+ <line num="715" type="stmt" count="0"/>
+ <line num="716" type="stmt" count="0"/>
+ <line num="718" type="stmt" count="0"/>
+ <line num="736" type="method" name="setLastModified" crap="6" count="0"/>
+ <line num="737" type="stmt" count="0"/>
+ <line num="738" type="stmt" count="0"/>
+ <line num="739" type="stmt" count="0"/>
+ <line num="742" type="stmt" count="0"/>
+ <line num="743" type="stmt" count="0"/>
+ <line num="755" type="method" name="setReadOnly" crap="6" count="0"/>
+ <line num="756" type="stmt" count="0"/>
+ <line num="757" type="stmt" count="0"/>
+ <line num="759" type="stmt" count="0"/>
+ <line num="761" type="stmt" count="0"/>
+ <line num="768" type="method" name="setUser" crap="2" count="0"/>
+ <line num="769" type="stmt" count="0"/>
+ <line num="770" type="stmt" count="0"/>
+ <line num="777" type="method" name="getUser" crap="2" count="0"/>
+ <line num="778" type="stmt" count="0"/>
+ <line num="785" type="method" name="setGroup" crap="2" count="0"/>
+ <line num="786" type="stmt" count="0"/>
+ <line num="787" type="stmt" count="0"/>
+ <line num="794" type="method" name="getGroup" crap="2" count="0"/>
+ <line num="795" type="stmt" count="0"/>
+ <line num="802" type="method" name="setMode" crap="2" count="0"/>
+ <line num="803" type="stmt" count="0"/>
+ <line num="804" type="stmt" count="0"/>
+ <line num="811" type="method" name="getMode" crap="2" count="0"/>
+ <line num="812" type="stmt" count="0"/>
+ <line num="850" type="method" name="listRoots" crap="2" count="0"/>
+ <line num="851" type="stmt" count="0"/>
+ <line num="852" type="stmt" count="0"/>
+ <line num="860" type="method" name="getTempDir" crap="2" count="0"/>
+ <line num="861" type="stmt" count="0"/>
+ <line num="874" type="method" name="createTempFile" crap="6" count="0"/>
+ <line num="877" type="stmt" count="0"/>
+ <line num="879" type="stmt" count="0"/>
+ <line num="880" type="stmt" count="0"/>
+ <line num="882" type="stmt" count="0"/>
+ <line num="883" type="stmt" count="0"/>
+ <line num="884" type="stmt" count="0"/>
+ <line num="886" type="stmt" count="0"/>
+ <line num="895" type="method" name="removeTempFile" crap="2" count="0"/>
+ <line num="896" type="stmt" count="0"/>
+ <line num="898" type="stmt" count="0"/>
+ <line num="899" type="stmt" count="0"/>
+ <line num="900" type="stmt" count="0"/>
+ <line num="919" type="method" name="compareTo" crap="2" count="0"/>
+ <line num="920" type="stmt" count="0"/>
+ <line num="921" type="stmt" count="0"/>
+ <line num="934" type="method" name="equals" crap="12" count="0"/>
+ <line num="935" type="stmt" count="0"/>
+ <line num="936" type="stmt" count="0"/>
+ <line num="938" type="stmt" count="0"/>
+ <line num="942" type="method" name="toString" crap="2" count="0"/>
+ <line num="943" type="stmt" count="0"/>
+ <line num="947" type="method" name="__toString" crap="2" count="0"/>
+ <line num="948" type="stmt" count="0"/>
+ <metrics loc="951" ncloc="440" classes="1" methods="54" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="210" coveredstatements="15" elements="264" coveredelements="20"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/Reader.php">
+ <class name="Reader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="8" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="16" coveredelements="0"/>
+ </class>
+ <line num="40" type="method" name="read" crap="2" count="0"/>
+ <line num="46" type="method" name="close" crap="2" count="0"/>
+ <line num="54" type="method" name="getResource" crap="2" count="0"/>
+ <line num="60" type="method" name="skip" crap="2" count="0"/>
+ <line num="65" type="method" name="reset" crap="2" count="0"/>
+ <line num="72" type="method" name="mark" crap="2" count="0"/>
+ <line num="78" type="method" name="markSupported" crap="2" count="0"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="86" type="method" name="ready" crap="2" count="0"/>
+ <line num="87" type="stmt" count="0"/>
+ <metrics loc="91" ncloc="26" classes="1" methods="8" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="16" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/StringReader.php">
+ <class name="StringReader" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="19" coveredstatements="0" elements="29" coveredelements="0"/>
+ </class>
+ <line num="43" type="method" name="__construct" crap="2" count="0"/>
+ <line num="44" type="stmt" count="0"/>
+ <line num="45" type="stmt" count="0"/>
+ <line num="47" type="method" name="skip" crap="2" count="0"/>
+ <line num="49" type="method" name="read" crap="12" count="0"/>
+ <line num="50" type="stmt" count="0"/>
+ <line num="51" type="stmt" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="54" type="stmt" count="0"/>
+ <line num="56" type="stmt" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="62" type="method" name="mark" crap="2" count="0"/>
+ <line num="63" type="stmt" count="0"/>
+ <line num="64" type="stmt" count="0"/>
+ <line num="66" type="method" name="reset" crap="2" count="0"/>
+ <line num="67" type="stmt" count="0"/>
+ <line num="68" type="stmt" count="0"/>
+ <line num="70" type="method" name="close" crap="2" count="0"/>
+ <line num="72" type="method" name="open" crap="2" count="0"/>
+ <line num="74" type="method" name="ready" crap="2" count="0"/>
+ <line num="76" type="method" name="markSupported" crap="2" count="0"/>
+ <line num="77" type="stmt" count="0"/>
+ <line num="80" type="method" name="getResource" crap="2" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <metrics loc="84" ncloc="52" classes="1" methods="10" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="19" coveredstatements="0" elements="29" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/UnixFileSystem.php">
+ <class name="UnixFileSystem" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="17" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="107" coveredstatements="32" elements="124" coveredelements="37"/>
+ </class>
+ <line num="50" type="method" name="getSeparator" crap="2" count="0"/>
+ <line num="51" type="stmt" count="0"/>
+ <line num="57" type="method" name="getPathSeparator" crap="2" count="0"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="69" type="method" name="normalize" crap="17.20" count="2"/>
+ <line num="71" type="stmt" count="2"/>
+ <line num="72" type="stmt" count="0"/>
+ <line num="78" type="stmt" count="2"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="80" type="stmt" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <line num="82" type="stmt" count="0"/>
+ <line num="83" type="stmt" count="0"/>
+ <line num="84" type="stmt" count="0"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="88" type="stmt" count="2"/>
+ <line num="89" type="stmt" count="2"/>
+ <line num="90" type="stmt" count="2"/>
+ <line num="91" type="stmt" count="2"/>
+ <line num="92" type="stmt" count="2"/>
+ <line num="93" type="stmt" count="2"/>
+ <line num="95" type="stmt" count="2"/>
+ <line num="96" type="stmt" count="2"/>
+ <line num="97" type="stmt" count="0"/>
+ <line num="98" type="stmt" count="0"/>
+ <line num="100" type="stmt" count="0"/>
+ <line num="107" type="method" name="normalizer" crap="9.56" count="2"/>
+ <line num="108" type="stmt" count="2"/>
+ <line num="109" type="stmt" count="0"/>
+ <line num="111" type="stmt" count="2"/>
+ <line num="112" type="stmt" count="2"/>
+ <line num="113" type="stmt" count="0"/>
+ <line num="114" type="stmt" count="0"/>
+ <line num="115" type="stmt" count="2"/>
+ <line num="116" type="stmt" count="0"/>
+ <line num="118" type="stmt" count="2"/>
+ <line num="120" type="stmt" count="2"/>
+ <line num="121" type="stmt" count="2"/>
+ <line num="122" type="stmt" count="2"/>
+ <line num="123" type="stmt" count="2"/>
+ <line num="124" type="stmt" count="2"/>
+ <line num="125" type="stmt" count="2"/>
+ <line num="126" type="stmt" count="2"/>
+ <line num="127" type="stmt" count="2"/>
+ <line num="129" type="stmt" count="2"/>
+ <line num="130" type="stmt" count="2"/>
+ <line num="131" type="stmt" count="2"/>
+ <line num="132" type="stmt" count="2"/>
+ <line num="139" type="method" name="prefixLength" crap="3.33" count="2"/>
+ <line num="140" type="stmt" count="2"/>
+ <line num="141" type="stmt" count="0"/>
+ <line num="143" type="stmt" count="2"/>
+ <line num="151" type="method" name="resolve" crap="30" count="0"/>
+ <line num="153" type="stmt" count="0"/>
+ <line num="154" type="stmt" count="0"/>
+ <line num="157" type="stmt" count="0"/>
+ <line num="158" type="stmt" count="0"/>
+ <line num="159" type="stmt" count="0"/>
+ <line num="161" type="stmt" count="0"/>
+ <line num="164" type="stmt" count="0"/>
+ <line num="165" type="stmt" count="0"/>
+ <line num="168" type="stmt" count="0"/>
+ <line num="171" type="method" name="getDefaultParent" crap="2" count="0"/>
+ <line num="172" type="stmt" count="0"/>
+ <line num="175" type="method" name="isAbsolute" crap="1" count="2"/>
+ <line num="176" type="stmt" count="2"/>
+ <line num="182" type="method" name="resolveFile" crap="2.15" count="2"/>
+ <line num="184" type="stmt" count="2"/>
+ <line num="185" type="stmt" count="2"/>
+ <line num="187" type="stmt" count="0"/>
+ <line num="194" type="method" name="getBooleanAttributes" crap="12" count="0"/>
+ <line num="196" type="stmt" count="0"/>
+ <line num="197" type="stmt" count="0"/>
+ <line num="198" type="stmt" count="0"/>
+ <line num="204" type="method" name="setReadOnly" crap="6" count="0"/>
+ <line num="205" type="stmt" count="0"/>
+ <line num="206" type="stmt" count="0"/>
+ <line num="207" type="stmt" count="0"/>
+ <line num="208" type="stmt" count="0"/>
+ <line num="210" type="stmt" count="0"/>
+ <line num="217" type="method" name="compare" crap="12" count="0"/>
+ <line num="218" type="stmt" count="0"/>
+ <line num="219" type="stmt" count="0"/>
+ <line num="220" type="stmt" count="0"/>
+ <line num="221" type="stmt" count="0"/>
+ <line num="223" type="stmt" count="0"/>
+ <line num="236" type="method" name="copy" crap="12" count="0"/>
+ <line num="237" type="stmt" count="0"/>
+ <line num="239" type="stmt" count="0"/>
+ <line num="240" type="stmt" count="0"/>
+ <line num="241" type="stmt" count="0"/>
+ <line num="244" type="stmt" count="0"/>
+ <line num="245" type="stmt" count="0"/>
+ <line num="247" type="stmt" count="0"/>
+ <line num="248" type="stmt" count="0"/>
+ <line num="249" type="stmt" count="0"/>
+ <line num="250" type="stmt" count="0"/>
+ <line num="251" type="stmt" count="0"/>
+ <line num="253" type="stmt" count="0"/>
+ <line num="257" type="method" name="listRoots" crap="6" count="0"/>
+ <line num="258" type="stmt" count="0"/>
+ <line num="259" type="stmt" count="0"/>
+ <line num="261" type="stmt" count="0"/>
+ <line num="267" type="method" name="lister" crap="30" count="0"/>
+ <line num="268" type="stmt" count="0"/>
+ <line num="269" type="stmt" count="0"/>
+ <line num="270" type="stmt" count="0"/>
+ <line num="272" type="stmt" count="0"/>
+ <line num="273" type="stmt" count="0"/>
+ <line num="274" type="stmt" count="0"/>
+ <line num="275" type="stmt" count="0"/>
+ <line num="277" type="stmt" count="0"/>
+ <line num="278" type="stmt" count="0"/>
+ <line num="279" type="stmt" count="0"/>
+ <line num="280" type="stmt" count="0"/>
+ <line num="283" type="method" name="fromURIPath" crap="12" count="0"/>
+ <line num="284" type="stmt" count="0"/>
+ <line num="287" type="stmt" count="0"/>
+ <line num="289" type="stmt" count="0"/>
+ <line num="291" type="stmt" count="0"/>
+ <line num="299" type="method" name="canDelete" crap="2" count="0"/>
+ <line num="301" type="stmt" count="0"/>
+ <line num="302" type="stmt" count="0"/>
+ <line num="303" type="stmt" count="0"/>
+ <metrics loc="306" ncloc="194" classes="1" methods="17" coveredmethods="5" conditionals="0" coveredconditionals="0" statements="107" coveredstatements="32" elements="124" coveredelements="37"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/Win32FileSystem.php">
+ <class name="Win32FileSystem" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="25" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="225" coveredstatements="0" elements="250" coveredelements="0"/>
+ </class>
+ <line num="22" type="stmt" count="1"/>
+ <line num="27" type="stmt" count="1"/>
+ <line num="35" type="method" name="__construct" crap="6" count="0"/>
+ <line num="36" type="stmt" count="0"/>
+ <line num="37" type="stmt" count="0"/>
+ <line num="38" type="stmt" count="0"/>
+ <line num="39" type="stmt" count="0"/>
+ <line num="41" type="method" name="isSlash" crap="6" count="0"/>
+ <line num="42" type="stmt" count="0"/>
+ <line num="45" type="method" name="isLetter" crap="20" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="47" type="stmt" count="0"/>
+ <line num="50" type="method" name="slashify" crap="12" count="0"/>
+ <line num="51" type="stmt" count="0"/>
+ <line num="52" type="stmt" count="0"/>
+ <line num="55" type="stmt" count="0"/>
+ <line num="61" type="method" name="getSeparator" crap="2" count="0"/>
+ <line num="63" type="stmt" count="0"/>
+ <line num="66" type="method" name="getPathSeparator" crap="2" count="0"/>
+ <line num="67" type="stmt" count="0"/>
+ <line num="82" type="method" name="normalizePrefix" crap="90" count="0"/>
+ <line num="83" type="stmt" count="0"/>
+ <line num="84" type="stmt" count="0"/>
+ <line num="85" type="stmt" count="0"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="87" type="stmt" count="0"/>
+ <line num="88" type="stmt" count="0"/>
+ <line num="89" type="stmt" count="0"/>
+ <line num="90" type="stmt" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="96" type="stmt" count="0"/>
+ <line num="97" type="stmt" count="0"/>
+ <line num="98" type="stmt" count="0"/>
+ <line num="100" type="stmt" count="0"/>
+ <line num="101" type="stmt" count="0"/>
+ <line num="102" type="stmt" count="0"/>
+ <line num="103" type="stmt" count="0"/>
+ <line num="109" type="stmt" count="0"/>
+ <line num="110" type="stmt" count="0"/>
+ <line num="111" type="stmt" count="0"/>
+ <line num="113" type="stmt" count="0"/>
+ <line num="118" type="method" name="normalizer" crap="210" count="0"/>
+ <line num="119" type="stmt" count="0"/>
+ <line num="120" type="stmt" count="0"/>
+ <line num="122" type="stmt" count="0"/>
+ <line num="123" type="stmt" count="0"/>
+ <line num="124" type="stmt" count="0"/>
+ <line num="125" type="stmt" count="0"/>
+ <line num="126" type="stmt" count="0"/>
+ <line num="127" type="stmt" count="0"/>
+ <line num="129" type="stmt" count="0"/>
+ <line num="131" type="stmt" count="0"/>
+ <line num="132" type="stmt" count="0"/>
+ <line num="134" type="stmt" count="0"/>
+ <line num="135" type="stmt" count="0"/>
+ <line num="140" type="stmt" count="0"/>
+ <line num="141" type="stmt" count="0"/>
+ <line num="142" type="stmt" count="0"/>
+ <line num="143" type="stmt" count="0"/>
+ <line num="144" type="stmt" count="0"/>
+ <line num="145" type="stmt" count="0"/>
+ <line num="146" type="stmt" count="0"/>
+ <line num="148" type="stmt" count="0"/>
+ <line num="149" type="stmt" count="0"/>
+ <line num="151" type="stmt" count="0"/>
+ <line num="152" type="stmt" count="0"/>
+ <line num="154" type="stmt" count="0"/>
+ <line num="156" type="stmt" count="0"/>
+ <line num="157" type="stmt" count="0"/>
+ <line num="159" type="stmt" count="0"/>
+ <line num="167" type="stmt" count="0"/>
+ <line num="168" type="stmt" count="0"/>
+ <line num="172" type="stmt" count="0"/>
+ <line num="174" type="stmt" count="0"/>
+ <line num="176" type="stmt" count="0"/>
+ <line num="177" type="stmt" count="0"/>
+ <line num="179" type="stmt" count="0"/>
+ <line num="180" type="stmt" count="0"/>
+ <line num="181" type="stmt" count="0"/>
+ <line num="191" type="method" name="normalize" crap="110" count="0"/>
+ <line num="192" type="stmt" count="0"/>
+ <line num="193" type="stmt" count="0"/>
+ <line num="194" type="stmt" count="0"/>
+ <line num="195" type="stmt" count="0"/>
+ <line num="196" type="stmt" count="0"/>
+ <line num="197" type="stmt" count="0"/>
+ <line num="198" type="stmt" count="0"/>
+ <line num="199" type="stmt" count="0"/>
+ <line num="201" type="stmt" count="0"/>
+ <line num="202" type="stmt" count="0"/>
+ <line num="204" type="stmt" count="0"/>
+ <line num="205" type="stmt" count="0"/>
+ <line num="207" type="stmt" count="0"/>
+ <line num="208" type="stmt" count="0"/>
+ <line num="209" type="stmt" count="0"/>
+ <line num="210" type="stmt" count="0"/>
+ <line num="212" type="stmt" count="0"/>
+ <line num="215" type="method" name="prefixLength" crap="90" count="0"/>
+ <line num="216" type="stmt" count="0"/>
+ <line num="217" type="stmt" count="0"/>
+ <line num="218" type="stmt" count="0"/>
+ <line num="219" type="stmt" count="0"/>
+ <line num="220" type="stmt" count="0"/>
+ <line num="222" type="stmt" count="0"/>
+ <line num="223" type="stmt" count="0"/>
+ <line num="224" type="stmt" count="0"/>
+ <line num="225" type="stmt" count="0"/>
+ <line num="226" type="stmt" count="0"/>
+ <line num="227" type="stmt" count="0"/>
+ <line num="229" type="stmt" count="0"/>
+ <line num="232" type="stmt" count="0"/>
+ <line num="233" type="stmt" count="0"/>
+ <line num="234" type="stmt" count="0"/>
+ <line num="236" type="stmt" count="0"/>
+ <line num="238" type="stmt" count="0"/>
+ <line num="241" type="method" name="resolve" crap="56" count="0"/>
+ <line num="242" type="stmt" count="0"/>
+ <line num="243" type="stmt" count="0"/>
+ <line num="244" type="stmt" count="0"/>
+ <line num="246" type="stmt" count="0"/>
+ <line num="247" type="stmt" count="0"/>
+ <line num="248" type="stmt" count="0"/>
+ <line num="250" type="stmt" count="0"/>
+ <line num="251" type="stmt" count="0"/>
+ <line num="252" type="stmt" count="0"/>
+ <line num="255" type="stmt" count="0"/>
+ <line num="256" type="stmt" count="0"/>
+ <line num="257" type="stmt" count="0"/>
+ <line num="259" type="stmt" count="0"/>
+ <line num="260" type="stmt" count="0"/>
+ <line num="263" type="stmt" count="0"/>
+ <line num="265" type="stmt" count="0"/>
+ <line num="267" type="stmt" count="0"/>
+ <line num="268" type="stmt" count="0"/>
+ <line num="269" type="stmt" count="0"/>
+ <line num="270" type="stmt" count="0"/>
+ <line num="271" type="stmt" count="0"/>
+ <line num="274" type="method" name="getDefaultParent" crap="2" count="0"/>
+ <line num="275" type="stmt" count="0"/>
+ <line num="278" type="method" name="fromURIPath" crap="56" count="0"/>
+ <line num="279" type="stmt" count="0"/>
+ <line num="280" type="stmt" count="0"/>
+ <line num="283" type="stmt" count="0"/>
+ <line num="286" type="stmt" count="0"/>
+ <line num="287" type="stmt" count="0"/>
+ <line num="288" type="stmt" count="0"/>
+ <line num="289" type="stmt" count="0"/>
+ <line num="291" type="stmt" count="0"/>
+ <line num="292" type="stmt" count="0"/>
+ <line num="293" type="stmt" count="0"/>
+ <line num="299" type="method" name="isAbsolute" crap="30" count="0"/>
+ <line num="300" type="stmt" count="0"/>
+ <line num="301" type="stmt" count="0"/>
+ <line num="302" type="stmt" count="0"/>
+ <line num="306" type="method" name="_driveIndex" crap="30" count="0"/>
+ <line num="307" type="stmt" count="0"/>
+ <line num="308" type="stmt" count="0"/>
+ <line num="309" type="stmt" count="0"/>
+ <line num="311" type="stmt" count="0"/>
+ <line num="312" type="stmt" count="0"/>
+ <line num="314" type="stmt" count="0"/>
+ <line num="318" type="method" name="_getDriveDirectory" crap="20" count="0"/>
+ <line num="319" type="stmt" count="0"/>
+ <line num="320" type="stmt" count="0"/>
+ <line num="321" type="stmt" count="0"/>
+ <line num="322" type="stmt" count="0"/>
+ <line num="325" type="stmt" count="0"/>
+ <line num="327" type="stmt" count="0"/>
+ <line num="328" type="stmt" count="0"/>
+ <line num="331" type="stmt" count="0"/>
+ <line num="332" type="stmt" count="0"/>
+ <line num="333" type="stmt" count="0"/>
+ <line num="336" type="method" name="_getUserPath" crap="2" count="0"/>
+ <line num="338" type="stmt" count="0"/>
+ <line num="341" type="method" name="_getDrive" crap="6" count="0"/>
+ <line num="342" type="stmt" count="0"/>
+ <line num="343" type="stmt" count="0"/>
+ <line num="344" type="stmt" count="0"/>
+ <line num="347" type="method" name="resolveFile" crap="156" count="0"/>
+ <line num="348" type="stmt" count="0"/>
+ <line num="349" type="stmt" count="0"/>
+ <line num="351" type="stmt" count="0"/>
+ <line num="352" type="stmt" count="0"/>
+ <line num="355" type="stmt" count="0"/>
+ <line num="356" type="stmt" count="0"/>
+ <line num="359" type="stmt" count="0"/>
+ <line num="360" type="stmt" count="0"/>
+ <line num="363" type="stmt" count="0"/>
+ <line num="364" type="stmt" count="0"/>
+ <line num="365" type="stmt" count="0"/>
+ <line num="366" type="stmt" count="0"/>
+ <line num="367" type="stmt" count="0"/>
+ <line num="369" type="stmt" count="0"/>
+ <line num="372" type="stmt" count="0"/>
+ <line num="373" type="stmt" count="0"/>
+ <line num="374" type="stmt" count="0"/>
+ <line num="375" type="stmt" count="0"/>
+ <line num="376" type="stmt" count="0"/>
+ <line num="378" type="stmt" count="0"/>
+ <line num="379" type="stmt" count="0"/>
+ <line num="381" type="stmt" count="0"/>
+ <line num="382" type="stmt" count="0"/>
+ <line num="386" type="stmt" count="0"/>
+ <line num="388" type="stmt" count="0"/>
+ <line num="391" type="stmt" count="0"/>
+ <line num="393" type="stmt" count="0"/>
+ <line num="395" type="stmt" count="0"/>
+ <line num="398" type="stmt" count="0"/>
+ <line num="405" type="method" name="setReadOnly" crap="2" count="0"/>
+ <line num="407" type="stmt" count="0"/>
+ <line num="412" type="method" name="_access" crap="6" count="0"/>
+ <line num="413" type="stmt" count="0"/>
+ <line num="414" type="stmt" count="0"/>
+ <line num="416" type="stmt" count="0"/>
+ <line num="419" type="method" name="_nativeListRoots" crap="2" count="0"/>
+ <line num="421" type="stmt" count="0"/>
+ <line num="423" type="method" name="listRoots" crap="42" count="0"/>
+ <line num="424" type="stmt" count="0"/>
+ <line num="425" type="stmt" count="0"/>
+ <line num="426" type="stmt" count="0"/>
+ <line num="427" type="stmt" count="0"/>
+ <line num="428" type="stmt" count="0"/>
+ <line num="429" type="stmt" count="0"/>
+ <line num="430" type="stmt" count="0"/>
+ <line num="431" type="stmt" count="0"/>
+ <line num="433" type="stmt" count="0"/>
+ <line num="434" type="stmt" count="0"/>
+ <line num="435" type="stmt" count="0"/>
+ <line num="436" type="stmt" count="0"/>
+ <line num="437" type="stmt" count="0"/>
+ <line num="438" type="stmt" count="0"/>
+ <line num="439" type="stmt" count="0"/>
+ <line num="440" type="stmt" count="0"/>
+ <line num="441" type="stmt" count="0"/>
+ <line num="442" type="stmt" count="0"/>
+ <line num="443" type="stmt" count="0"/>
+ <line num="449" type="method" name="compare" crap="2" count="0"/>
+ <line num="450" type="stmt" count="0"/>
+ <line num="451" type="stmt" count="0"/>
+ <line num="452" type="stmt" count="0"/>
+ <line num="459" type="method" name="lister" crap="30" count="0"/>
+ <line num="460" type="stmt" count="0"/>
+ <line num="461" type="stmt" count="0"/>
+ <line num="462" type="stmt" count="0"/>
+ <line num="464" type="stmt" count="0"/>
+ <line num="465" type="stmt" count="0"/>
+ <line num="466" type="stmt" count="0"/>
+ <line num="467" type="stmt" count="0"/>
+ <line num="469" type="stmt" count="0"/>
+ <line num="470" type="stmt" count="0"/>
+ <line num="471" type="stmt" count="0"/>
+ <line num="472" type="stmt" count="0"/>
+ <line num="478" type="stmt" count="1"/>
+ <metrics loc="477" ncloc="338" classes="1" methods="25" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="228" coveredstatements="3" elements="253" coveredelements="3"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/WinNTFileSystem.php">
+ <class name="WinNTFileSystem" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
+ </class>
+ <line num="22" type="stmt" count="1"/>
+ <line num="29" type="stmt" count="1"/>
+ <line num="36" type="stmt" count="1"/>
+ <metrics loc="35" ncloc="11" classes="1" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="3" elements="3" coveredelements="3"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/io/Writer.php">
+ <class name="Writer" namespace="global" fullPackage="phing.system.io" package="phing.system.io">
+ <metrics methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="7" coveredelements="0"/>
+ </class>
+ <line num="35" type="method" name="write" crap="2" count="0"/>
+ <line num="41" type="method" name="close" crap="2" count="0"/>
+ <line num="46" type="method" name="flush" crap="2" count="0"/>
+ <line num="52" type="method" name="getResource" crap="1" count="0"/>
+ <metrics loc="53" ncloc="12" classes="1" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="3" coveredstatements="0" elements="7" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/lang/Character.php">
+ <class name="Character" namespace="global" fullPackage="phing.system.lang" package="phing.system.lang">
+ <metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="9" coveredelements="0"/>
+ </class>
+ <line num="32" type="method" name="isLetter" crap="42" count="0"/>
+ <line num="34" type="stmt" count="0"/>
+ <line num="35" type="stmt" count="0"/>
+ <line num="37" type="stmt" count="0"/>
+ <line num="39" type="stmt" count="0"/>
+ <line num="40" type="stmt" count="0"/>
+ <line num="42" type="stmt" count="0"/>
+ <line num="43" type="stmt" count="0"/>
+ <line num="45" type="stmt" count="0"/>
+ <metrics loc="49" ncloc="19" classes="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="9" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/lang/EventObject.php">
+ <class name="EventObject" namespace="global" fullPackage="phing.system.lang" package="phing.system.lang">
+ <metrics methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="3" elements="11" coveredelements="4"/>
+ </class>
+ <line num="31" type="method" name="__construct" crap="2.06" count="1"/>
+ <line num="32" type="stmt" count="1"/>
+ <line num="33" type="stmt" count="0"/>
+ <line num="35" type="stmt" count="1"/>
+ <line num="36" type="stmt" count="1"/>
+ <line num="39" type="method" name="getSource" crap="2" count="0"/>
+ <line num="40" type="stmt" count="0"/>
+ <line num="44" type="method" name="toString" crap="6" count="0"/>
+ <line num="45" type="stmt" count="0"/>
+ <line num="46" type="stmt" count="0"/>
+ <line num="48" type="stmt" count="0"/>
+ <metrics loc="52" ncloc="26" classes="1" methods="3" coveredmethods="1" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="3" elements="11" coveredelements="4"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/lang/SecurityException.php">
+ <class name="SecurityException" namespace="global" fullPackage="phing.system.lang" package="phing.system.lang">
+ <metrics methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
+ </class>
+ <line num="25" type="stmt" count="1"/>
+ <line num="27" type="stmt" count="1"/>
+ <metrics loc="26" ncloc="4" classes="1" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="2" coveredstatements="2" elements="2" coveredelements="2"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/util/Properties.php">
+ <class name="Properties" namespace="global" fullPackage="phing.system.util" package="phing.system.util">
+ <metrics methods="16" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="71" coveredstatements="0" elements="87" coveredelements="0"/>
+ </class>
+ <line num="46" type="method" name="load" crap="6" count="0"/>
+ <line num="47" type="stmt" count="0"/>
+ <line num="48" type="stmt" count="0"/>
+ <line num="49" type="stmt" count="0"/>
+ <line num="50" type="stmt" count="0"/>
+ <line num="53" type="stmt" count="0"/>
+ <line num="64" type="method" name="parse" crap="42" count="0"/>
+ <line num="70" type="stmt" count="0"/>
+ <line num="71" type="stmt" count="0"/>
+ <line num="74" type="stmt" count="0"/>
+ <line num="75" type="stmt" count="0"/>
+ <line num="77" type="stmt" count="0"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <line num="82" type="stmt" count="0"/>
+ <line num="84" type="stmt" count="0"/>
+ <line num="86" type="stmt" count="0"/>
+ <line num="88" type="stmt" count="0"/>
+ <line num="89" type="stmt" count="0"/>
+ <line num="90" type="stmt" count="0"/>
+ <line num="91" type="stmt" count="0"/>
+ <line num="94" type="stmt" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="103" type="method" name="inVal" crap="12" count="0"/>
+ <line num="104" type="stmt" count="0"/>
+ <line num="105" type="stmt" count="0"/>
+ <line num="106" type="stmt" count="0"/>
+ <line num="107" type="stmt" count="0"/>
+ <line num="108" type="stmt" count="0"/>
+ <line num="109" type="stmt" count="0"/>
+ <line num="118" type="method" name="outVal" crap="12" count="0"/>
+ <line num="119" type="stmt" count="0"/>
+ <line num="120" type="stmt" count="0"/>
+ <line num="121" type="stmt" count="0"/>
+ <line num="122" type="stmt" count="0"/>
+ <line num="123" type="stmt" count="0"/>
+ <line num="124" type="stmt" count="0"/>
+ <line num="135" type="method" name="toString" crap="6" count="0"/>
+ <line num="136" type="stmt" count="0"/>
+ <line num="137" type="stmt" count="0"/>
+ <line num="138" type="stmt" count="0"/>
+ <line num="139" type="stmt" count="0"/>
+ <line num="140" type="stmt" count="0"/>
+ <line num="151" type="method" name="store" crap="12" count="0"/>
+ <line num="156" type="stmt" count="0"/>
+ <line num="157" type="stmt" count="0"/>
+ <line num="158" type="stmt" count="0"/>
+ <line num="159" type="stmt" count="0"/>
+ <line num="160" type="stmt" count="0"/>
+ <line num="161" type="stmt" count="0"/>
+ <line num="162" type="stmt" count="0"/>
+ <line num="163" type="stmt" count="0"/>
+ <line num="165" type="stmt" count="0"/>
+ <line num="174" type="method" name="getProperties" crap="2" count="0"/>
+ <line num="175" type="stmt" count="0"/>
+ <line num="186" type="method" name="getProperty" crap="6" count="0"/>
+ <line num="187" type="stmt" count="0"/>
+ <line num="188" type="stmt" count="0"/>
+ <line num="190" type="stmt" count="0"/>
+ <line num="202" type="method" name="get" crap="6" count="0"/>
+ <line num="203" type="stmt" count="0"/>
+ <line num="204" type="stmt" count="0"/>
+ <line num="206" type="stmt" count="0"/>
+ <line num="216" type="method" name="setProperty" crap="6" count="0"/>
+ <line num="217" type="stmt" count="0"/>
+ <line num="218" type="stmt" count="0"/>
+ <line num="219" type="stmt" count="0"/>
+ <line num="220" type="stmt" count="0"/>
+ <line num="221" type="stmt" count="0"/>
+ <line num="222" type="stmt" count="0"/>
+ <line num="233" type="method" name="put" crap="2" count="0"/>
+ <line num="234" type="stmt" count="0"/>
+ <line num="246" type="method" name="append" crap="12" count="0"/>
+ <line num="247" type="stmt" count="0"/>
+ <line num="248" type="stmt" count="0"/>
+ <line num="249" type="stmt" count="0"/>
+ <line num="250" type="stmt" count="0"/>
+ <line num="251" type="stmt" count="0"/>
+ <line num="252" type="stmt" count="0"/>
+ <line num="258" type="method" name="propertyNames" crap="2" count="0"/>
+ <line num="259" type="stmt" count="0"/>
+ <line num="266" type="method" name="containsKey" crap="2" count="0"/>
+ <line num="267" type="stmt" count="0"/>
+ <line num="276" type="method" name="keys" crap="2" count="0"/>
+ <line num="277" type="stmt" count="0"/>
+ <line num="284" type="method" name="isEmpty" crap="2" count="0"/>
+ <line num="285" type="stmt" count="0"/>
+ <metrics loc="289" ncloc="135" classes="1" methods="16" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="71" coveredstatements="0" elements="87" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/util/Register.php">
+ <class name="Register" namespace="global" fullPackage="phing.system.util" package="phing.system.util">
+ <metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="4" coveredstatements="0" elements="5" coveredelements="0"/>
+ </class>
+ <class name="RegisterSlot" namespace="global">
+ <metrics methods="5" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="0" elements="13" coveredelements="0"/>
+ </class>
+ <line num="54" type="method" name="getSlot" crap="6" count="0"/>
+ <line num="55" type="stmt" count="0"/>
+ <line num="56" type="stmt" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="78" type="method" name="__construct" crap="2" count="0"/>
+ <line num="79" type="stmt" count="0"/>
+ <line num="80" type="stmt" count="0"/>
+ <line num="86" type="method" name="setKey" crap="2" count="0"/>
+ <line num="87" type="stmt" count="0"/>
+ <line num="88" type="stmt" count="0"/>
+ <line num="94" type="method" name="getKey" crap="2" count="0"/>
+ <line num="95" type="stmt" count="0"/>
+ <line num="102" type="method" name="setValue" crap="2" count="0"/>
+ <line num="103" type="stmt" count="0"/>
+ <line num="104" type="stmt" count="0"/>
+ <line num="110" type="method" name="getValue" crap="2" count="0"/>
+ <line num="111" type="stmt" count="0"/>
+ <metrics loc="115" ncloc="43" classes="2" methods="6" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="12" coveredstatements="0" elements="18" coveredelements="0"/>
+ </file>
+ <file name="/home/druid/dev/phing/trunk/classes/phing/system/util/Timer.php">
+ <class name="Timer" namespace="global" fullPackage="phing.system.util" package="phing.system.util">
+ <metrics methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="13" coveredelements="0"/>
+ </class>
+ <line num="56" type="method" name="start" crap="2" count="0"/>
+ <line num="57" type="stmt" count="0"/>
+ <line num="58" type="stmt" count="0"/>
+ <line num="65" type="method" name="stop" crap="2" count="0"/>
+ <line num="66" type="stmt" count="0"/>
+ <line num="67" type="stmt" count="0"/>
+ <line num="79" type="method" name="getElapsedTime" crap="2" count="0"/>
+ <line num="80" type="stmt" count="0"/>
+ <line num="81" type="stmt" count="0"/>
+ <line num="82" type="stmt" count="0"/>
+ <line num="92" type="method" name="getMicrotime" crap="2" count="0"/>
+ <line num="93" type="stmt" count="0"/>
+ <line num="94" type="stmt" count="0"/>
+ <metrics loc="96" ncloc="28" classes="1" methods="4" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="9" coveredstatements="0" elements="13" coveredelements="0"/>
+ </file>
+ <metrics files="26" loc="4499" ncloc="2163" classes="27" methods="253" coveredmethods="18" conditionals="0" coveredconditionals="0" statements="1114" coveredstatements="91" elements="1367" coveredelements="109"/>
+ </project>
+</coverage>
diff --git a/test/etc/regression/501/coverage.db b/test/etc/regression/501/coverage.db
new file mode 100644
index 0000000..9b045cc
--- /dev/null
+++ b/test/etc/regression/501/coverage.db
@@ -0,0 +1,29 @@
+/home/druid/dev/phing/trunk/classes/phing/system/io/filereader.php=a:2:{s:8:"fullname";s:66:"/home/druid/dev/phing/trunk/classes/phing/system/io/FileReader.php";s:8:"coverage";a:3:{i:36;i:-1;i:37;i:-1;i:38;i:-1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/fileinputstream.php=a:2:{s:8:"fullname";s:71:"/home/druid/dev/phing/trunk/classes/phing/system/io/FileInputStream.php";s:8:"coverage";a:16:{i:44;i:-1;i:45;i:-1;i:46;i:-1;i:47;i:-1;i:48;i:-1;i:49;i:-1;i:52;i:-1;i:53;i:-1;i:54;i:-1;i:55;i:-2;i:57;i:-1;i:58;i:-1;i:65;i:-1;i:66;i:-2;i:73;i:-1;i:74;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/filesystem.php=a:2:{s:8:"fullname";s:66:"/home/druid/dev/phing/trunk/classes/phing/system/io/FileSystem.php";s:8:"coverage";a:258:{i:58;i:2;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-1;i:76;i:2;i:77;i:-2;i:143;i:-1;i:144;i:-2;i:154;i:-1;i:155;i:-2;i:168;i:-1;i:174;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:185;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-2;i:190;i:-1;i:192;i:-2;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-2;i:213;i:-1;i:214;i:-1;i:215;i:-2;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:222;i:-1;i:223;i:-1;i:224;i:-2;i:225;i:-1;i:227;i:-2;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-2;i:240;i:-1;i:241;i:-1;i:243;i:-2;i:258;i:-1;i:259;i:-1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:265;i:-2;i:266;i:-1;i:267;i:-1;i:268;i:-2;i:275;i:-1;i:276;i:-1;i:277;i:-2;i:278;i:-1;i:280;i:-2;i:288;i:-1;i:289;i:-2;i:297;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-2;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-2;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:323;i:-1;i:324;i:-2;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-2;i:344;i:-1;i:354;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-2;i:359;i:-1;i:367;i:-1;i:368;i:-2;i:376;i:-1;i:377;i:-2;i:385;i:-1;i:386;i:-2;i:398;i:-1;i:401;i:-1;i:402;i:-1;i:403;i:-2;i:405;i:-1;i:406;i:-1;i:408;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-2;i:415;i:-1;i:416;i:-1;i:420;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-2;i:440;i:-1;i:441;i:-1;i:442;i:-2;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:450;i:-1;i:451;i:-1;i:453;i:-1;i:454;i:-1;i:455;i:-2;i:458;i:-1;i:459;i:-1;i:462;i:-1;i:463;i:-1;i:464;i:-2;i:476;i:-1;i:477;i:-1;i:478;i:-1;i:479;i:-2;i:480;i:-1;i:492;i:-1;i:493;i:-1;i:494;i:-1;i:495;i:-2;i:496;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:-1;i:514;i:-2;i:515;i:-1;i:523;i:-1;i:524;i:-1;i:525;i:-1;i:526;i:-1;i:527;i:-1;i:528;i:-1;i:529;i:-2;i:530;i:-1;i:539;i:-1;i:540;i:-1;i:541;i:-1;i:542;i:-1;i:543;i:-1;i:544;i:-1;i:545;i:-2;i:546;i:-1;i:557;i:2;i:558;i:2;i:559;i:-1;i:560;i:-1;i:561;i:-2;i:562;i:2;i:578;i:-1;i:580;i:-1;i:581;i:-1;i:582;i:-2;i:584;i:-1;i:594;i:-1;i:596;i:-1;i:597;i:-1;i:598;i:-1;i:599;i:-1;i:602;i:-1;i:604;i:-1;i:605;i:-1;i:606;i:-2;i:607;i:-1;i:619;i:-1;i:622;i:-1;i:624;i:-1;i:626;i:-1;i:627;i:-1;i:628;i:-2;i:630;i:-1;i:632;i:-1;i:634;i:-1;i:636;i:-1;i:637;i:-1;i:639;i:-2;i:642;i:-1;i:644;i:-1;i:650;i:-1;i:651;i:-1;i:652;i:-1;i:653;i:-1;i:660;i:-1;i:663;i:-1;i:664;i:-1;i:665;i:-1;i:666;i:-1;i:669;i:-1;i:672;i:-1;i:673;i:-1;i:674;i:-1;i:675;i:-1;i:679;i:-1;i:680;i:-1;i:684;i:-1;i:686;i:-1;i:688;i:-1;i:689;i:-1;i:690;i:-2;i:694;i:-1;i:706;i:-1;i:712;i:-1;i:714;i:-1;i:716;i:-1;i:717;i:-1;i:718;i:-2;i:719;i:-1;i:736;i:-1;i:737;i:-1;i:739;i:-1;i:741;i:-1;i:742;i:-1;i:743;i:-1;i:745;i:-1;i:746;i:-1;i:747;i:-2;i:749;i:-1;i:750;i:-1;i:751;i:-2;i:752;i:-1;i:755;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/bufferedreader.php=a:2:{s:8:"fullname";s:70:"/home/druid/dev/phing/trunk/classes/phing/system/io/BufferedReader.php";s:8:"coverage";a:57:{i:51;i:-1;i:52;i:-1;i:53;i:-1;i:63;i:-1;i:65;i:-1;i:68;i:-1;i:70;i:-1;i:71;i:-1;i:73;i:-1;i:76;i:-1;i:77;i:-1;i:79;i:-1;i:82;i:-1;i:83;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:91;i:-1;i:92;i:-2;i:95;i:-1;i:96;i:-2;i:99;i:-1;i:100;i:-2;i:103;i:-1;i:104;i:-2;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-2;i:115;i:-1;i:116;i:-1;i:119;i:-1;i:120;i:-1;i:122;i:-1;i:123;i:-2;i:131;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:140;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:152;i:-1;i:153;i:-2;i:162;i:-1;i:163;i:-2;i:166;i:-1;i:167;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/winntfilesystem.php=a:2:{s:8:"fullname";s:71:"/home/druid/dev/phing/trunk/classes/phing/system/io/WinNTFileSystem.php";s:8:"coverage";a:3:{i:22;i:1;i:29;i:1;i:36;i:1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/win32filesystem.php=a:2:{s:8:"fullname";s:71:"/home/druid/dev/phing/trunk/classes/phing/system/io/Win32FileSystem.php";s:8:"coverage";a:284:{i:22;i:1;i:27;i:1;i:36;i:-1;i:37;i:-1;i:38;i:-1;i:39;i:-1;i:42;i:-1;i:43;i:-2;i:46;i:-1;i:47;i:-1;i:48;i:-2;i:51;i:-1;i:52;i:-1;i:53;i:-2;i:55;i:-1;i:57;i:-2;i:63;i:-1;i:64;i:-2;i:67;i:-1;i:68;i:-2;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:100;i:-1;i:101;i:-1;i:102;i:-1;i:103;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:113;i:-1;i:114;i:-2;i:119;i:-1;i:120;i:-1;i:121;i:-2;i:122;i:-1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:129;i:-1;i:131;i:-1;i:132;i:-1;i:134;i:-1;i:135;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-2;i:154;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-2;i:159;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-2;i:172;i:-1;i:173;i:-2;i:174;i:-1;i:176;i:-1;i:177;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-2;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-2;i:201;i:-1;i:202;i:-1;i:203;i:-2;i:204;i:-1;i:205;i:-1;i:206;i:-2;i:207;i:-1;i:208;i:-1;i:209;i:-1;i:210;i:-1;i:211;i:-2;i:212;i:-1;i:213;i:-2;i:216;i:-1;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-2;i:222;i:-1;i:223;i:-1;i:224;i:-1;i:225;i:-1;i:226;i:-1;i:227;i:-1;i:228;i:-2;i:229;i:-1;i:230;i:-2;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:235;i:-2;i:236;i:-1;i:237;i:-2;i:238;i:-1;i:239;i:-2;i:242;i:-1;i:243;i:-1;i:244;i:-1;i:246;i:-1;i:247;i:-1;i:248;i:-1;i:249;i:-2;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-2;i:255;i:-1;i:256;i:-1;i:257;i:-1;i:259;i:-1;i:260;i:-1;i:263;i:-1;i:265;i:-1;i:267;i:-1;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:271;i:-1;i:272;i:-2;i:275;i:-1;i:276;i:-2;i:279;i:-1;i:280;i:-1;i:283;i:-1;i:286;i:-1;i:287;i:-1;i:288;i:-1;i:289;i:-1;i:291;i:-1;i:292;i:-1;i:293;i:-1;i:294;i:-2;i:300;i:-1;i:301;i:-1;i:302;i:-1;i:303;i:-2;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-2;i:311;i:-1;i:312;i:-1;i:313;i:-2;i:314;i:-1;i:315;i:-2;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:323;i:-2;i:325;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-2;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-2;i:338;i:-1;i:339;i:-2;i:342;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-2;i:348;i:-1;i:349;i:-1;i:351;i:-1;i:352;i:-1;i:353;i:-2;i:355;i:-1;i:356;i:-1;i:357;i:-2;i:359;i:-1;i:360;i:-1;i:361;i:-2;i:363;i:-1;i:364;i:-1;i:365;i:-1;i:366;i:-1;i:367;i:-1;i:368;i:-2;i:369;i:-1;i:370;i:-2;i:372;i:-1;i:373;i:-1;i:374;i:-1;i:375;i:-1;i:376;i:-1;i:377;i:-2;i:378;i:-1;i:379;i:-1;i:381;i:-1;i:382;i:-1;i:386;i:-1;i:388;i:-1;i:391;i:-1;i:392;i:-2;i:393;i:-1;i:394;i:-2;i:395;i:-1;i:396;i:-2;i:398;i:-1;i:399;i:-2;i:407;i:-1;i:408;i:-2;i:413;i:-1;i:414;i:-1;i:415;i:-2;i:416;i:-1;i:417;i:-2;i:421;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:430;i:-1;i:431;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:443;i:-1;i:444;i:-2;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-2;i:460;i:-1;i:461;i:-1;i:462;i:-1;i:463;i:-2;i:464;i:-1;i:465;i:-1;i:466;i:-1;i:467;i:-1;i:468;i:-2;i:469;i:-1;i:470;i:-1;i:471;i:-1;i:472;i:-1;i:473;i:-2;i:478;i:1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/bufferedwriter.php=a:2:{s:8:"fullname";s:70:"/home/druid/dev/phing/trunk/classes/phing/system/io/BufferedWriter.php";s:8:"coverage";a:13:{i:44;i:-1;i:45;i:-1;i:46;i:-1;i:49;i:-1;i:50;i:-2;i:53;i:-1;i:54;i:-1;i:57;i:-1;i:58;i:-2;i:61;i:-1;i:62;i:-1;i:68;i:-1;i:69;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/inputstreamreader.php=a:2:{s:8:"fullname";s:73:"/home/druid/dev/phing/trunk/classes/phing/system/io/InputStreamReader.php";s:8:"coverage";a:20:{i:46;i:-1;i:47;i:-1;i:53;i:-1;i:54;i:-2;i:61;i:-1;i:62;i:-2;i:70;i:-1;i:71;i:-2;i:78;i:-1;i:79;i:-1;i:86;i:-1;i:87;i:-2;i:94;i:-1;i:95;i:-1;i:102;i:-1;i:103;i:-2;i:117;i:-1;i:118;i:-2;i:125;i:-1;i:126;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/filterreader.php=a:2:{s:8:"fullname";s:68:"/home/druid/dev/phing/trunk/classes/phing/system/io/FilterReader.php";s:8:"coverage";a:14:{i:36;i:-1;i:37;i:-1;i:40;i:-1;i:41;i:-1;i:44;i:-1;i:45;i:-2;i:53;i:-1;i:54;i:-2;i:57;i:-1;i:58;i:-2;i:61;i:-1;i:62;i:-2;i:65;i:-1;i:66;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/stringreader.php=a:2:{s:8:"fullname";s:68:"/home/druid/dev/phing/trunk/classes/phing/system/io/StringReader.php";s:8:"coverage";a:24:{i:44;i:-1;i:45;i:-1;i:47;i:-1;i:50;i:-1;i:51;i:-1;i:52;i:-2;i:53;i:-1;i:54;i:-1;i:55;i:-2;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:60;i:-2;i:63;i:-1;i:64;i:-1;i:67;i:-1;i:68;i:-1;i:70;i:-1;i:72;i:-1;i:74;i:-1;i:77;i:-1;i:78;i:-2;i:81;i:-1;i:82;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/filewriter.php=a:2:{s:8:"fullname";s:66:"/home/druid/dev/phing/trunk/classes/phing/system/io/FileWriter.php";s:8:"coverage";a:3:{i:38;i:-1;i:39;i:-1;i:40;i:-1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/inputstream.php=a:2:{s:8:"fullname";s:67:"/home/druid/dev/phing/trunk/classes/phing/system/io/InputStream.php";s:8:"coverage";a:58:{i:49;i:-1;i:50;i:-1;i:51;i:-2;i:52;i:-1;i:53;i:-1;i:60;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:66;i:-1;i:68;i:-1;i:69;i:-1;i:71;i:-1;i:73;i:-1;i:74;i:-2;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:98;i:-1;i:99;i:-2;i:106;i:-1;i:107;i:-1;i:108;i:-2;i:109;i:-1;i:110;i:-1;i:117;i:-1;i:118;i:-2;i:125;i:-1;i:126;i:-1;i:127;i:-2;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-2;i:141;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-2;i:146;i:-1;i:147;i:-1;i:154;i:-1;i:155;i:-2;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:176;i:-1;i:177;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/unixfilesystem.php=a:2:{s:8:"fullname";s:70:"/home/druid/dev/phing/trunk/classes/phing/system/io/UnixFileSystem.php";s:8:"coverage";a:142:{i:51;i:-1;i:52;i:-2;i:58;i:-1;i:59;i:-2;i:71;i:2;i:72;i:-1;i:73;i:-2;i:78;i:2;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:86;i:-1;i:88;i:2;i:89;i:2;i:90;i:2;i:91;i:2;i:92;i:2;i:93;i:2;i:94;i:-2;i:95;i:2;i:96;i:2;i:97;i:-1;i:98;i:-1;i:99;i:-2;i:100;i:-1;i:101;i:-2;i:108;i:2;i:109;i:-1;i:110;i:-2;i:111;i:2;i:112;i:2;i:113;i:-1;i:114;i:-1;i:115;i:2;i:116;i:-1;i:117;i:-2;i:118;i:2;i:120;i:2;i:121;i:2;i:122;i:2;i:123;i:2;i:124;i:2;i:125;i:2;i:126;i:2;i:127;i:2;i:128;i:-2;i:129;i:2;i:130;i:2;i:131;i:2;i:132;i:2;i:133;i:-2;i:140;i:2;i:141;i:-1;i:142;i:-2;i:143;i:2;i:144;i:-2;i:153;i:-1;i:154;i:-1;i:155;i:-2;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-2;i:161;i:-1;i:162;i:-2;i:164;i:-1;i:165;i:-1;i:166;i:-2;i:168;i:-1;i:169;i:-2;i:172;i:-1;i:173;i:-2;i:176;i:2;i:177;i:-2;i:184;i:2;i:185;i:2;i:186;i:-2;i:187;i:-1;i:189;i:-2;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-2;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:209;i:-2;i:210;i:-1;i:212;i:-2;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-2;i:223;i:-1;i:225;i:-2;i:237;i:-1;i:239;i:-1;i:240;i:-1;i:241;i:-1;i:242;i:-2;i:244;i:-1;i:245;i:-1;i:247;i:-1;i:248;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-2;i:253;i:-1;i:258;i:-1;i:259;i:-1;i:260;i:-2;i:261;i:-1;i:262;i:-2;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:271;i:-2;i:272;i:-1;i:273;i:-1;i:274;i:-1;i:275;i:-1;i:276;i:-2;i:277;i:-1;i:278;i:-1;i:279;i:-1;i:280;i:-1;i:281;i:-2;i:284;i:-1;i:287;i:-1;i:289;i:-1;i:291;i:-1;i:292;i:-2;i:301;i:-1;i:302;i:-1;i:303;i:-1;i:304;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/ioexception.php=a:2:{s:8:"fullname";s:67:"/home/druid/dev/phing/trunk/classes/phing/system/io/IOException.php";s:8:"coverage";a:0:{}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/phingfile.php=a:2:{s:8:"fullname";s:65:"/home/druid/dev/phing/trunk/classes/phing/system/io/PhingFile.php";s:8:"coverage";a:284:{i:52;i:2;i:53;i:-1;i:54;i:-1;i:55;i:-1;i:56;i:-1;i:59;i:2;i:60;i:-1;i:61;i:2;i:62;i:2;i:63;i:2;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-2;i:69;i:-1;i:70;i:-1;i:72;i:2;i:76;i:2;i:77;i:-2;i:83;i:2;i:85;i:2;i:86;i:-1;i:87;i:-2;i:89;i:2;i:90;i:2;i:91;i:2;i:95;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-2;i:100;i:-1;i:101;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:106;i:-1;i:107;i:-1;i:109;i:-1;i:110;i:-1;i:114;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-2;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:123;i:-1;i:124;i:-1;i:126;i:-1;i:127;i:-1;i:129;i:-1;i:130;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-2;i:150;i:-1;i:151;i:-2;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-2;i:172;i:-1;i:173;i:-2;i:174;i:-1;i:175;i:-2;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-2;i:195;i:-1;i:196;i:-2;i:206;i:2;i:207;i:-2;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-1;i:224;i:-1;i:226;i:-1;i:227;i:-2;i:228;i:-1;i:229;i:-2;i:241;i:-1;i:242;i:-2;i:265;i:2;i:266;i:2;i:267;i:-2;i:277;i:-1;i:278;i:-2;i:306;i:-1;i:307;i:-1;i:308;i:-2;i:319;i:-1;i:320;i:-2;i:343;i:-1;i:357;i:-1;i:360;i:-1;i:362;i:-1;i:363;i:-1;i:364;i:-1;i:366;i:-1;i:367;i:-1;i:368;i:-1;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:374;i:-1;i:375;i:-2;i:388;i:-1;i:390;i:-1;i:391;i:-1;i:392;i:-2;i:393;i:-1;i:394;i:-2;i:407;i:-1;i:408;i:-1;i:409;i:-2;i:419;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-2;i:426;i:-1;i:428;i:-2;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:443;i:-1;i:444;i:-2;i:445;i:-1;i:446;i:-2;i:459;i:-1;i:461;i:-1;i:462;i:-2;i:477;i:-1;i:478;i:-1;i:479;i:-1;i:480;i:-2;i:481;i:-1;i:482;i:-2;i:493;i:-1;i:494;i:-1;i:495;i:-1;i:496;i:-1;i:497;i:-2;i:498;i:-1;i:499;i:-2;i:508;i:-1;i:509;i:-2;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:524;i:-2;i:525;i:-1;i:526;i:-2;i:536;i:-1;i:537;i:-1;i:538;i:-1;i:539;i:-2;i:540;i:-1;i:541;i:-2;i:550;i:-1;i:551;i:-1;i:552;i:-2;i:553;i:-1;i:554;i:-2;i:571;i:-1;i:572;i:-1;i:573;i:-2;i:584;i:-1;i:585;i:-1;i:586;i:-1;i:587;i:-2;i:588;i:-1;i:589;i:-2;i:602;i:-1;i:603;i:-1;i:604;i:-1;i:629;i:-1;i:630;i:-1;i:631;i:-2;i:634;i:-1;i:635;i:-1;i:636;i:-1;i:637;i:-2;i:638;i:-1;i:639;i:-1;i:640;i:-1;i:641;i:-1;i:642;i:-1;i:643;i:-1;i:644;i:-2;i:658;i:-1;i:659;i:-1;i:660;i:-2;i:662;i:-1;i:663;i:-1;i:664;i:-2;i:665;i:-1;i:668;i:-1;i:669;i:-1;i:670;i:-2;i:679;i:-1;i:681;i:-1;i:682;i:-1;i:683;i:-2;i:684;i:-1;i:685;i:-2;i:694;i:-1;i:695;i:-1;i:696;i:-1;i:697;i:-2;i:698;i:-1;i:699;i:-2;i:709;i:-1;i:711;i:-1;i:712;i:-1;i:713;i:-2;i:715;i:-1;i:716;i:-1;i:717;i:-2;i:718;i:-1;i:719;i:-2;i:737;i:-1;i:738;i:-1;i:739;i:-1;i:740;i:-2;i:742;i:-1;i:743;i:-1;i:744;i:-2;i:756;i:-1;i:757;i:-1;i:759;i:-1;i:760;i:-2;i:761;i:-1;i:762;i:-2;i:769;i:-1;i:770;i:-1;i:771;i:-2;i:778;i:-1;i:779;i:-2;i:786;i:-1;i:787;i:-1;i:788;i:-2;i:795;i:-1;i:796;i:-2;i:803;i:-1;i:804;i:-1;i:805;i:-2;i:812;i:-1;i:813;i:-2;i:851;i:-1;i:852;i:-1;i:853;i:-2;i:861;i:-1;i:862;i:-2;i:877;i:-1;i:879;i:-1;i:880;i:-1;i:882;i:-1;i:883;i:-1;i:884;i:-1;i:886;i:-1;i:887;i:-2;i:896;i:-1;i:898;i:-1;i:899;i:-1;i:900;i:-1;i:920;i:-1;i:921;i:-1;i:922;i:-2;i:935;i:-1;i:936;i:-1;i:937;i:-2;i:938;i:-1;i:939;i:-2;i:943;i:-1;i:944;i:-2;i:948;i:-1;i:949;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/writer.php=a:2:{s:8:"fullname";s:62:"/home/druid/dev/phing/trunk/classes/phing/system/io/Writer.php";s:8:"coverage";a:1:{i:46;i:-1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/fileoutputstream.php=a:2:{s:8:"fullname";s:72:"/home/druid/dev/phing/trunk/classes/phing/system/io/FileOutputStream.php";s:8:"coverage";a:17:{i:45;i:2;i:46;i:2;i:47;i:2;i:48;i:-1;i:49;i:-1;i:50;i:-1;i:52;i:2;i:53;i:-1;i:54;i:-1;i:55;i:2;i:57;i:2;i:58;i:-1;i:59;i:-2;i:60;i:2;i:61;i:2;i:68;i:-1;i:69;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/outputstreamwriter.php=a:2:{s:8:"fullname";s:74:"/home/druid/dev/phing/trunk/classes/phing/system/io/OutputStreamWriter.php";s:8:"coverage";a:10:{i:46;i:-1;i:47;i:-1;i:53;i:-1;i:54;i:-2;i:65;i:-1;i:66;i:-2;i:72;i:-1;i:73;i:-1;i:81;i:-1;i:82;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/consolereader.php=a:2:{s:8:"fullname";s:69:"/home/druid/dev/phing/trunk/classes/phing/system/io/ConsoleReader.php";s:8:"coverage";a:13:{i:36;i:-1;i:37;i:-1;i:39;i:-1;i:40;i:-2;i:49;i:-1;i:52;i:-1;i:58;i:-2;i:62;i:-1;i:66;i:-1;i:73;i:-1;i:74;i:-2;i:81;i:-1;i:82;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/outputstream.php=a:2:{s:8:"fullname";s:68:"/home/druid/dev/phing/trunk/classes/phing/system/io/OutputStream.php";s:8:"coverage";a:34:{i:39;i:2;i:40;i:-1;i:41;i:-2;i:42;i:2;i:43;i:2;i:51;i:1;i:52;i:-1;i:53;i:-2;i:54;i:1;i:55;i:1;i:56;i:-1;i:57;i:-1;i:58;i:-2;i:59;i:1;i:60;i:1;i:68;i:2;i:69;i:1;i:70;i:-2;i:71;i:2;i:83;i:2;i:84;i:2;i:85;i:2;i:86;i:1;i:87;i:1;i:88;i:-1;i:89;i:-1;i:90;i:1;i:93;i:2;i:95;i:2;i:96;i:-1;i:97;i:-2;i:98;i:2;i:105;i:-1;i:106;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/io/reader.php=a:2:{s:8:"fullname";s:62:"/home/druid/dev/phing/trunk/classes/phing/system/io/Reader.php";s:8:"coverage";a:7:{i:60;i:-1;i:65;i:-1;i:72;i:-1;i:79;i:-1;i:80;i:-2;i:87;i:-1;i:88;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/util/timer.php=a:2:{s:8:"fullname";s:63:"/home/druid/dev/phing/trunk/classes/phing/system/util/Timer.php";s:8:"coverage";a:11:{i:57;i:-1;i:58;i:-1;i:66;i:-1;i:67;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-2;i:93;i:-1;i:94;i:-1;i:95;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/util/register.php=a:2:{s:8:"fullname";s:66:"/home/druid/dev/phing/trunk/classes/phing/system/util/Register.php";s:8:"coverage";a:15:{i:55;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-2;i:79;i:-1;i:80;i:-1;i:87;i:-1;i:88;i:-1;i:95;i:-1;i:96;i:-2;i:103;i:-1;i:104;i:-1;i:111;i:-1;i:112;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/util/properties.php=a:2:{s:8:"fullname";s:68:"/home/druid/dev/phing/trunk/classes/phing/system/util/Properties.php";s:8:"coverage";a:87:{i:47;i:-1;i:48;i:-1;i:49;i:-1;i:50;i:-1;i:53;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-2;i:74;i:-1;i:75;i:-1;i:77;i:-1;i:79;i:-1;i:81;i:-1;i:82;i:-1;i:84;i:-1;i:86;i:-1;i:87;i:-2;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:94;i:-1;i:95;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-2;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:123;i:-1;i:124;i:-1;i:125;i:-2;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-2;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:165;i:-1;i:175;i:-1;i:176;i:-2;i:187;i:-1;i:188;i:-1;i:189;i:-2;i:190;i:-1;i:191;i:-2;i:203;i:-1;i:204;i:-1;i:205;i:-2;i:206;i:-1;i:207;i:-2;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-2;i:234;i:-1;i:235;i:-2;i:247;i:-1;i:248;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:259;i:-1;i:260;i:-2;i:267;i:-1;i:268;i:-2;i:277;i:-1;i:278;i:-2;i:285;i:-1;i:286;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/lang/filenotfoundexception.php=a:2:{s:8:"fullname";s:79:"/home/druid/dev/phing/trunk/classes/phing/system/lang/FileNotFoundException.php";s:8:"coverage";a:0:{}}
+/home/druid/dev/phing/trunk/classes/phing/system/lang/nullpointerexception.php=a:2:{s:8:"fullname";s:78:"/home/druid/dev/phing/trunk/classes/phing/system/lang/NullPointerException.php";s:8:"coverage";a:0:{}}
+/home/druid/dev/phing/trunk/classes/phing/system/lang/securityexception.php=a:2:{s:8:"fullname";s:75:"/home/druid/dev/phing/trunk/classes/phing/system/lang/SecurityException.php";s:8:"coverage";a:2:{i:25;i:1;i:27;i:1;}}
+/home/druid/dev/phing/trunk/classes/phing/system/lang/eventobject.php=a:2:{s:8:"fullname";s:69:"/home/druid/dev/phing/trunk/classes/phing/system/lang/EventObject.php";s:8:"coverage";a:12:{i:32;i:1;i:33;i:-1;i:34;i:-2;i:35;i:1;i:36;i:1;i:40;i:-1;i:41;i:-2;i:45;i:-1;i:46;i:-1;i:47;i:-2;i:48;i:-1;i:50;i:-2;}}
+/home/druid/dev/phing/trunk/classes/phing/system/lang/character.php=a:2:{s:8:"fullname";s:67:"/home/druid/dev/phing/trunk/classes/phing/system/lang/Character.php";s:8:"coverage";a:9:{i:34;i:-1;i:35;i:-1;i:37;i:-1;i:39;i:-1;i:40;i:-1;i:42;i:-1;i:43;i:-1;i:45;i:-1;i:46;i:-2;}}
diff --git a/test/etc/regression/501/testsuites.xml b/test/etc/regression/501/testsuites.xml
new file mode 100644
index 0000000..fe06b76
--- /dev/null
+++ b/test/etc/regression/501/testsuites.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<testsuites>
+ <testsuite name="Phing Batchtest" tests="2" assertions="3" failures="0" errors="0" time="0.110816">
+ <testsuite name="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" fullPackage="phing.system" package="phing.system" tests="2" assertions="3" failures="0" errors="0" time="0.110816">
+ <testcase name="testWrite" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="55" assertions="3" time="0.071554"/>
+ <testcase name="testFlush" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="79" assertions="0" time="0.039262"/>
+ </testsuite>
+ </testsuite>
+</testsuites>
diff --git a/test/etc/regression/524/build.xml b/test/etc/regression/524/build.xml
new file mode 100644
index 0000000..2b20cc5
--- /dev/null
+++ b/test/etc/regression/524/build.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<project name="test" default="main">
+ <target name="main">
+ <echo msg="Call target explicitly" />
+ </target>
+ <target name="inactive">
+ <pearpkg2 name="MockPackage" dir="./mockpackage">
+ <option name="outputdirectory" value="./out"/>
+ <option name="packagefile" value="package2.xml"/>
+ <option name="channel" value="pear.phing.info"/>
+ <option name="summary" value="Mock Package"/>
+ <option name="description" value="Mock Package"/>
+ <option name="apiversion" value="0.1"/>
+ <option name="apistability" value="beta"/>
+ <option name="releaseversion" value="0.0.1"/>
+ <option name="releasestability" value="beta"/>
+ <option name="license" value="none"/>
+ <option name="phpdep" value="5.0.0"/>
+ <option name="pearinstallerdep" value="1.4.6"/>
+ <option name="packagetype" value="php"/>
+ <option name="notes" value="none really"/>
+ <mapping name="maintainers">
+ <element>
+ <element key="handle" value="hlellelid"/>
+ <element key="name" value="Hans"/>
+ <element key="email" value="hans at xmpl.org"/>
+ <element key="role" value="lead"/>
+ <element key="active" value="no"/>
+ </element>
+ </mapping>
+ <fileset dir="./mockpackage">
+ <include name="**/**" />
+ </fileset>
+ </pearpkg2>
+ </target>
+ <target name="active">
+ <pearpkg2 name="MockPackage" dir="./mockpackage">
+ <option name="outputdirectory" value="./out"/>
+ <option name="packagefile" value="package2.xml"/>
+ <option name="channel" value="pear.phing.info"/>
+ <option name="summary" value="Mock Package"/>
+ <option name="description" value="Mock Package"/>
+ <option name="apiversion" value="0.1"/>
+ <option name="apistability" value="beta"/>
+ <option name="releaseversion" value="0.0.1"/>
+ <option name="releasestability" value="beta"/>
+ <option name="license" value="none"/>
+ <option name="phpdep" value="5.0.0"/>
+ <option name="pearinstallerdep" value="1.4.6"/>
+ <option name="packagetype" value="php"/>
+ <option name="notes" value="none really"/>
+ <mapping name="maintainers">
+ <element>
+ <element key="handle" value="hlellelid"/>
+ <element key="name" value="Hans"/>
+ <element key="email" value="hans at xmpl.org"/>
+ <element key="role" value="lead"/>
+ <element key="active" value="yes"/>
+ </element>
+ </mapping>
+ <fileset dir="./mockpackage">
+ <include name="**/**" />
+ </fileset>
+ </pearpkg2>
+ </target>
+ <target name="notset">
+ <pearpkg2 name="MockPackage" dir="./mockpackage">
+ <option name="outputdirectory" value="./out"/>
+ <option name="packagefile" value="package2.xml"/>
+ <option name="channel" value="pear.phing.info"/>
+ <option name="summary" value="Mock Package"/>
+ <option name="description" value="Mock Package"/>
+ <option name="apiversion" value="0.1"/>
+ <option name="apistability" value="beta"/>
+ <option name="releaseversion" value="0.0.1"/>
+ <option name="releasestability" value="beta"/>
+ <option name="license" value="none"/>
+ <option name="phpdep" value="5.0.0"/>
+ <option name="pearinstallerdep" value="1.4.6"/>
+ <option name="packagetype" value="php"/>
+ <option name="notes" value="none really"/>
+ <mapping name="maintainers">
+ <element>
+ <element key="handle" value="hlellelid"/>
+ <element key="name" value="Hans"/>
+ <element key="email" value="hans at xmpl.org"/>
+ <element key="role" value="lead"/>
+ </element>
+ </mapping>
+ <fileset dir="./mockpackage">
+ <include name="**/**" />
+ </fileset>
+ </pearpkg2>
+ </target>
+</project>
diff --git a/test/etc/regression/137/.gitignore b/test/etc/regression/524/mockpackage/readme
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/regression/524/mockpackage/readme
diff --git a/test/etc/regression/544/build.xml b/test/etc/regression/544/build.xml
new file mode 100644
index 0000000..16c317e
--- /dev/null
+++ b/test/etc/regression/544/build.xml
@@ -0,0 +1,14 @@
+<project name="Test" default="main">
+ <target name="main">
+ <delete dir="tmp/target"/>
+ <mkdir dir="tmp/target"/>
+ <copy todir="tmp/target" includeemptydirs="true"
+ overwrite="true">
+ <fileset dir="tmp/source" defaultexcludes="false">
+ <include name="**/**" />
+ <exclude name=".*" />
+ <exclude name="test/**/**" />
+ </fileset>
+ </copy>
+ </target>
+</project>
\ No newline at end of file
diff --git a/test/etc/regression/252/a b/test/etc/regression/544/tmp/source/a
similarity index 100%
copy from test/etc/regression/252/a
copy to test/etc/regression/544/tmp/source/a
diff --git a/test/etc/regression/252/b b/test/etc/regression/544/tmp/source/b
similarity index 100%
copy from test/etc/regression/252/b
copy to test/etc/regression/544/tmp/source/b
diff --git a/test/etc/regression/137/.gitignore b/test/etc/regression/544/tmp/source/somedir/test
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/regression/544/tmp/source/somedir/test
diff --git a/test/etc/regression/137/.gitignore b/test/etc/regression/544/tmp/source/test/foo
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/regression/544/tmp/source/test/foo
diff --git a/test/etc/regression/137/.gitignore b/test/etc/regression/544/tmp/source/tests/bar
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/regression/544/tmp/source/tests/bar
diff --git a/test/etc/regression/582/build.xml b/test/etc/regression/582/build.xml
new file mode 100644
index 0000000..2c993f3
--- /dev/null
+++ b/test/etc/regression/582/build.xml
@@ -0,0 +1,6 @@
+<project default="main" name="Test">
+ <target name="main">
+ <move file="no_such_file.txt" tofile="other_path.txt"
+ overwrite="true" haltonerror="false" />
+ </target>
+</project>
\ No newline at end of file
diff --git a/test/etc/regression/585/build.xml b/test/etc/regression/585/build.xml
new file mode 100644
index 0000000..aa0407a
--- /dev/null
+++ b/test/etc/regression/585/build.xml
@@ -0,0 +1,6 @@
+<project name="test" default="main">
+ <target name="main">
+ <property file="test.properties"/>
+ <echo>${setting}</echo>
+ </target>
+</project>
\ No newline at end of file
diff --git a/test/etc/regression/585/test.properties b/test/etc/regression/585/test.properties
new file mode 100644
index 0000000..f136100
--- /dev/null
+++ b/test/etc/regression/585/test.properties
@@ -0,0 +1 @@
+setting=value ; a comment
diff --git a/test/etc/regression/590/build.xml b/test/etc/regression/590/build.xml
new file mode 100644
index 0000000..d6e4745
--- /dev/null
+++ b/test/etc/regression/590/build.xml
@@ -0,0 +1,9 @@
+<project name="Regression #590" default="main">
+ <target name="main">
+ <phplint deprecatedaserror="true">
+ <fileset dir=".">
+ <include name="*.php"/>
+ </fileset>
+ </phplint>
+ </target>
+</project>
\ No newline at end of file
diff --git a/test/etc/regression/590/my_file.php b/test/etc/regression/590/my_file.php
new file mode 100644
index 0000000..fc57c08
--- /dev/null
+++ b/test/etc/regression/590/my_file.php
@@ -0,0 +1,3 @@
+<?php
+echo 'Hello world;
+?>
diff --git a/test/etc/regression/590/my_file_depr.php b/test/etc/regression/590/my_file_depr.php
new file mode 100644
index 0000000..2e8270a
--- /dev/null
+++ b/test/etc/regression/590/my_file_depr.php
@@ -0,0 +1,9 @@
+<?php
+
+class TestClass
+{
+};
+
+$t = & new TestClass();
+
+?>
diff --git a/test/etc/regression/590/my_file_ok.php b/test/etc/regression/590/my_file_ok.php
new file mode 100644
index 0000000..e39bf75
--- /dev/null
+++ b/test/etc/regression/590/my_file_ok.php
@@ -0,0 +1,3 @@
+<?php
+echo 'Hello world';
+?>
diff --git a/test/etc/regression/610/BaseTask.php b/test/etc/regression/610/BaseTask.php
new file mode 100644
index 0000000..6476418
--- /dev/null
+++ b/test/etc/regression/610/BaseTask.php
@@ -0,0 +1,7 @@
+<?php
+
+abstract class BaseTask extends Task
+{
+};
+
+?>
\ No newline at end of file
diff --git a/test/etc/regression/610/build.xml b/test/etc/regression/610/build.xml
new file mode 100644
index 0000000..0a25fa8
--- /dev/null
+++ b/test/etc/regression/610/build.xml
@@ -0,0 +1,19 @@
+<project name="Test" default="main">
+ <target name="main">
+ <adhoc-task name="doThis"><![CDATA[
+ require_once 'phing/Task.php';
+ require_once 'BaseTask.php';
+
+ class doThisTask extends BaseTask
+ {
+ public function main()
+ {
+ $this->log("doThisTask success!",
+ Project::MSG_INFO);
+ }
+ };
+ ]]>
+ </adhoc-task>
+ <doThis/>
+ </target>
+</project>
\ No newline at end of file
diff --git a/test/etc/regression/137/.gitignore b/test/etc/resources/tasks/system/UpToDateTask/source.txt
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/resources/tasks/system/UpToDateTask/source.txt
diff --git a/test/etc/regression/137/.gitignore b/test/etc/resources/tasks/system/UpToDateTask/target.txt
similarity index 100%
copy from test/etc/regression/137/.gitignore
copy to test/etc/resources/tasks/system/UpToDateTask/target.txt
diff --git a/test/etc/tasks/ext/GitBaseTest.xml b/test/etc/tasks/ext/GitBaseTest.xml
new file mode 100644
index 0000000..a961450
--- /dev/null
+++ b/test/etc/tasks/ext/GitBaseTest.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<project name="git_test" default="main">
+ <target name="main" description="==>Git tasks UTs">
+
+ </target>
+</project>
diff --git a/test/etc/tasks/ext/GitBranchTaskTest.xml b/test/etc/tasks/ext/GitBranchTaskTest.xml
new file mode 100644
index 0000000..741980d
--- /dev/null
+++ b/test/etc/tasks/ext/GitBranchTaskTest.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<project name="gitBranchTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="allParamsSet" description="all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="all-params-set"
+ startpoint="origin/master"
+ track="true"
+ force="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitbranch />
+ </target>
+
+ <target name="noBranchname" description="Required param checking">
+ <gitbranch repository="${tmp.dir.resolved}"/>
+ </target>
+
+ <target name="trackParamSet" description="git-branch --track">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="track-param-set"
+ track="true" />
+ </target>
+
+ <target name="noTrackParamSet" description="git-branch --no-track">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="no-track-param-set"
+ notrack="true" />
+ </target>
+
+ <target name="setUpstreamParamSet" description="git-branch --set-upstream">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="set-upstream-param-set"
+ setupstream="true" />
+ </target>
+
+ <target name="forceParamSet" description="git-branch --force">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="force-param-set" />
+ <!-- try to create already created branck -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="force-param-set"
+ force="true"
+ />
+ </target>
+
+ <target name="deleteBranch" description="git-branch -d|-D">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="delete-branch-1" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="delete-branch-2" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="delete-branch-1"
+ delete="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="delete-branch-2"
+ forcedelete="true" />
+ </target>
+
+ <target name="moveBranch" description="git-branch -m">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1"
+ newbranch="move-branch-2"
+ move="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-2"
+ delete="true" />
+ </target>
+
+ <target name="forceMoveBranch" description="git-branch -M">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1"
+ newbranch="move-branch-2"
+ forcemove="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-2"
+ delete="true" />
+ </target>
+
+ <target name="moveBranchNoNewbranch" description="git-branch -m">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1"
+ move="true" />
+ </target>
+
+ <target name="forceMoveBranchNoNewbranch" description="git-branch -M">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1" track="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="move-branch-1"
+ forcemove="true" />
+ </target>
+
+</project>
diff --git a/test/etc/tasks/ext/GitCheckoutTaskTest.xml b/test/etc/tasks/ext/GitCheckoutTaskTest.xml
new file mode 100644
index 0000000..2ad8947
--- /dev/null
+++ b/test/etc/tasks/ext/GitCheckoutTaskTest.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<project name="gitCheckoutTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="checkoutExistingBranch" description="Checkout from existing branch">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="co-branch"
+ startpoint="origin/master" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-branch" quiet="true" />
+ </target>
+
+ <target name="checkoutNonExistingBranch" description="Checkout from non-existing branch">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-branch" quiet="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitcheckout />
+ </target>
+
+ <target name="noBranchname" description="Required param checking">
+ <gitcheckout repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="checkoutMerge" description="Checkout with -m">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="co-branch"
+ startpoint="origin/master" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-branch" quiet="true"
+ merge="true"/>
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="master" delete="true" />
+ </target>
+
+ <target name="checkoutCreateBranch" description="Checkout with -b">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" quiet="true"
+ create="true"
+ startpoint="origin/master" />
+ <!-- get back to master branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="master" quiet="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" delete="true" />
+ </target>
+
+ <target name="checkoutForceCreateBranch" description="Checkout with -B">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" quiet="true"
+ create="true" />
+ <!-- get back to master branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="master" quiet="true" />
+ <!-- try to create already created branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" quiet="true"
+ forceCreate="true" />
+ <!-- get back to master branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="master" quiet="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" delete="true" />
+ </target>
+
+ <target name="checkoutForceCreateBranchFailed" description="Checkout with -B">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" quiet="true"
+ create="true" />
+ <!-- get back to master branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="master" quiet="true" />
+ <!-- try to create already created branch -->
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="co-create-branch" quiet="true"
+ create="true" />
+ </target>
+
+
+</project>
diff --git a/test/etc/tasks/ext/GitCloneTaskTest.xml b/test/etc/tasks/ext/GitCloneTaskTest.xml
new file mode 100644
index 0000000..6f7754f
--- /dev/null
+++ b/test/etc/tasks/ext/GitCloneTaskTest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<project name="gitCloneTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="gitClone" description="Clone read-only github repo">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitCloneBare" description="Clone bare github repo">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}"
+ bare="true" />
+ </target>
+
+ <target name="wrongRepository" description="Path to repository not found">
+ <gitclone
+ repository="this-is-plain-wrong"
+ targetPath="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="wrongTargetPath" description="Path to target path not found">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="this-is-plain-wrong" />
+ </target>
+
+ <target name="noRepository" description="No repo dir argument provided">
+ <gitclone targetPath="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="noTargetPath" description="No target path argument provided">
+ <gitclone repository="git://github.com/farazdagi/phing-tests.git" />
+ </target>
+</project>
diff --git a/test/etc/tasks/ext/GitFetchTaskTest.xml b/test/etc/tasks/ext/GitFetchTaskTest.xml
new file mode 100644
index 0000000..e4f063d
--- /dev/null
+++ b/test/etc/tasks/ext/GitFetchTaskTest.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<project name="gitFetchTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="fetchAllRemotes" description="Fetch from all remotes">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitfetch
+ repository="${tmp.dir.resolved}" all="true" />
+ </target>
+
+ <target name="allParamsSet" description="all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitfetch
+ repository="${tmp.dir.resolved}"
+ source="origin" tags="true" keep="true" force="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitfetch />
+ </target>
+
+ <target name="noTarget" description="Required param checking">
+ <gitfetch repository="${tmp.dir.resolved}" source="" />
+ </target>
+
+ <target name="refspecSet" description="git-fetch --track">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitfetch
+ repository="${tmp.dir.resolved}"
+ source="origin"
+ refspec="master:refspec-branch"
+ quiet="true" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="refspec-branch"
+ delete="true" />
+ </target>
+
+</project>
diff --git a/test/etc/tasks/ext/GitGcTaskTest.xml b/test/etc/tasks/ext/GitGcTaskTest.xml
new file mode 100644
index 0000000..d228c05
--- /dev/null
+++ b/test/etc/tasks/ext/GitGcTaskTest.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<project name="gitGcTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="allParamsSet" description="Gc with all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitgc
+ repository="${tmp.dir.resolved}"
+ aggressive="true"
+ auto="true"
+ noprune="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitgc />
+ </target>
+
+ <target name="autoParamSet" description="Gc --auto">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitgc
+ repository="${tmp.dir.resolved}" auto="true" />
+ </target>
+
+ <target name="nopruneParamSet" description="Gc --noprune">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitgc
+ repository="${tmp.dir.resolved}" noprune="true" />
+ </target>
+
+ <target name="aggressiveParamSet" description="Gc --aggressive">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitgc
+ repository="${tmp.dir.resolved}" aggressive="true" />
+ </target>
+
+ <target name="pruneParamSet" description="Gc --prune=date">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitgc
+ repository="${tmp.dir.resolved}" prune="1.week.ago" />
+ </target>
+</project>
diff --git a/test/etc/tasks/ext/GitInitTaskTest.xml b/test/etc/tasks/ext/GitInitTaskTest.xml
new file mode 100644
index 0000000..d21bd01
--- /dev/null
+++ b/test/etc/tasks/ext/GitInitTaskTest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<project name="gitInitTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="gitInit" description="Initialize normal git repository">
+ <gitinit repository="${tmp.dir.resolved}"/>
+ </target>
+
+ <target name="gitInitBare" description="Initialize bare repository">
+ <gitinit bare="true" repository="${tmp.dir.resolved}"/>
+ </target>
+
+
+ <target name="wrongRepository" description="Wrong repository directory">
+ <gitinit repository="this-is-plain-wrong"/>
+ </target>
+
+ <target name="noRepository" description="No repo dir argument provided">
+ <gitinit />
+ </target>
+</project>
diff --git a/test/etc/tasks/ext/GitLogTaskTest.xml b/test/etc/tasks/ext/GitLogTaskTest.xml
new file mode 100644
index 0000000..ed000fe
--- /dev/null
+++ b/test/etc/tasks/ext/GitLogTaskTest.xml
@@ -0,0 +1,167 @@
+<?xml version="1.0"?>
+<project name="gitLogTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="gitLogWithoutParams" description="Run git-log w/o any params">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog repository="${tmp.dir.resolved}" />
+ </target>
+ <target name="gitLogWithMostParams" description="Run git-log w/ most params set">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ maxCount="2"
+ stat="true"
+ noMerges="false"
+ paths="${tmp.dir.resolved}"
+ until="Mon Jan 24 09:59:33 2011 +0300"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogOutputPropertySet" description="Run git-log w/ dumping output into property">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ outputProperty="gitLogOutput"
+ since="Sun Jan 23 23:55:42 2011 +0300"
+ until="Mon Jan 24 09:59:33 2011 +0300"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+
+ <target name="gitLogNameStatusSet" description="Run git-log w/ --name-status">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ nameStatus="true"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogDateRelative" description="Run git-log w/ --date=relative">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="medium"
+ date="relative"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogSinceUntilSet" description="Run git-log w/ --since + --until">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ since="2011-01-23"
+ until="Mon Jan 24 09:50:33 2011 +0300"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogBeforeAfterSet" description="Run git-log w/ --before + --after">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ after="2011-01-23"
+ before="Mon Jan 24 09:50:33 2011 +0300"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatOneLine" description="Run git-log w/ --format=oneline">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="oneline"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatShort" description="Run git-log w/ --format=short">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="short"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatMedium" description="Run git-log w/ --format=medium">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="medium"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatFull" description="Run git-log w/ --format=full">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="full"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatFuller" description="Run git-log w/ --format=fuller">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="fuller"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatEmail" description="Run git-log w/ --format=email">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="email"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitLogFormatCustom" description="Run git-log w/ --format=string">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitlog
+ format="The author of %H was %an <%ae>"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="noRepository" description="No repo dir argument provided">
+ <gitlog />
+ </target>
+
+</project>
diff --git a/test/etc/tasks/ext/GitMergeTaskTest.xml b/test/etc/tasks/ext/GitMergeTaskTest.xml
new file mode 100644
index 0000000..b35c2ae
--- /dev/null
+++ b/test/etc/tasks/ext/GitMergeTaskTest.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<project name="gitMergeTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="allParamsSet" description="all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <!-- create couple of test branches -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-2" startpoint="origin/master" />
+ <gitmerge
+ repository="${tmp.dir.resolved}"
+ remote="merge-test-1 merge-test-2"
+ message="merging repos" commit="true"/>
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitmerge />
+ </target>
+
+ <target name="noRemotes" description="Required param checking">
+ <gitmerge repository="${tmp.dir.resolved}" remote="" />
+ </target>
+
+ <target name="wrongStrategySet" description="git-merge --strategy">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <!-- create couple of test branches -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+ <gitmerge
+ repository="${tmp.dir.resolved}"
+ remote="merge-test-1"
+ strategy="plain-wrong" quiet="true" />
+ </target>
+
+ <target name="strategySet" description="git-merge --strategy">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <!-- create couple of test branches -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+ <gitmerge
+ repository="${tmp.dir.resolved}"
+ remote="merge-test-1"
+ strategy="recursive" />
+ </target>
+
+ <target name="remoteSet" description="git-merge commit">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <!-- create couple of test branches -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+ <gitmerge
+ repository="${tmp.dir.resolved}"
+ remote="6dbaf4508e75dcd426b5b974a67c462c70d46e1f" />
+ </target>
+
+ <target name="fastForwardCommitSet" description="git-merge --no-ff">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="6dbaf4508e75dcd426b5b974a67c462c70d46e1f" />
+ <gitcheckout
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" quiet="true" />
+ <gitmerge
+ fastForwardCommit="true"
+ repository="${tmp.dir.resolved}"
+ remote="origin/master" />
+ <gitlog
+ format="oneline"
+ maxCount="2"
+ stat="true"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="noCommitSet" description="git-merge --no-commit">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <!-- create couple of test branches -->
+ <gitbranch
+ repository="${tmp.dir.resolved}"
+ branchname="merge-test-1" startpoint="origin/master" />
+ <gitmerge
+ repository="${tmp.dir.resolved}"
+ remote="6dbaf4508e75dcd426b5b974a67c462c70d46e1f" nocommit="true" />
+ </target>
+
+
+</project>
diff --git a/test/etc/tasks/ext/GitPullTaskTest.xml b/test/etc/tasks/ext/GitPullTaskTest.xml
new file mode 100644
index 0000000..9f90648
--- /dev/null
+++ b/test/etc/tasks/ext/GitPullTaskTest.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<project name="gitPullTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="allParamsSet" description="all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}"
+ source="origin" refspec="foobranch"
+ strategy="recursive" keep="true"
+ force="true" quiet="true" norebase="true" />
+ </target>
+
+ <target name="allParamsSetRebase" description="all parameters present">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}"
+ source="origin" refspec="foobranch"
+ strategy="recursive" keep="true"
+ force="true" quiet="true" rebase="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitpull />
+ </target>
+
+ <target name="noSource" description="Required param checking">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}" source="" />
+ </target>
+
+ <target name="wrongStrategySet" description="git-pull --strategy">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}"
+ source="origin" refspec="foobranch"
+ strategy="plain-wrong"
+ force="true" quiet="true" />
+ </target>
+
+ <target name="allReposSet" description="git-pull --all">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}" all="true" />
+ </target>
+
+ <target name="appendSet" description="git-pull --append">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}" all="true" append="true" />
+ </target>
+
+ <target name="tagsSet" description="git-pull --tags">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}"
+ refspec="foobranch"
+ keep="true" tags="true" />
+ </target>
+
+ <target name="noTagsSet" description="git-pull --no-tags">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpull
+ repository="${tmp.dir.resolved}"
+ refspec="foobranch"
+ keep="true" notags="true" />
+ </target>
+
+
+</project>
diff --git a/test/etc/tasks/ext/GitPushTaskTest.xml b/test/etc/tasks/ext/GitPushTaskTest.xml
new file mode 100644
index 0000000..93f99e4
--- /dev/null
+++ b/test/etc/tasks/ext/GitPushTaskTest.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<project name="gitPushTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="allParamsSet" description="all parameters present">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ destination="origin" refspec="master:foobranch"
+ force="true" quiet="true" />
+ </target>
+
+ <target name="wrongRepo" description="all parameters present">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="plain-wrong"
+ destination="origin" refspec="master:foobranch"
+ force="true" quiet="true" />
+ </target>
+
+ <target name="noRepository" description="Required param checking">
+ <gitpush />
+ </target>
+
+ <target name="noDestination" description="Required param checking">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}" destination="" />
+ </target>
+
+ <target name="allReposSet" description="git-push --all">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}" all="true" />
+ </target>
+
+ <target name="tagsSet" description="git-push --tags">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ refspec="master:foobranch" tags="true" />
+ </target>
+
+ <target name="mirrorSet" description="git-push --tags">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ mirror="true" quiet="true" />
+ </target>
+ <target name="deleteSet" description="git-push --tags">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ refspec="master:newbranch" quiet="true" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ delete="true"
+ refspec="newbranch" quiet="true" />
+ </target>
+
+ <target name="deleteSet" description="git-push --tags">
+ <gitclone
+ repository="git at github.com:farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ refspec="master:newbranch" quiet="true" />
+ <gitpush
+ repository="${tmp.dir.resolved}"
+ delete="true"
+ refspec="newbranch" quiet="true" />
+ </target>
+</project>
diff --git a/test/etc/tasks/ext/GitTagTaskTest.xml b/test/etc/tasks/ext/GitTagTaskTest.xml
new file mode 100644
index 0000000..b618df5
--- /dev/null
+++ b/test/etc/tasks/ext/GitTagTaskTest.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<project name="gitTagTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../../tmp/git" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="gitTagCreate"
+ description="Create non-annotated tag">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagCreateDuplicate"
+ description="Create duplicate non-annotated tag">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ </target>
+
+ <target name="gitTagForceCreateDuplicate"
+ description="Create (force) duplicate non-annotated tag">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0" force="true"/>
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagReplaceCreateDuplicate"
+ description="Check alternative 'replace' attribute">
+ <!-- obtain test repo -->
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0" replace="true"/>
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagCreateAnnotatedNoMessage"
+ description="git-tag -a tagname">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ annotate="true" />
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagCreateAnnotated"
+ description="git-tag -a tagname">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ annotate="true" message="Version 1.0 tag"/>
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagCreateAnnotatedImplicit"
+ description="git-tag -a tagname w/o providing -a option explicitly">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ message="Version 1.0 tag"/>
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagDelete"
+ description="git-tag -d tagname(s)">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag repository="${tmp.dir.resolved}" name="ver2.0" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver2.0" delete="true" />
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+ <target name="gitTagListByPattern"
+ description="git-tag -l pattern">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag repository="${tmp.dir.resolved}" name="ver2.0" />
+ <gittag repository="${tmp.dir.resolved}" name="marked" />
+ <gittag repository="${tmp.dir.resolved}"
+ list="true" pattern="marked" />
+ </target>
+
+ <target name="gitTagOutpuPropertySet"
+ description="git-tag -l pattern">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}" name="ver1.0" />
+ <gittag repository="${tmp.dir.resolved}" name="ver2.0" />
+ <gittag repository="${tmp.dir.resolved}" name="marked" />
+ <gittag repository="${tmp.dir.resolved}"
+ list="true"
+ outputProperty="gitLogOutput"
+ pattern="marked" />
+ </target>
+
+ <target name="gitTagWithCommitSet"
+ description="git-tag c573116f395d36497a1ac1dba565ecd3d3944277">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ commit="c573116f395d36497a1ac1dba565ecd3d3944277" />
+ <gitlog
+ format="oneline"
+ paths="ver1.0"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitTagWithObjectSet"
+ description="git-tag c573116f395d36497a1ac1dba565ecd3d3944277">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ object="c573116f395d36497a1ac1dba565ecd3d3944277" />
+ <gitlog
+ format="oneline"
+ paths="ver1.0"
+ repository="${tmp.dir.resolved}" />
+ </target>
+
+ <target name="gitTagFileSet" description="git-tag -F">
+ <property name="msg.dir" value="./../../../tmp" />
+ <resolvepath propertyName="msg.dir.resolved" file="${msg.dir}" />
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag repository="${tmp.dir.resolved}"
+ name="ver1.0"
+ file="${msg.dir.resolved}/msg.txt" />
+ <gittag repository="${tmp.dir.resolved}"
+ list="true" num="1" />
+ </target>
+
+
+ <target name="gitTagCreateSignedDefaultKey"
+ description="git-tag -s tagname">
+ <gitclone
+ repository="git://github.com/farazdagi/phing-tests.git"
+ targetPath="${tmp.dir.resolved}" />
+ <gittag
+ repository="${tmp.dir.resolved}"
+ name="ver1.0" sign="true"
+ message="Version 1.0 tag"/>
+ <gittag repository="${tmp.dir.resolved}" list="true"/>
+ </target>
+
+
+ <target name="noRepository" description="No repo dir argument provided">
+ <gittag />
+ </target>
+
+</project>
diff --git a/test/etc/tasks/system/UpToDateTest.xml b/test/etc/tasks/system/UpToDateTest.xml
new file mode 100644
index 0000000..7dedd21
--- /dev/null
+++ b/test/etc/tasks/system/UpToDateTest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<project name="UpToDateTaskTest" default="invalid">
+
+ <property name="tmp.dir" value="./../../resources/tasks/system/UpToDateTask" />
+ <resolvepath propertyName="tmp.dir.resolved" file="${tmp.dir}" />
+
+ <target name="invalid">
+ <fail>This file should only be run via a testcase</fail>
+ </target>
+
+ <target name="overrideNoPropertySet" description="Ticket 559 - test whether property is updated">
+ <touch file="${tmp.dir}/target.txt" />
+ <echo>echo = ${prop}</echo>
+ <uptodate
+ property="prop"
+ value="updated"
+ srcfile="${tmp.dir}/source.txt"
+ targetfile="${tmp.dir}/target.txt" >
+ </uptodate>
+ <echo>echo = ${prop}</echo>
+ </target>
+
+ <target name="overridePropertySet" description="Ticket 559 - test whether property is updated">
+ <touch file="${tmp.dir}/target.txt" />
+ <property name="prop" value="value exists"/>
+
+ <echo>echo = ${prop}</echo>
+ <uptodate
+ property="prop"
+ value="updated"
+ srcfile="${tmp.dir}/source.txt"
+ targetfile="${tmp.dir}/target.txt" >
+ </uptodate>
+ <echo>echo = ${prop}</echo>
+ </target>
+
+</project>
diff --git a/test/etc/tasks/taskdef.xml b/test/etc/tasks/taskdef.xml
old mode 100755
new mode 100644
diff --git a/test/phpunit.xml b/test/phpunit.xml
new file mode 100644
index 0000000..ea498b9
--- /dev/null
+++ b/test/phpunit.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<phpunit backupGlobals="false"
+ backupStaticAttributes="true"
+ bootstrap="./bootstrap.php"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="false"
+ convertWarningsToExceptions="false"
+ processIsolation="true"
+ stopOnFailure="true"
+ syntaxCheck="false"
+ verbose="true"
+ strict="true">
+ <testsuites>
+ <testsuite name="AllTests">
+ <directory>classes/phing/</directory>
+ </testsuite>
+ </testsuites>
+ <groups>
+ <exclude>
+ <group>disable</group>
+ </exclude>
+ </groups>
+
+ <filter>
+ <whitelist>
+ <directory suffix=".php">../classes/phing/tasks/</directory>
+ </whitelist>
+ </filter>
+</phpunit>
diff --git a/test/reports/phpunit-noframes.html b/test/reports/phpunit-noframes.html
index d57cf0e..836fbba 100644
--- a/test/reports/phpunit-noframes.html
+++ b/test/reports/phpunit-noframes.html
@@ -86,11 +86,11 @@
<th>Time</th>
</tr>
<tr valign="top" class="">
-<td>49</td>
+<td>127</td>
<td>0</td>
<td>0</td>
<td>100.00%</td>
-<td>2.711</td>
+<td>48.855</td>
</tr>
</table>
<table border="0" width="95%"><tr><td style="text-align: justify;">
@@ -112,56 +112,70 @@
<td>3</td>
<td>0</td>
<td>0</td>
-<td>0.009</td>
+<td>0.002</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.filters">phing.filters</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.053</td>
+<td>0.062</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.mappers">phing.mappers</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.547</td>
+<td>0.173</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.regression">phing.regression</a></td>
-<td>11</td>
+<td>18</td>
<td>0</td>
<td>0</td>
-<td>0.743</td>
+<td>1.336</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.system">phing.system</a></td>
-<td>2</td>
+<td>3</td>
<td>0</td>
<td>0</td>
-<td>0.009</td>
+<td>0.174</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#phing.system.io">phing.system.io</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.000</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#phing.tasks.ext">phing.tasks.ext</a></td>
+<td>69</td>
+<td>0</td>
+<td>0</td>
+<td>46.610</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.tasks.system">phing.tasks.system</a></td>
<td>23</td>
<td>0</td>
<td>0</td>
-<td>0.796</td>
+<td>0.283</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.tasks.system.condition">phing.tasks.system.condition</a></td>
<td>3</td>
<td>0</td>
<td>0</td>
-<td>0.005</td>
+<td>0.002</td>
</tr>
<tr valign="top" class="">
<td><a href="#phing.types">phing.types</a></td>
<td>5</td>
<td>0</td>
<td>0</td>
-<td>0.549</td>
+<td>0.213</td>
</tr>
</table>
<hr size="1" width="95%" align="left">
@@ -179,7 +193,7 @@
<td>3</td>
<td>0</td>
<td>0</td>
-<td>0.009</td>
+<td>0.002</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -198,7 +212,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.053</td>
+<td>0.062</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -217,7 +231,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.547</td>
+<td>0.173</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -232,81 +246,116 @@
<th nowrap>Time(s)</th>
</tr>
<tr valign="top" class="">
+<td><a href="#PearPkg2CompatibilityTest">PearPkg2CompatibilityTest</a></td>
+<td>3</td>
+<td>0</td>
+<td>0</td>
+<td>0.243</td>
+</tr>
+<tr valign="top" class="">
<td><a href="#PhpUnit34Test">PhpUnit34Test</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.212</td>
+<td>0.171</td>
</tr>
<tr valign="top" class="">
<td><a href="#PearStyleNamingTest">PearStyleNamingTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.022</td>
+<td>0.055</td>
</tr>
<tr valign="top" class="">
<td><a href="#RecursivePropertyTest">RecursivePropertyTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.026</td>
+<td>0.038</td>
</tr>
<tr valign="top" class="">
<td><a href="#MoveReplaceRegexpTest">MoveReplaceRegexpTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.040</td>
+<td>0.058</td>
</tr>
<tr valign="top" class="">
<td><a href="#ExcludeZipTest">ExcludeZipTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.128</td>
+<td>0.290</td>
</tr>
<tr valign="top" class="">
<td><a href="#CustomTaskFileSetTest">CustomTaskFileSetTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.089</td>
+<td>0.062</td>
</tr>
<tr valign="top" class="">
<td><a href="#HtmlEntitiesTest">HtmlEntitiesTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
+<td>0.035</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#CopyMoveNoExceptionTest">CopyMoveNoExceptionTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.026</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#PhpLintFlagTest">PhpLintFlagTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.138</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#PropertyCommentsTest">PropertyCommentsTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
<td>0.032</td>
</tr>
<tr valign="top" class="">
+<td><a href="#AdhocTaskdefTaskTest">AdhocTaskdefTaskTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.030</td>
+</tr>
+<tr valign="top" class="">
<td><a href="#ForeachFileSetTest">ForeachFileSetTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.070</td>
+<td>0.066</td>
</tr>
<tr valign="top" class="">
<td><a href="#CopyTaskFileListTest">CopyTaskFileListTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.043</td>
+<td>0.027</td>
</tr>
<tr valign="top" class="">
<td><a href="#ReplaceTokenBooleanTest">ReplaceTokenBooleanTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.029</td>
+<td>0.038</td>
</tr>
<tr valign="top" class="">
<td><a href="#PhingCallAdhocTest">PhingCallAdhocTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.052</td>
+<td>0.029</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -321,11 +370,126 @@
<th nowrap>Time(s)</th>
</tr>
<tr valign="top" class="">
+<td><a href="#TargetTest">TargetTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.173</td>
+</tr>
+<tr valign="top" class="">
<td><a href="#FileOutputStreamTest">FileOutputStreamTest</a></td>
<td>2</td>
<td>0</td>
<td>0</td>
-<td>0.009</td>
+<td>0.001</td>
+</tr>
+</table>
+<a href="#top">Back to top</a><p></p>
+<p></p>
+<a name="phing.system.io"></a><h3>Package phing.system.io</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th width="80%">Name</th>
+<th>Tests</th>
+<th>Errors</th>
+<th>Failures</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td><a href="#UnixFileSystemTest">UnixFileSystemTest</a></td>
+<td>1</td>
+<td>0</td>
+<td>0</td>
+<td>0.000</td>
+</tr>
+</table>
+<a href="#top">Back to top</a><p></p>
+<p></p>
+<a name="phing.tasks.ext"></a><h3>Package phing.tasks.ext</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th width="80%">Name</th>
+<th>Tests</th>
+<th>Errors</th>
+<th>Failures</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitCheckoutTaskTest">GitCheckoutTaskTest</a></td>
+<td>8</td>
+<td>0</td>
+<td>0</td>
+<td>3.872</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitBaseTest">GitBaseTest</a></td>
+<td>3</td>
+<td>0</td>
+<td>0</td>
+<td>0.037</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitFetchTaskTest">GitFetchTaskTest</a></td>
+<td>5</td>
+<td>0</td>
+<td>0</td>
+<td>2.328</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitBranchTaskTest">GitBranchTaskTest</a></td>
+<td>12</td>
+<td>0</td>
+<td>0</td>
+<td>5.008</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitPushTaskTest">GitPushTaskTest</a></td>
+<td>8</td>
+<td>0</td>
+<td>0</td>
+<td>27.047</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitMergeTaskTest">GitMergeTaskTest</a></td>
+<td>6</td>
+<td>0</td>
+<td>0</td>
+<td>1.996</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitGcTaskTest">GitGcTaskTest</a></td>
+<td>6</td>
+<td>0</td>
+<td>0</td>
+<td>2.631</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitInitTaskTest">GitInitTaskTest</a></td>
+<td>4</td>
+<td>0</td>
+<td>0</td>
+<td>0.069</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitPullTaskTest">GitPullTaskTest</a></td>
+<td>9</td>
+<td>0</td>
+<td>0</td>
+<td>2.542</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#GitCloneTaskTest">GitCloneTaskTest</a></td>
+<td>6</td>
+<td>0</td>
+<td>0</td>
+<td>1.026</td>
+</tr>
+<tr valign="top" class="">
+<td><a href="#UpToDateTaskTest">UpToDateTaskTest</a></td>
+<td>2</td>
+<td>0</td>
+<td>0</td>
+<td>0.054</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -344,28 +508,28 @@
<td>6</td>
<td>0</td>
<td>0</td>
-<td>0.169</td>
+<td>0.087</td>
</tr>
<tr valign="top" class="">
<td><a href="#ImportTaskTest">ImportTaskTest</a></td>
<td>5</td>
<td>0</td>
<td>0</td>
-<td>0.214</td>
+<td>0.075</td>
</tr>
<tr valign="top" class="">
<td><a href="#TypedefTaskTest">TypedefTaskTest</a></td>
<td>6</td>
<td>0</td>
<td>0</td>
-<td>0.192</td>
+<td>0.061</td>
</tr>
<tr valign="top" class="">
<td><a href="#TaskdefTaskTest">TaskdefTaskTest</a></td>
<td>6</td>
<td>0</td>
<td>0</td>
-<td>0.221</td>
+<td>0.060</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -384,14 +548,14 @@
<td>2</td>
<td>0</td>
<td>0</td>
-<td>0.003</td>
+<td>0.002</td>
</tr>
<tr valign="top" class="">
<td><a href="#ContainsConditionTest">ContainsConditionTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.002</td>
+<td>0.000</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
@@ -410,27 +574,43 @@
<td>3</td>
<td>0</td>
<td>0</td>
-<td>0.532</td>
+<td>0.210</td>
</tr>
<tr valign="top" class="">
<td><a href="#FileSetTest">FileSetTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.013</td>
+<td>0.002</td>
</tr>
<tr valign="top" class="">
<td><a href="#CommandlineTest">CommandlineTest</a></td>
<td>1</td>
<td>0</td>
<td>0</td>
-<td>0.004</td>
+<td>0.001</td>
</tr>
</table>
<a href="#top">Back to top</a><p></p>
<p></p>
<hr size="1" width="95%" align="left">
-<a name="CommandlineTest"></a><h3>TestCase CommandlineTest</h3>
+<a name="AdhocTaskdefTaskTest"></a><h3>TestCase AdhocTaskdefTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testPhingCallTask</td>
+<td>Success</td>
+<td></td>
+<td>0.030</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="CommandlineTest"></a><h3>TestCase CommandlineTest</h3>
<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
<tr valign="top">
<th>Name</th>
@@ -442,7 +622,7 @@
<td>testTranslateCommandline</td>
<td>Success</td>
<td></td>
-<td>0.004</td>
+<td>0.001</td>
</tr>
</table>
<p></p>
@@ -458,7 +638,23 @@
<td>testCaseSensitive</td>
<td>Success</td>
<td></td>
-<td>0.002</td>
+<td>0.000</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="CopyMoveNoExceptionTest"></a><h3>TestCase CopyMoveNoExceptionTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testPhingCallTask</td>
+<td>Success</td>
+<td></td>
+<td>0.026</td>
</tr>
</table>
<p></p>
@@ -474,7 +670,7 @@
<td>testCopyTask</td>
<td>Success</td>
<td></td>
-<td>0.043</td>
+<td>0.027</td>
</tr>
</table>
<p></p>
@@ -490,7 +686,7 @@
<td>testCustomTask</td>
<td>Success</td>
<td></td>
-<td>0.089</td>
+<td>0.062</td>
</tr>
</table>
<p></p>
@@ -512,7 +708,7 @@
<td>testCaseSensitive</td>
<td>Success</td>
<td></td>
-<td>0.001</td>
+<td>0.000</td>
</tr>
</table>
<p></p>
@@ -528,7 +724,7 @@
<td>testZipTask</td>
<td>Success</td>
<td></td>
-<td>0.128</td>
+<td>0.290</td>
</tr>
</table>
<p></p>
@@ -544,13 +740,13 @@
<td>testWrite</td>
<td>Success</td>
<td></td>
-<td>0.003</td>
+<td>0.001</td>
</tr>
<tr valign="top" class="">
<td>testFlush</td>
<td>Success</td>
<td></td>
-<td>0.005</td>
+<td>0.001</td>
</tr>
</table>
<p></p>
@@ -566,7 +762,7 @@
<td>testEmptyElementIfIsReference</td>
<td>Success</td>
<td></td>
-<td>0.013</td>
+<td>0.002</td>
</tr>
</table>
<p></p>
@@ -582,7 +778,509 @@
<td>testCustomTask</td>
<td>Success</td>
<td></td>
-<td>0.070</td>
+<td>0.066</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitBaseTest"></a><h3>TestCase GitBaseTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testInitialization</td>
+<td>Success</td>
+<td></td>
+<td>0.024</td>
+</tr>
+<tr valign="top" class="">
+<td>testArguments</td>
+<td>Success</td>
+<td></td>
+<td>0.007</td>
+</tr>
+<tr valign="top" class="">
+<td>testMutators</td>
+<td>Success</td>
+<td></td>
+<td>0.005</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitBranchTaskTest"></a><h3>TestCase GitBranchTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.485</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.015</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoBranchnameSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.012</td>
+</tr>
+<tr valign="top" class="">
+<td>testTrackParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.476</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoTrackParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.479</td>
+</tr>
+<tr valign="top" class="">
+<td>testSetUpstreamParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.491</td>
+</tr>
+<tr valign="top" class="">
+<td>testForceParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.486</td>
+</tr>
+<tr valign="top" class="">
+<td>testDeleteBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.514</td>
+</tr>
+<tr valign="top" class="">
+<td>testMoveBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.493</td>
+</tr>
+<tr valign="top" class="">
+<td>testForceMoveBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.585</td>
+</tr>
+<tr valign="top" class="">
+<td>testForceMoveBranchNoNewbranch</td>
+<td>Success</td>
+<td></td>
+<td>0.495</td>
+</tr>
+<tr valign="top" class="">
+<td>testMoveBranchNoNewbranch</td>
+<td>Success</td>
+<td></td>
+<td>0.477</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitCheckoutTaskTest"></a><h3>TestCase GitCheckoutTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testCheckoutExistingBranch</td>
+<td>Success</td>
+<td></td>
+<td>1.145</td>
+</tr>
+<tr valign="top" class="">
+<td>testCheckoutNonExistingBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.571</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.013</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoBranchnameSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.010</td>
+</tr>
+<tr valign="top" class="">
+<td>testCheckoutMerge</td>
+<td>Success</td>
+<td></td>
+<td>0.509</td>
+</tr>
+<tr valign="top" class="">
+<td>testCheckoutCreateBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.583</td>
+</tr>
+<tr valign="top" class="">
+<td>testForceCheckoutCreateBranch</td>
+<td>Success</td>
+<td></td>
+<td>0.496</td>
+</tr>
+<tr valign="top" class="">
+<td>testForceCheckoutCreateBranchFailed</td>
+<td>Success</td>
+<td></td>
+<td>0.545</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitCloneTaskTest"></a><h3>TestCase GitCloneTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testWrongRepository</td>
+<td>Success</td>
+<td></td>
+<td>0.037</td>
+</tr>
+<tr valign="top" class="">
+<td>testWrongTargetPath</td>
+<td>Success</td>
+<td></td>
+<td>0.012</td>
+</tr>
+<tr valign="top" class="">
+<td>testGitClone</td>
+<td>Success</td>
+<td></td>
+<td>0.478</td>
+</tr>
+<tr valign="top" class="">
+<td>testGitCloneBare</td>
+<td>Success</td>
+<td></td>
+<td>0.480</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.012</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoTargetPathSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.008</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitFetchTaskTest"></a><h3>TestCase GitFetchTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.812</td>
+</tr>
+<tr valign="top" class="">
+<td>testFetchAllRemotes</td>
+<td>Success</td>
+<td></td>
+<td>0.698</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.010</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoTargetSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.008</td>
+</tr>
+<tr valign="top" class="">
+<td>testRefspecSet</td>
+<td>Success</td>
+<td></td>
+<td>0.800</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitGcTaskTest"></a><h3>TestCase GitGcTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.489</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.012</td>
+</tr>
+<tr valign="top" class="">
+<td>testAutoParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.472</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoPruneParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.540</td>
+</tr>
+<tr valign="top" class="">
+<td>testAggressiveParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.563</td>
+</tr>
+<tr valign="top" class="">
+<td>testPruneParameter</td>
+<td>Success</td>
+<td></td>
+<td>0.555</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitInitTaskTest"></a><h3>TestCase GitInitTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testWrongRepository</td>
+<td>Success</td>
+<td></td>
+<td>0.020</td>
+</tr>
+<tr valign="top" class="">
+<td>testGitInit</td>
+<td>Success</td>
+<td></td>
+<td>0.017</td>
+</tr>
+<tr valign="top" class="">
+<td>testGitInitBare</td>
+<td>Success</td>
+<td></td>
+<td>0.021</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.011</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitMergeTaskTest"></a><h3>TestCase GitMergeTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.534</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoCommitSet</td>
+<td>Success</td>
+<td></td>
+<td>0.479</td>
+</tr>
+<tr valign="top" class="">
+<td>testRemoteSet</td>
+<td>Success</td>
+<td></td>
+<td>0.485</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.014</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRemotesSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.010</td>
+</tr>
+<tr valign="top" class="">
+<td>testWrongStrategySet</td>
+<td>Success</td>
+<td></td>
+<td>0.473</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitPullTaskTest"></a><h3>TestCase GitPullTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.026</td>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSetRebase</td>
+<td>Success</td>
+<td></td>
+<td>0.013</td>
+</tr>
+<tr valign="top" class="">
+<td>testAllReposSet</td>
+<td>Success</td>
+<td></td>
+<td>0.719</td>
+</tr>
+<tr valign="top" class="">
+<td>testTagsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.013</td>
+</tr>
+<tr valign="top" class="">
+<td>testAppendSet</td>
+<td>Success</td>
+<td></td>
+<td>0.812</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoTagsSet</td>
+<td>Success</td>
+<td></td>
+<td>0.014</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.009</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoSourceSpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.469</td>
+</tr>
+<tr valign="top" class="">
+<td>testWrongStrategySet</td>
+<td>Success</td>
+<td></td>
+<td>0.466</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="GitPushTaskTest"></a><h3>TestCase GitPushTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testAllParamsSet</td>
+<td>Success</td>
+<td></td>
+<td>5.366</td>
+</tr>
+<tr valign="top" class="">
+<td>testAllReposSet</td>
+<td>Success</td>
+<td></td>
+<td>3.893</td>
+</tr>
+<tr valign="top" class="">
+<td>testTagsSet</td>
+<td>Success</td>
+<td></td>
+<td>3.814</td>
+</tr>
+<tr valign="top" class="">
+<td>testDeleteSet</td>
+<td>Success</td>
+<td></td>
+<td>5.904</td>
+</tr>
+<tr valign="top" class="">
+<td>testMirrorSet</td>
+<td>Success</td>
+<td></td>
+<td>4.084</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoRepositorySpecified</td>
+<td>Success</td>
+<td></td>
+<td>0.013</td>
+</tr>
+<tr valign="top" class="">
+<td>testWrongRepo</td>
+<td>Success</td>
+<td></td>
+<td>1.941</td>
+</tr>
+<tr valign="top" class="">
+<td>testNoDestinationSpecified</td>
+<td>Success</td>
+<td></td>
+<td>2.034</td>
</tr>
</table>
<p></p>
@@ -598,7 +1296,7 @@
<td>testCopyTask</td>
<td>Success</td>
<td></td>
-<td>0.032</td>
+<td>0.035</td>
</tr>
</table>
<p></p>
@@ -614,31 +1312,31 @@
<td>testOverloadedTarget</td>
<td>Success</td>
<td></td>
-<td>0.044</td>
+<td>0.032</td>
</tr>
<tr valign="top" class="">
<td>testImportedTarget</td>
<td>Success</td>
<td></td>
-<td>0.042</td>
+<td>0.014</td>
</tr>
<tr valign="top" class="">
<td>testImported2Target</td>
<td>Success</td>
<td></td>
-<td>0.042</td>
+<td>0.010</td>
</tr>
<tr valign="top" class="">
<td>testCascadeTarget</td>
<td>Success</td>
<td></td>
-<td>0.043</td>
+<td>0.009</td>
</tr>
<tr valign="top" class="">
<td>testFlipFlopTarget</td>
<td>Success</td>
<td></td>
-<td>0.043</td>
+<td>0.009</td>
</tr>
</table>
<p></p>
@@ -654,19 +1352,19 @@
<td>testAddText</td>
<td>Success</td>
<td></td>
-<td>0.003</td>
+<td>0.001</td>
</tr>
<tr valign="top" class="">
<td>testSupportsCharacters</td>
<td>Success</td>
<td></td>
-<td>0.002</td>
+<td>0.000</td>
</tr>
<tr valign="top" class="">
<td>testElementCreators</td>
<td>Success</td>
<td></td>
-<td>0.004</td>
+<td>0.001</td>
</tr>
</table>
<p></p>
@@ -682,7 +1380,7 @@
<td>testLineContains</td>
<td>Success</td>
<td></td>
-<td>0.053</td>
+<td>0.062</td>
</tr>
</table>
<p></p>
@@ -698,19 +1396,19 @@
<td>testEmptyElementIfIsReference</td>
<td>Success</td>
<td></td>
-<td>0.004</td>
+<td>0.001</td>
</tr>
<tr valign="top" class="">
<td>testCircularReferenceCheck</td>
<td>Success</td>
<td></td>
-<td>0.006</td>
+<td>0.001</td>
</tr>
<tr valign="top" class="">
<td>testCopyTaskWithTwoFilesets</td>
<td>Success</td>
<td></td>
-<td>0.521</td>
+<td>0.207</td>
</tr>
</table>
<p></p>
@@ -726,7 +1424,35 @@
<td>testPhingCallTask</td>
<td>Success</td>
<td></td>
-<td>0.040</td>
+<td>0.058</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="PearPkg2CompatibilityTest"></a><h3>TestCase PearPkg2CompatibilityTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testInactiveMaintainers</td>
+<td>Success</td>
+<td></td>
+<td>0.176</td>
+</tr>
+<tr valign="top" class="">
+<td>testActiveMaintainers</td>
+<td>Success</td>
+<td></td>
+<td>0.035</td>
+</tr>
+<tr valign="top" class="">
+<td>testNotSetMaintainers</td>
+<td>Success</td>
+<td></td>
+<td>0.031</td>
</tr>
</table>
<p></p>
@@ -742,7 +1468,7 @@
<td>testPhingCallTask</td>
<td>Success</td>
<td></td>
-<td>0.022</td>
+<td>0.055</td>
</tr>
</table>
<p></p>
@@ -758,7 +1484,23 @@
<td>testPhingCallTask</td>
<td>Success</td>
<td></td>
-<td>0.052</td>
+<td>0.029</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="PhpLintFlagTest"></a><h3>TestCase PhpLintFlagTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testPhpLintTask</td>
+<td>Success</td>
+<td></td>
+<td>0.138</td>
</tr>
</table>
<p></p>
@@ -774,7 +1516,23 @@
<td>testPhingCallTask</td>
<td>Success</td>
<td></td>
-<td>0.212</td>
+<td>0.171</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="PropertyCommentsTest"></a><h3>TestCase PropertyCommentsTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testPhingCallTask</td>
+<td>Success</td>
+<td></td>
+<td>0.032</td>
</tr>
</table>
<p></p>
@@ -790,37 +1548,37 @@
<td>test1</td>
<td>Success</td>
<td></td>
-<td>0.027</td>
+<td>0.021</td>
</tr>
<tr valign="top" class="">
<td>test2</td>
<td>Success</td>
<td></td>
-<td>0.030</td>
+<td>0.013</td>
</tr>
<tr valign="top" class="">
<td>test3</td>
<td>Success</td>
<td></td>
-<td>0.029</td>
+<td>0.033</td>
</tr>
<tr valign="top" class="">
<td>test4</td>
<td>Success</td>
<td></td>
-<td>0.029</td>
+<td>0.007</td>
</tr>
<tr valign="top" class="">
<td>testPrefixSuccess</td>
<td>Success</td>
<td></td>
-<td>0.028</td>
+<td>0.007</td>
</tr>
<tr valign="top" class="">
<td>testPrefixFailure</td>
<td>Success</td>
<td></td>
-<td>0.028</td>
+<td>0.007</td>
</tr>
</table>
<p></p>
@@ -836,7 +1594,7 @@
<td>testCopyTask</td>
<td>Success</td>
<td></td>
-<td>0.026</td>
+<td>0.038</td>
</tr>
</table>
<p></p>
@@ -852,7 +1610,23 @@
<td>testCustomTask</td>
<td>Success</td>
<td></td>
-<td>0.029</td>
+<td>0.038</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="TargetTest"></a><h3>TestCase TargetTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testHiddenTargets</td>
+<td>Success</td>
+<td></td>
+<td>0.173</td>
</tr>
</table>
<p></p>
@@ -868,7 +1642,7 @@
<td>test1</td>
<td>Success</td>
<td></td>
-<td>0.547</td>
+<td>0.173</td>
</tr>
</table>
<p></p>
@@ -884,37 +1658,37 @@
<td>testEmpty</td>
<td>Success</td>
<td></td>
-<td>0.040</td>
+<td>0.015</td>
</tr>
<tr valign="top" class="">
<td>testNoName</td>
<td>Success</td>
<td></td>
-<td>0.036</td>
+<td>0.011</td>
</tr>
<tr valign="top" class="">
<td>testNoClassname</td>
<td>Success</td>
<td></td>
-<td>0.036</td>
+<td>0.009</td>
</tr>
<tr valign="top" class="">
<td>testClassNotFound</td>
<td>Success</td>
<td></td>
-<td>0.037</td>
+<td>0.008</td>
</tr>
<tr valign="top" class="">
<td>testGlobal</td>
<td>Success</td>
<td></td>
-<td>0.035</td>
+<td>0.008</td>
</tr>
<tr valign="top" class="">
<td>testLocal</td>
<td>Success</td>
<td></td>
-<td>0.037</td>
+<td>0.008</td>
</tr>
</table>
<p></p>
@@ -930,43 +1704,81 @@
<td>testEmpty</td>
<td>Success</td>
<td></td>
-<td>0.034</td>
+<td>0.019</td>
</tr>
<tr valign="top" class="">
<td>testNoName</td>
<td>Success</td>
<td></td>
-<td>0.032</td>
+<td>0.010</td>
</tr>
<tr valign="top" class="">
<td>testNoClassname</td>
<td>Success</td>
<td></td>
-<td>0.031</td>
+<td>0.008</td>
</tr>
<tr valign="top" class="">
<td>testClassNotFound</td>
<td>Success</td>
<td></td>
-<td>0.033</td>
+<td>0.008</td>
</tr>
<tr valign="top" class="">
<td>testGlobal</td>
<td>Success</td>
<td></td>
-<td>0.030</td>
+<td>0.007</td>
</tr>
<tr valign="top" class="">
<td>testLocal</td>
<td>Success</td>
<td></td>
-<td>0.032</td>
+<td>0.007</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="UnixFileSystemTest"></a><h3>TestCase UnixFileSystemTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testCompare</td>
+<td>Success</td>
+<td></td>
+<td>0.000</td>
+</tr>
+</table>
+<p></p>
+<a href="#top">Back to top</a><a name="UpToDateTaskTest"></a><h3>TestCase UpToDateTaskTest</h3>
+<table class="details" border="0" cellpadding="5" cellspacing="2" width="95%">
+<tr valign="top">
+<th>Name</th>
+<th>Status</th>
+<th width="80%">Type</th>
+<th nowrap>Time(s)</th>
+</tr>
+<tr valign="top" class="">
+<td>testOverrideNoPropertySet</td>
+<td>Success</td>
+<td></td>
+<td>0.042</td>
+</tr>
+<tr valign="top" class="">
+<td>testOverridePropertySet</td>
+<td>Success</td>
+<td></td>
+<td>0.012</td>
</tr>
</table>
<p></p>
<a href="#top">Back to top</a><table width="100%">
<tr><td><hr noshade size="1"></td></tr>
-<tr><td class="small">Report generated at 2010-05-14T16:53:01+02:00</td></tr>
+<tr><td class="small">Report generated at 2011-01-24T16:27:13+01:00</td></tr>
</table>
</body>
</html>
diff --git a/test/reports/test-results.xml b/test/reports/test-results.xml
index 383ac35..2d7d408 100644
--- a/test/reports/test-results.xml
+++ b/test/reports/test-results.xml
@@ -1,102 +1,216 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
- <testsuite name="Phing Batchtest" tests="49" assertions="60" failures="0" errors="0" time="2.710632">
- <testsuite name="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" fullPackage="phing.tasks.system.condition" package="phing.tasks.system.condition" tests="2" assertions="5" failures="0" errors="0" time="0.002885">
- <testcase name="testTrim" class="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" line="36" assertions="3" time="0.001482"/>
- <testcase name="testCaseSensitive" class="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" line="49" assertions="2" time="0.001403"/>
- </testsuite>
- <testsuite name="ContainsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/ContainsConditionTest.php" fullPackage="phing.tasks.system.condition" package="phing.tasks.system.condition" tests="1" assertions="2" failures="0" errors="0" time="0.001670">
- <testcase name="testCaseSensitive" class="ContainsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/ContainsConditionTest.php" line="36" assertions="2" time="0.001670"/>
- </testsuite>
- <testsuite name="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="5" failures="0" errors="0" time="0.169018">
- <testcase name="test1" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="37" assertions="2" time="0.026543"/>
- <testcase name="test2" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="42" assertions="0" time="0.029920"/>
- <testcase name="test3" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="46" assertions="1" time="0.028781"/>
- <testcase name="test4" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="57" assertions="0" time="0.028592"/>
- <testcase name="testPrefixSuccess" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="61" assertions="1" time="0.027568"/>
- <testcase name="testPrefixFailure" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="67" assertions="1" time="0.027614"/>
- </testsuite>
- <testsuite name="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="5" assertions="0" failures="0" errors="0" time="0.213852">
- <testcase name="testOverloadedTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="35" assertions="0" time="0.043766"/>
- <testcase name="testImportedTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="40" assertions="0" time="0.042149"/>
- <testcase name="testImported2Target" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="46" assertions="0" time="0.042363"/>
- <testcase name="testCascadeTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="51" assertions="0" time="0.042760"/>
- <testcase name="testFlipFlopTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="58" assertions="0" time="0.042814"/>
- </testsuite>
- <testsuite name="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="6" failures="0" errors="0" time="0.192176">
- <testcase name="testEmpty" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="36" assertions="0" time="0.034145"/>
- <testcase name="testNoName" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="40" assertions="0" time="0.031561"/>
- <testcase name="testNoClassname" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="44" assertions="0" time="0.031305"/>
- <testcase name="testClassNotFound" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="48" assertions="0" time="0.032951"/>
- <testcase name="testGlobal" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="57" assertions="3" time="0.030397"/>
- <testcase name="testLocal" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="65" assertions="3" time="0.031817"/>
- </testsuite>
- <testsuite name="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="6" failures="0" errors="0" time="0.221301">
- <testcase name="testEmpty" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="34" assertions="0" time="0.039740"/>
- <testcase name="testNoName" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="38" assertions="0" time="0.035851"/>
- <testcase name="testNoClassname" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="42" assertions="0" time="0.035797"/>
- <testcase name="testClassNotFound" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="46" assertions="0" time="0.037258"/>
- <testcase name="testGlobal" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="54" assertions="3" time="0.035266"/>
- <testcase name="testLocal" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="62" assertions="3" time="0.037389"/>
- </testsuite>
- <testsuite name="PhpUnit34Test" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhpUnit34Test.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.211742">
- <testcase name="testPhingCallTask" class="PhpUnit34Test" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhpUnit34Test.php" line="37" assertions="1" time="0.211742"/>
- </testsuite>
- <testsuite name="PearStyleNamingTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearStyleNamingTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.022158">
- <testcase name="testPhingCallTask" class="PearStyleNamingTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearStyleNamingTest.php" line="37" assertions="0" time="0.022158"/>
- </testsuite>
- <testsuite name="RecursivePropertyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/RecursivePropertyTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.025612">
- <testcase name="testCopyTask" class="RecursivePropertyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/RecursivePropertyTest.php" line="37" assertions="1" time="0.025612"/>
- </testsuite>
- <testsuite name="MoveReplaceRegexpTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/MoveReplaceRegexpTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.040107">
- <testcase name="testPhingCallTask" class="MoveReplaceRegexpTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/MoveReplaceRegexpTest.php" line="37" assertions="1" time="0.040107"/>
- </testsuite>
- <testsuite name="ExcludeZipTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ExcludeZipTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.128055">
- <testcase name="testZipTask" class="ExcludeZipTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ExcludeZipTest.php" line="37" assertions="0" time="0.128055"/>
- </testsuite>
- <testsuite name="CustomTaskFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CustomTaskFileSetTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.089460">
- <testcase name="testCustomTask" class="CustomTaskFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CustomTaskFileSetTest.php" line="37" assertions="0" time="0.089460"/>
- </testsuite>
- <testsuite name="HtmlEntitiesTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/HtmlEntitiesTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.031509">
- <testcase name="testCopyTask" class="HtmlEntitiesTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/HtmlEntitiesTest.php" line="37" assertions="0" time="0.031509"/>
- </testsuite>
- <testsuite name="ForeachFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ForeachFileSetTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.070114">
- <testcase name="testCustomTask" class="ForeachFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ForeachFileSetTest.php" line="37" assertions="0" time="0.070114"/>
- </testsuite>
- <testsuite name="CopyTaskFileListTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyTaskFileListTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.042906">
- <testcase name="testCopyTask" class="CopyTaskFileListTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyTaskFileListTest.php" line="37" assertions="0" time="0.042906"/>
- </testsuite>
- <testsuite name="ReplaceTokenBooleanTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ReplaceTokenBooleanTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.029108">
- <testcase name="testCustomTask" class="ReplaceTokenBooleanTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ReplaceTokenBooleanTest.php" line="37" assertions="0" time="0.029108"/>
- </testsuite>
- <testsuite name="PhingCallAdhocTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhingCallAdhocTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.051865">
- <testcase name="testPhingCallTask" class="PhingCallAdhocTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhingCallAdhocTest.php" line="37" assertions="0" time="0.051865"/>
- </testsuite>
- <testsuite name="LineContainsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/filters/LineContainsTest.php" fullPackage="phing.filters" package="phing.filters" tests="1" assertions="1" failures="0" errors="0" time="0.052957">
- <testcase name="testLineContains" class="LineContainsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/filters/LineContainsTest.php" line="43" assertions="1" time="0.052957"/>
- </testsuite>
- <testsuite name="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" fullPackage="phing" package="phing" tests="3" assertions="3" failures="0" errors="0" time="0.009064">
- <testcase name="testAddText" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="47" assertions="0" time="0.003470"/>
- <testcase name="testSupportsCharacters" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="59" assertions="2" time="0.001909"/>
- <testcase name="testElementCreators" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="66" assertions="1" time="0.003685"/>
- </testsuite>
- <testsuite name="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" fullPackage="phing.types" package="phing.types" tests="3" assertions="9" failures="0" errors="0" time="0.531537">
- <testcase name="testEmptyElementIfIsReference" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="45" assertions="4" time="0.004287"/>
- <testcase name="testCircularReferenceCheck" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="82" assertions="5" time="0.006198"/>
- <testcase name="testCopyTaskWithTwoFilesets" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="132" assertions="0" time="0.521052"/>
- </testsuite>
- <testsuite name="TaskdefForCopyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" fullPackage="phing.mappers" package="phing.mappers" tests="1" assertions="0" failures="0" errors="0" time="0.547343">
- <testcase name="test1" class="TaskdefForCopyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="160" assertions="0" time="0.547343"/>
- </testsuite>
- <testsuite name="FileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/FileSetTest.php" fullPackage="phing.types" package="phing.types" tests="1" assertions="13" failures="0" errors="0" time="0.013150">
- <testcase name="testEmptyElementIfIsReference" class="FileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/FileSetTest.php" line="49" assertions="13" time="0.013150"/>
- </testsuite>
- <testsuite name="CommandlineTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/CommandlineTest.php" fullPackage="phing.types" package="phing.types" tests="1" assertions="4" failures="0" errors="0" time="0.004468">
- <testcase name="testTranslateCommandline" class="CommandlineTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/CommandlineTest.php" line="45" assertions="4" time="0.004468"/>
- </testsuite>
- <testsuite name="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" fullPackage="phing.system" package="phing.system" tests="2" assertions="3" failures="0" errors="0" time="0.008573">
- <testcase name="testWrite" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="55" assertions="3" time="0.003137"/>
- <testcase name="testFlush" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="79" assertions="0" time="0.005436"/>
+ <testsuite name="Phing Batchtest" tests="127" assertions="86" failures="0" errors="0" time="48.855301">
+ <testsuite name="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" fullPackage="phing.tasks.system.condition" package="phing.tasks.system.condition" tests="2" assertions="5" failures="0" errors="0" time="0.001726">
+ <testcase name="testTrim" class="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" line="36" assertions="3" time="0.001418"/>
+ <testcase name="testCaseSensitive" class="EqualsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/EqualsConditionTest.php" line="49" assertions="2" time="0.000308"/>
+ </testsuite>
+ <testsuite name="ContainsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/ContainsConditionTest.php" fullPackage="phing.tasks.system.condition" package="phing.tasks.system.condition" tests="1" assertions="2" failures="0" errors="0" time="0.000302">
+ <testcase name="testCaseSensitive" class="ContainsConditionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/condition/ContainsConditionTest.php" line="36" assertions="2" time="0.000302"/>
+ </testsuite>
+ <testsuite name="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="8" assertions="0" failures="0" errors="0" time="3.871913">
+ <testcase name="testCheckoutExistingBranch" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="51" assertions="0" time="1.144656"/>
+ <testcase name="testCheckoutNonExistingBranch" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="63" assertions="0" time="0.570549"/>
+ <testcase name="testNoRepositorySpecified" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="70" assertions="0" time="0.013011"/>
+ <testcase name="testNoBranchnameSpecified" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="77" assertions="0" time="0.010496"/>
+ <testcase name="testCheckoutMerge" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="84" assertions="0" time="0.508891"/>
+ <testcase name="testCheckoutCreateBranch" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="93" assertions="0" time="0.583249"/>
+ <testcase name="testForceCheckoutCreateBranch" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="102" assertions="0" time="0.496305"/>
+ <testcase name="testForceCheckoutCreateBranchFailed" class="GitCheckoutTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php" line="110" assertions="0" time="0.544756"/>
+ </testsuite>
+ <testsuite name="GitBaseTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="3" assertions="6" failures="0" errors="0" time="0.036698">
+ <testcase name="testInitialization" class="GitBaseTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php" line="40" assertions="2" time="0.023877"/>
+ <testcase name="testArguments" class="GitBaseTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php" line="48" assertions="1" time="0.007342"/>
+ <testcase name="testMutators" class="GitBaseTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php" line="51" assertions="3" time="0.005479"/>
+ </testsuite>
+ <testsuite name="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="5" assertions="0" failures="0" errors="0" time="2.328471">
+ <testcase name="testAllParamsSet" class="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" line="51" assertions="0" time="0.812476"/>
+ <testcase name="testFetchAllRemotes" class="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" line="59" assertions="0" time="0.697546"/>
+ <testcase name="testNoRepositorySpecified" class="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" line="67" assertions="0" time="0.010471"/>
+ <testcase name="testNoTargetSpecified" class="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" line="74" assertions="0" time="0.007938"/>
+ <testcase name="testRefspecSet" class="GitFetchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php" line="81" assertions="0" time="0.800040"/>
+ </testsuite>
+ <testsuite name="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="12" assertions="0" failures="0" errors="0" time="5.008188">
+ <testcase name="testAllParamsSet" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="51" assertions="0" time="0.484672"/>
+ <testcase name="testNoRepositorySpecified" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="58" assertions="0" time="0.015332"/>
+ <testcase name="testNoBranchnameSpecified" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="65" assertions="0" time="0.011788"/>
+ <testcase name="testTrackParameter" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="72" assertions="0" time="0.475829"/>
+ <testcase name="testNoTrackParameter" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="81" assertions="0" time="0.479105"/>
+ <testcase name="testSetUpstreamParameter" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="90" assertions="0" time="0.491022"/>
+ <testcase name="testForceParameter" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="99" assertions="0" time="0.485886"/>
+ <testcase name="testDeleteBranch" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="108" assertions="0" time="0.514414"/>
+ <testcase name="testMoveBranch" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="120" assertions="0" time="0.493001"/>
+ <testcase name="testForceMoveBranch" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="130" assertions="0" time="0.584641"/>
+ <testcase name="testForceMoveBranchNoNewbranch" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="140" assertions="0" time="0.495240"/>
+ <testcase name="testMoveBranchNoNewbranch" class="GitBranchTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php" line="149" assertions="0" time="0.477258"/>
+ </testsuite>
+ <testsuite name="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="8" assertions="0" failures="0" errors="0" time="27.047199">
+ <testcase name="testAllParamsSet" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="51" assertions="0" time="5.365743"/>
+ <testcase name="testAllReposSet" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="59" assertions="0" time="3.892860"/>
+ <testcase name="testTagsSet" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="67" assertions="0" time="3.813634"/>
+ <testcase name="testDeleteSet" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="75" assertions="0" time="5.903767"/>
+ <testcase name="testMirrorSet" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="84" assertions="0" time="4.083853"/>
+ <testcase name="testNoRepositorySpecified" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="92" assertions="0" time="0.012654"/>
+ <testcase name="testWrongRepo" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="99" assertions="0" time="1.940981"/>
+ <testcase name="testNoDestinationSpecified" class="GitPushTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php" line="106" assertions="0" time="2.033707"/>
+ </testsuite>
+ <testsuite name="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="6" assertions="0" failures="0" errors="0" time="1.995643">
+ <testcase name="testAllParamsSet" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="51" assertions="0" time="0.534250"/>
+ <testcase name="testNoCommitSet" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="59" assertions="0" time="0.479441"/>
+ <testcase name="testRemoteSet" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="67" assertions="0" time="0.484826"/>
+ <testcase name="testNoRepositorySpecified" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="75" assertions="0" time="0.014308"/>
+ <testcase name="testNoRemotesSpecified" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="82" assertions="0" time="0.009684"/>
+ <testcase name="testWrongStrategySet" class="GitMergeTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php" line="89" assertions="0" time="0.473134"/>
+ </testsuite>
+ <testsuite name="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="6" assertions="0" failures="0" errors="0" time="2.630938">
+ <testcase name="testAllParamsSet" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="51" assertions="0" time="0.488514"/>
+ <testcase name="testNoRepositorySpecified" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="58" assertions="0" time="0.012202"/>
+ <testcase name="testAutoParameter" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="65" assertions="0" time="0.472394"/>
+ <testcase name="testNoPruneParameter" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="74" assertions="0" time="0.540031"/>
+ <testcase name="testAggressiveParameter" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="83" assertions="0" time="0.562678"/>
+ <testcase name="testPruneParameter" class="GitGcTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php" line="92" assertions="0" time="0.555119"/>
+ </testsuite>
+ <testsuite name="GitInitTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="4" assertions="7" failures="0" errors="0" time="0.069171">
+ <testcase name="testWrongRepository" class="GitInitTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php" line="46" assertions="0" time="0.020277"/>
+ <testcase name="testGitInit" class="GitInitTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php" line="53" assertions="2" time="0.017444"/>
+ <testcase name="testGitInitBare" class="GitInitTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php" line="64" assertions="5" time="0.020731"/>
+ <testcase name="testNoRepositorySpecified" class="GitInitTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php" line="77" assertions="0" time="0.010719"/>
+ </testsuite>
+ <testsuite name="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="9" assertions="0" failures="0" errors="0" time="2.541696">
+ <testcase name="testAllParamsSet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="51" assertions="0" time="0.026164"/>
+ <testcase name="testAllParamsSetRebase" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="62" assertions="0" time="0.013250"/>
+ <testcase name="testAllReposSet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="74" assertions="0" time="0.718945"/>
+ <testcase name="testTagsSet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="82" assertions="0" time="0.013313"/>
+ <testcase name="testAppendSet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="93" assertions="0" time="0.812057"/>
+ <testcase name="testNoTagsSet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="102" assertions="0" time="0.013909"/>
+ <testcase name="testNoRepositorySpecified" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="113" assertions="0" time="0.009295"/>
+ <testcase name="testNoSourceSpecified" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="120" assertions="0" time="0.469025"/>
+ <testcase name="testWrongStrategySet" class="GitPullTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php" line="127" assertions="0" time="0.465738"/>
+ </testsuite>
+ <testsuite name="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="6" assertions="8" failures="0" errors="0" time="1.026446">
+ <testcase name="testWrongRepository" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="46" assertions="0" time="0.036847"/>
+ <testcase name="testWrongTargetPath" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="53" assertions="0" time="0.011810"/>
+ <testcase name="testGitClone" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="60" assertions="3" time="0.477582"/>
+ <testcase name="testGitCloneBare" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="73" assertions="5" time="0.480176"/>
+ <testcase name="testNoRepositorySpecified" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="86" assertions="0" time="0.011641"/>
+ <testcase name="testNoTargetPathSpecified" class="GitCloneTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php" line="93" assertions="0" time="0.008390"/>
+ </testsuite>
+ <testsuite name="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="5" failures="0" errors="0" time="0.087039">
+ <testcase name="test1" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="37" assertions="2" time="0.020963"/>
+ <testcase name="test2" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="42" assertions="0" time="0.012630"/>
+ <testcase name="test3" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="46" assertions="1" time="0.032509"/>
+ <testcase name="test4" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="57" assertions="0" time="0.007438"/>
+ <testcase name="testPrefixSuccess" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="61" assertions="1" time="0.006794"/>
+ <testcase name="testPrefixFailure" class="PropertyTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/PropertyTaskTest.php" line="67" assertions="1" time="0.006705"/>
+ </testsuite>
+ <testsuite name="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="5" assertions="0" failures="0" errors="0" time="0.074818">
+ <testcase name="testOverloadedTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="35" assertions="0" time="0.031781"/>
+ <testcase name="testImportedTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="42" assertions="0" time="0.014043"/>
+ <testcase name="testImported2Target" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="51" assertions="0" time="0.010049"/>
+ <testcase name="testCascadeTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="58" assertions="0" time="0.009461"/>
+ <testcase name="testFlipFlopTarget" class="ImportTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/ImportTaskTest.php" line="68" assertions="0" time="0.009484"/>
+ </testsuite>
+ <testsuite name="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="5" failures="0" errors="0" time="0.060560">
+ <testcase name="testEmpty" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="36" assertions="0" time="0.019307"/>
+ <testcase name="testNoName" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="40" assertions="0" time="0.010448"/>
+ <testcase name="testNoClassname" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="44" assertions="0" time="0.007987"/>
+ <testcase name="testClassNotFound" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="51" assertions="1" time="0.007907"/>
+ <testcase name="testGlobal" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="60" assertions="2" time="0.007473"/>
+ <testcase name="testLocal" class="TypedefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TypedefTaskTest.php" line="68" assertions="2" time="0.007438"/>
+ </testsuite>
+ <testsuite name="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" fullPackage="phing.tasks.system" package="phing.tasks.system" tests="6" assertions="5" failures="0" errors="0" time="0.060438">
+ <testcase name="testEmpty" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="34" assertions="0" time="0.015415"/>
+ <testcase name="testNoName" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="38" assertions="0" time="0.010823"/>
+ <testcase name="testNoClassname" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="42" assertions="0" time="0.009397"/>
+ <testcase name="testClassNotFound" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="49" assertions="1" time="0.008448"/>
+ <testcase name="testGlobal" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="57" assertions="2" time="0.007959"/>
+ <testcase name="testLocal" class="TaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/TaskdefTaskTest.php" line="65" assertions="2" time="0.008396"/>
+ </testsuite>
+ <testsuite name="UpToDateTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/system/UpToDateTaskTest.php" fullPackage="phing.tasks.ext" package="phing.tasks.ext" tests="2" assertions="0" failures="0" errors="0" time="0.053970">
+ <testcase name="testOverrideNoPropertySet" class="UpToDateTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/system/UpToDateTaskTest.php" line="41" assertions="0" time="0.042357"/>
+ <testcase name="testOverridePropertySet" class="UpToDateTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/tasks/system/UpToDateTaskTest.php" line="53" assertions="0" time="0.011613"/>
+ </testsuite>
+ <testsuite name="PearPkg2CompatibilityTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearPkg2CompatibilityTest.php" fullPackage="phing.regression" package="phing.regression" tests="3" assertions="3" failures="0" errors="0" time="0.242659">
+ <testcase name="testInactiveMaintainers" class="PearPkg2CompatibilityTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearPkg2CompatibilityTest.php" line="46" assertions="1" time="0.176047"/>
+ <testcase name="testActiveMaintainers" class="PearPkg2CompatibilityTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearPkg2CompatibilityTest.php" line="52" assertions="1" time="0.035420"/>
+ <testcase name="testNotSetMaintainers" class="PearPkg2CompatibilityTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearPkg2CompatibilityTest.php" line="58" assertions="1" time="0.031192"/>
+ </testsuite>
+ <testsuite name="PhpUnit34Test" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhpUnit34Test.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.171152">
+ <testcase name="testPhingCallTask" class="PhpUnit34Test" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhpUnit34Test.php" line="37" assertions="1" time="0.171152"/>
+ </testsuite>
+ <testsuite name="PearStyleNamingTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearStyleNamingTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.054823">
+ <testcase name="testPhingCallTask" class="PearStyleNamingTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PearStyleNamingTest.php" line="37" assertions="0" time="0.054823"/>
+ </testsuite>
+ <testsuite name="RecursivePropertyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/RecursivePropertyTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.037910">
+ <testcase name="testCopyTask" class="RecursivePropertyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/RecursivePropertyTest.php" line="42" assertions="1" time="0.037910"/>
+ </testsuite>
+ <testsuite name="MoveReplaceRegexpTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/MoveReplaceRegexpTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.057837">
+ <testcase name="testPhingCallTask" class="MoveReplaceRegexpTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/MoveReplaceRegexpTest.php" line="42" assertions="1" time="0.057837"/>
+ </testsuite>
+ <testsuite name="ExcludeZipTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ExcludeZipTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.289506">
+ <testcase name="testZipTask" class="ExcludeZipTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ExcludeZipTest.php" line="37" assertions="0" time="0.289506"/>
+ </testsuite>
+ <testsuite name="CustomTaskFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CustomTaskFileSetTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.061973">
+ <testcase name="testCustomTask" class="CustomTaskFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CustomTaskFileSetTest.php" line="37" assertions="0" time="0.061973"/>
+ </testsuite>
+ <testsuite name="HtmlEntitiesTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/HtmlEntitiesTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.035104">
+ <testcase name="testCopyTask" class="HtmlEntitiesTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/HtmlEntitiesTest.php" line="37" assertions="0" time="0.035104"/>
+ </testsuite>
+ <testsuite name="CopyMoveNoExceptionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyMoveNoExceptionTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.025689">
+ <testcase name="testPhingCallTask" class="CopyMoveNoExceptionTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyMoveNoExceptionTest.php" line="37" assertions="0" time="0.025689"/>
+ </testsuite>
+ <testsuite name="PhpLintFlagTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/590/PhpLintTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.137512">
+ <testcase name="testPhpLintTask" class="PhpLintFlagTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/590/PhpLintTest.php" line="37" assertions="0" time="0.137512"/>
+ </testsuite>
+ <testsuite name="PropertyCommentsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PropertyCommentsTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="1" failures="0" errors="0" time="0.031975">
+ <testcase name="testPhingCallTask" class="PropertyCommentsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PropertyCommentsTest.php" line="37" assertions="1" time="0.031975"/>
+ </testsuite>
+ <testsuite name="AdhocTaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/610/AdhocTaskdefTaskTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.029677">
+ <testcase name="testPhingCallTask" class="AdhocTaskdefTaskTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/610/AdhocTaskdefTaskTest.php" line="37" assertions="0" time="0.029677"/>
+ </testsuite>
+ <testsuite name="ForeachFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ForeachFileSetTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.066076">
+ <testcase name="testCustomTask" class="ForeachFileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ForeachFileSetTest.php" line="37" assertions="0" time="0.066076"/>
+ </testsuite>
+ <testsuite name="CopyTaskFileListTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyTaskFileListTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.027481">
+ <testcase name="testCopyTask" class="CopyTaskFileListTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/CopyTaskFileListTest.php" line="37" assertions="0" time="0.027481"/>
+ </testsuite>
+ <testsuite name="ReplaceTokenBooleanTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ReplaceTokenBooleanTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.037701">
+ <testcase name="testCustomTask" class="ReplaceTokenBooleanTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/ReplaceTokenBooleanTest.php" line="37" assertions="0" time="0.037701"/>
+ </testsuite>
+ <testsuite name="PhingCallAdhocTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhingCallAdhocTest.php" fullPackage="phing.regression" package="phing.regression" tests="1" assertions="0" failures="0" errors="0" time="0.029111">
+ <testcase name="testPhingCallTask" class="PhingCallAdhocTest" file="/home/druid/dev/phing/trunk/test/classes/phing/regression/PhingCallAdhocTest.php" line="37" assertions="0" time="0.029111"/>
+ </testsuite>
+ <testsuite name="LineContainsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/filters/LineContainsTest.php" fullPackage="phing.filters" package="phing.filters" tests="1" assertions="1" failures="0" errors="0" time="0.061687">
+ <testcase name="testLineContains" class="LineContainsTest" file="/home/druid/dev/phing/trunk/test/classes/phing/filters/LineContainsTest.php" line="43" assertions="1" time="0.061687"/>
+ </testsuite>
+ <testsuite name="TargetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/components/TargetTest.php" fullPackage="phing.system" package="phing.system" tests="1" assertions="2" failures="0" errors="0" time="0.172599">
+ <testcase name="testHiddenTargets" class="TargetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/components/TargetTest.php" line="38" assertions="2" time="0.172599"/>
+ </testsuite>
+ <testsuite name="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" fullPackage="phing" package="phing" tests="3" assertions="3" failures="0" errors="0" time="0.001939">
+ <testcase name="testAddText" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="47" assertions="0" time="0.000796"/>
+ <testcase name="testSupportsCharacters" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="59" assertions="2" time="0.000412"/>
+ <testcase name="testElementCreators" class="IntrospectionHelperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/IntrospectionHelperTest.php" line="66" assertions="1" time="0.000731"/>
+ </testsuite>
+ <testsuite name="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" fullPackage="phing.types" package="phing.types" tests="3" assertions="9" failures="0" errors="0" time="0.209606">
+ <testcase name="testEmptyElementIfIsReference" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="45" assertions="4" time="0.000860"/>
+ <testcase name="testCircularReferenceCheck" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="82" assertions="5" time="0.001295"/>
+ <testcase name="testCopyTaskWithTwoFilesets" class="MapperTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="132" assertions="0" time="0.207451"/>
+ </testsuite>
+ <testsuite name="TaskdefForCopyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" fullPackage="phing.mappers" package="phing.mappers" tests="1" assertions="0" failures="0" errors="0" time="0.173369">
+ <testcase name="test1" class="TaskdefForCopyTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/MapperTest.php" line="160" assertions="0" time="0.173369"/>
+ </testsuite>
+ <testsuite name="FileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/FileSetTest.php" fullPackage="phing.types" package="phing.types" tests="1" assertions="13" failures="0" errors="0" time="0.002173">
+ <testcase name="testEmptyElementIfIsReference" class="FileSetTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/FileSetTest.php" line="49" assertions="13" time="0.002173"/>
+ </testsuite>
+ <testsuite name="CommandlineTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/CommandlineTest.php" fullPackage="phing.types" package="phing.types" tests="1" assertions="4" failures="0" errors="0" time="0.000918">
+ <testcase name="testTranslateCommandline" class="CommandlineTest" file="/home/druid/dev/phing/trunk/test/classes/phing/types/CommandlineTest.php" line="45" assertions="4" time="0.000918"/>
+ </testsuite>
+ <testsuite name="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" fullPackage="phing.system" package="phing.system" tests="2" assertions="3" failures="0" errors="0" time="0.001206">
+ <testcase name="testWrite" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="56" assertions="3" time="0.000625"/>
+ <testcase name="testFlush" class="FileOutputStreamTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/FileOutputStreamTest.php" line="80" assertions="0" time="0.000581"/>
+ </testsuite>
+ <testsuite name="UnixFileSystemTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/io/UnixFileSystemTest.php" fullPackage="phing.system.io" package="phing.system.io" tests="1" assertions="1" failures="0" errors="0" time="0.000401">
+ <testcase name="testCompare" class="UnixFileSystemTest" file="/home/druid/dev/phing/trunk/test/classes/phing/system/io/UnixFileSystemTest.php" line="47" assertions="1" time="0.000401"/>
</testsuite>
</testsuite>
</testsuites>
--
Phing repository under the pkg-symfony Debian group
More information about the Pkg-symfony-commits
mailing list