dotSoftwaredotDevelopmentdotCustomersdotAbout us
PushOk logoblank
fast linksFast Links
news&eventsnews and events

2012-12-21 
Major update of SVN SCC plug-in - versions 1.7.2 are finaly released

2012-12-21 
Major update of SVNCOM version 1.7.2 are finaly released

Lightweight embedded Node.js database with MongoDB API.

SVNCOM

Search go
PushOk Logo blank
leftSVNCOMright

SVNCOM is a set of COM objects designed to provide subversion functionality for purposes of automatization without direct usage of sources or command line client. There are lot of reasons why usage of source codes directly can be not convenient. The main is necessity to spend much time for learning and requirement of specific knowledge (senior "C language" skills). Usage of command line client also cause lot of problems and the main are: problem with file names encoding and output parsing.

On Windows OS, COM binding will allow access to subversion almost from any place: .NET code, native Win32 code, vbs scripts (standalone, VB for applications, ASP etc). So you can use subversion in your programs and automatizations scripts easy.

SVNCOM bindings available in two packages: MSI installer with "SDK" (few vbs examples, svn help file and some api help) and MSM redistributive package. The MSM package will allow easy integration with your own installer. SVNCOM bindings can be freely redistributed, preserving both subversion (tigris) and PushOk Software copyright rights. Both licenses grant almost non limited usage in binary form. SVNCOM now is the part of Pushok SVNSCC Proxy (SCC API integration plug-in). This mostly means that binding have the commercial quality and will be maintained in the future. But in the same time SVNCOM project is an open source project and any contribution (including money donations) are welcome.

SVNCOM binding API is closely linked with SVN "C" api which is closely linked with SVN command line client functionality. Binding have two main object "SVNClient" and "SVNAdmin" which correspond to "svn.exe" and "svnadmin.exe" correspondingly. Few events are raised from client: cancellation ask (idle), working copy notifications and progress.

Typical usage of COM binding will look like this (vbs code):

  dim client
        ' create client
        set client = CreateObject("PushOkSvn.SVNClient")
        ' set any options (if any), for example user name and password
        client.SetOption SvnClientOptionDefUserName, "User"
        client.SetOption SvnClientOptionDefUserPassword, "Password"
        ' init client
        client.InitClient()
        ' use it, for example let's add some files into repository
        dim src
        set src = CreateObject("PushOkSvn.StringVector")
        src.Add("C:\some\path\here")
        client.Import src, "svn://some.svn.url/here", "Commit message"

All is enough easy, and only one thing requires specific explanation, this is sharing of authentication cache between two clients. This can be done through call to "SetupAuth" function. Lets see the example:

  set client1 = CreateObject("PushOkSvn.SVNClient")
        client.SetOption SvnClientOptionDefUserName, "User"
        client.SetOption SvnClientOptionDefUserPassword, "Password"
        set client2 = CreateObject("PushOkSvn.SVNClient")
        dim authcookie
        ' ask first client to setup new auth object and return its cookie
        set authcookie = client1.SetupAuth 0
        ' ask second client use the same auth as first one
        client2.SetupAuth authcookie

In the above example both clients will use the same authentication to access the repository. This make sense when you use interactive authentication and once authenticated like to share this between clients.

And finally some threading notice. Client marked as "free" apartment object and it is thread safe. More other it uses thread safe marshaller and each client accessing it in the same process will access functions directly without proxies. But in the same time, because of SVN limitations only one function can be executed at one time. So, if you need parallel processing you have to create and use several clients.


You are 9730375 visitor since 20 Jan 2003.
543 visitors today and 1 online right now.
blank left to top right blank

© Copyright by PushOk Software, 2003-2024, webmaster@pushok.com