Here is an example of
source code to interface Caché Studio Hooks to SubVersion
source control. It is based on public available ISC implementation for
Perforce. There is some configuration and loading work to be done and
also some minor translation (there are messages in portuguese). An
average COS programmer should be able to figure everything out from
the
source code, but let me know if you have any problems.
http://telesca.s3.amazonaws.com/SVN.xml
Simple script to get things going:
1. Import SVN.xml to any namespace you want source control (YOURNSP).
2. Activate source control hooks:
Management Portal->Configuration->Studio Source Control Class
Select YOURNSP
Select Studio.SourceControl.SVN
3. Setup ^Sources as follows:
(note: as namespace is present at the first global level, ^Sources can be mapped to a central location like %SYS)
Physical path to SVN client binaries:
^Sources("YOURNSP","Config","
BinaryDir")="\\whisdvm\webapl1\svnbin"
Virtual path to commit page (note: you can also commit from your SVN client):
^Sources("YOURNSP","Config","CommitPage")="/csp/yournsp/Studio.SourceControl.SVNCommit.cls"
SVN server authentication:
^Sources("YOURNSP","Config","SVNPwd")="cache"
^Sources("YOURNSP","Config","SVNUser")="cache"
Physical working copy root path (note: in fact it must be is a "public" working copy, shared to all Caché developers)
^Sources("YOURNSP","Config","WCopyRoot")="\\whisdvm\webapl1"
Routines/classes physical export path mappings:
^Sources("YOURNSP","Mappings","CLS","*")="\\whisdvm\webapl1\classes"
^Sources("YOURNSP","Mappings","MAC","*")="\\whisdvm\webapl1\routines\main"
^Sources("YOURNSP","Mappings","MAC","CUSTOM*")="\\whisdvm\webapl1\routines\custom"
4. Initial load of your routines/classes
Routines:
Set array("routine1.MAC")=""
Set array("routine2.MAC")=""
Do ##Class(Studio.SourceControl.SVN).AddItemsToSourceControl(.array)
Classes:
Do ##Class(Studio.SourceControl.SVN).AddPackagesToSourceControl("package1,package2")