About Adam

Adam Stout works in the technology field and is currently located in San Diego, CA.

Topics

Search

Connect

Recent Entries

ATOM Feed

Exporting SVN Change Log in Phing

Posted: Jul 17, 2010
Last night I was working on add a phpDocumentor task to a Phing build script I have been working on.  While Phing offers integration with phpDocumentor as well as some SVN task such as commuting, updating, and exporting, it doesn't have a native way to export the change log which I would like to include in the documentation.  However, one great feature of Phing is how easy it is to expand.  I wrote this little ad-hoc task to export the SVN history to a file which I then include in the documentation.

Here is the code if you'd like to add it to your build scripts:

<adhoc-task name="svnlog">
<!--[
CDATA[
class 
svnLog extends Task 
    private 
$file;
    private 
$svnpath;
    private 
$repositoryurl;
    
    function 
setFile($file) { 
        
$this->file $file
    }
    
    function 
setSvnPath($svnpath) { 
        
$this->svnpath $svnpath
    }
    
    function 
setRepositoryUrl($repositoryurl) { 
        
$this->repositoryurl $repositoryurl
    }
    
    private function 
writeSvnLog($svnpath="/usr/bin/svn"$repositoryurl$file){
        
$cmd $svnpath " log " $repositoryurl " > " $file;
        echo 
$cmd "\n";
        
system($cmd);
        return 
true;
    } 
    
    function 
main() { 
        
$this->writeSvnLog($svnpath $this->svnpath$repositoryurl $this->repositoryurl$file $this->file);
    } 
}
]]-->
</
adhoc-task>


Here is how you call it:
<svnlog svnpath="/usr/bin/svn" repositoryurl="http://rex/svn/${package}/" file="${workingDir}/CHANGELOG"></svnlog>

Comments:

Iccesally Lee @ Fri, Oct 31 - 4:16am

In the shops of diamond Houston, the people who are looking for gifts can easily go into a separate area to look for new ideas and this will definitely him in choosing the special gift for near and dear ones. There are many businessmen who are having variety of watches and it provides the possibility of drawing some text on certain piece. Where as, in some other occasions, jewelry stores keep regular business replica chanel hours. There are so many reasons are responsible for gucci replica going to a jewelry store in Houston. There are some other people who go into the shop with a particular reason in mind. One just needs to find out something for some louis vuitton replica reasons and for another person. --

Adam Stout @ Oct 15, 2013

So I'm still using Phing, but I'm thinking about switching to Maven, any thoughts?

Please log on to add your comments.
Previous
Next