Changeset 363 for branches

Show
Ignore:
Timestamp:
04/10/08 16:06:37 (8 months ago)
Author:
tiddy
Message:

now you can export a svn with a specified revision. revision="yourrevision"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3/classes/phing/tasks/ext/svn/SvnExportTask.php

    r325 r363  
    3535class SvnExportTask extends SvnBaseTask 
    3636{ 
    37         /** 
    38          * The main entry point 
    39          * 
    40          * @throws BuildException 
    41          */ 
    42         function main() 
    43         { 
    44                 $this->setup('export'); 
    45                  
    46                 $this->log("Exporting SVN repository to '" . $this->getToDir() . "'"); 
     37
     38    /** 
     39     * Which Revision to Export 
     40     *  
     41     * @todo check if version_control_svn supports constants 
     42     *  
     43     * @var string 
     44     */ 
     45    private $revision = 'HEAD'; 
    4746 
    48                 $this->run(array($this->getToDir())); 
    49         } 
     47    /** 
     48     * The main entry point 
     49     * 
     50     * @throws BuildException 
     51     */ 
     52    function main() 
     53    { 
     54        $this->setup('export'); 
     55         
     56        $this->log("Exporting SVN repository to '" . $this->getToDir() . "'"); 
     57 
     58        // revision 
     59        $switches = array( 
     60            'r' => $this->revision, 
     61        ); 
     62 
     63        $this->run(array($this->getToDir()), $switches); 
     64    } 
     65 
     66    public function setRevision($revision) 
     67    { 
     68        $this->revision = $revision; 
     69    } 
    5070}