SvnClasses

From Free Pascal wiki
Jump to: navigation, search

About

SvnClasses is a Lazarus package to help writing applications that interact with a Subversion (svn) repository. It requires an installed command line svn executable for accessing a svn repository and/or a working directory. I used these classes for writing a tool to mirror the Lazarus svn repository to Sourceforge.

Author

Vincent Snijders

License

LGPL with the linking exception, same as the LCL.

SVN

The package is available in Lazarus CCR SVN repository at https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/svn

Download

The latest stable release can be found on link to the lazarus-ccr sf download location.

Change Log

  • Version 0.1 2007-03-07

Dependencies / System Requirements

  • Requires fpc 2.1.1 or later, because of the use of TProcess enhancements.
  • Requires an svn executable on the path or in default location in windows.
  • Although this package can be used for command line applications, it depends on the LCL for some functions from the FileUtils class

Status

Status: Alpha

Issues

  • The ExecuteSvnCommand procedure doesn't capture the output on StdErr
  • The ExecuteSvnCommand procedure hasn't configurable verbosity

Installation

  • extract the zip file
  • open the svnpkg.pkg and compile the package.

Examples

For use see included unit tests.

  • open the test\fpcunitsvnpkg.lpi project and run it.

I have written these classes to support fpsvnsync, a tool similar to svnsync to mirror the lazarus svn repository to SourceForge. The svnsync tool doesn't work, because Sourceforge doesn't allow revision property changes.

See also

  • fpcup contains unified classes for subversion, git, and mercurial which may be an alternative. They are currently focussed on checkout/update operations but basic support has been added for committing.