I would like to programmatically check if a file is versioned, and add, delete and comm开发者_JAVA百科it files into a subversion repository using Delphi.
Does anyone have sample code that might help me create the necessary functions and procedures?
Thanks,
Steve
Delphi XE integration is open source (MPL based license). You can get the code at radstudioverins on SourceForge.
take a look at trunk/svn/SvnClient.pas, and let me know if it's what you're looking for. It is a nice looking wrapper around libsvn.
Probably the easiest way to do this is to call the svn
command line program, passing it the relevant commands and arguments to do whatever it is you want to do. Although there are probably Delphi-compatible Subversion API bindings, calling svn
is undoubtedly going to be more straightforward.
Most svn
command line commands have an --xml
switch that writes the output in program-friendly XML format, instead of making you rely on fragile text parsing.
The most recent version, Delphi XE has Subversion integration by default.
Use the Subversion library. That's what TortoiseSVN does.
精彩评论