Initial Release
Source Version Control plug-in for Caché Studio. Caché Git allows working with git-repos straight from Caché Studio.
Caché Git provides interface from Caché Studio to TortoiseGit. Caché Git supports one repository for each Caché namespace. User chooses files to include in version control.
Caché Studio before 2011.1 cannot work with executables that have space in its name (like “C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe”). In that case you should either install TortoiseGit in the folder without spaces or use newer version of Caché Studio. Caché Studio can work with previous version of Caché server. For example, Caché Studio 2013.1 can work with Caché 2009.
On *Nix systems Caché Git provides only Export/Import without calling TortoiseGit.
Enable write-access to CACHELIB database via the Management Portal. (This is required for csp-page with settings import.)
Import project in %SYS:
%SYS>do $system.OBJ.ImportDir(“c:\your-path-that-contains-project-downloaded-from-github”,”*.xml”,“ck”,,1)
Now you can disable write-access to CACHELIB.
In Management Portal select the new %SourceControl.Git class as the desired Source Control class in all namespaces where you wish to use it. (System Administration >> Configuration >> Additional Settings >> Source Control)
In Studio, in any namespace with %SourceControl.Git as a Version Control Class choose menu “Git > Settings”
machine your-git-server login your-git-login password your-git-password
.Data used by Caché-Git is stored in global which name is defined by Storage parameter of %SourceControl.Git.Utils class. Its value by default — ^Git.
Options (path to tortoiseproc.exe and temp folder) are stored in %SYS namespace in nodes ^Git(”%gitBinPath”) and ^Git(”%defaultTemp”).
In each namespace we also store path to temp folder for this namespace that can override default path. Global name is ^Git(“settings”,“namespaceTemp”)
In ^Git(“items”) node namespace elements are stored that traced by Caché-Git. We store names of particular items with extension in lower-case.
In ^Git(“TSH”) node timestamps of last synchronization for each routine are stored.
To run all tests:
%SYS>do ##class(%SourceControl.Git.Test.Git).runall()
To specify particular folder in repository where Caché Git should place files set value of `^Git(“settings”,“mappings”) to relative path. Additionally you can specify subfolder for each particular item type.
For example:
USER>zwrite ^Git
^Git("settings","mappings")="src/cache/"
^Git("settings","mappings","cls")="cls/"
^Git("settings","mappings","csp")="csp-data/"
^Git("settings","mappings","dfi")="dfi/"
^Git("settings","mappings","mac")="mac/"
^Git("settings","namespaceTemp")="C:\temp\testctg\"
In this particular case Caché Git stores all its files (except sc-list.txt) in src/cache/
subfolder. Classes are stored in src/cache/cls/
etc. All csp files (including static files – js, css) are stored in src/cache/csp-data/
. With this particular path to repository classes will be stored in folder C:\temp\testctg\src\cache\cls\
.
You can omit root mappings. Mappings for particular item type are still applied.
The following sub-nodes of ^Git("settings")
allow for further configuration:
"groupByFolder"
- boolean value that defaults to 0
when not specified. The setting applies to all INC, MAC and INT routines as well as DFI exports.
Package.Include.INC
would be exported to <rootfolder>/Package/Include.inc.xml
Package.Include.INC
would be exported to <rootfolder>/Package.Include.inc.xml
"includeExtensionInFilename"
- boolean value that defaults to 1
when not specified.
MyClass.cls.xml
MyClass.xml
NOTE: Caché Git does not do any automatic moving of files. If you have classes placed in root folder and change mappings for cls to “src/cache/cls/” you need to move files corresponding to these classes manually. Better – set mappings on creating of repository, before adding new items to source control.