Home > Class Reference > ENSLIB namespace > %Studio.SourceControl.ISC

%Studio.SourceControl.ISC

class %Studio.SourceControl.ISC extends %Studio.SourceControl.Base

This class is used internally by InterSystems. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

Method Inventory (Including Private)

Parameters

parameter SrcVer = $Id: //ce/2018.1.4/databases/sys/cls/Studio/SourceControl/ISC.xml#1 $;
This Parameter should be updated when synced from Perforce
parameter Version = 165;
Revision number of this class when compiled as part of the //custom_ccrs/_common/config/... branch. This version will not be updated (by design) when the class is integrated to other branches. This allows the user to tell what version of the Studio client tools are in use.

Methods (Including Private)

classmethod AddClassesToSourceControl(classes As %String) as %Status
Add the specified classes to source control
classmethod AddItemsToSourceControl(ByRef items) as %Status
Add the specified items to source control
classmethod AddPackagesToSourceControl(packages As %String) as %Status
Add the specified package(s) to source control
method AddToSourceControl(InternalName As %String, Description As %String = "") as %Status
Called to add this item to source control
method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean) as %Status
Inherited description: This is called after the UserAction() and after any template is run or dialog is displayed. For list of input arguments see UserAction() In the case of the dialog the button pushed by the user is passed in Answer:
  • 0 - No
  • 1 - Yes
  • 2 - Cancel
For the dialog that contains a textbox field the text of this field is passed in 'Msg' argument. In the case of a template if the template was closed from the 'x' button then Answer=2 to indicate the user attempted to cancel the operation. Otherwise if the template closed normally by getting to the end Answer=1. For the cases where Studio did not perform any interaction this method is not called. The default implementation is to call the standard source control tags as Studio did in Cache 5.0. If the Reload argument is set to true by this method then the current document will be reloaded in Studio
classmethod BackupName(InternalName As %String) as %String
Return filename of backup file of this item

At the time of CheckOut(), a local backup of the item in its existing state is backed up to the file system with a .bak extension. This file will be used on Disconnected systems to restore to the previous state when UndoCheckout() is called. It can also be used for diffs from the original file state.

method BaselineCSPDir(dir As %String, appDir As %String, app As %String, ToReadOnly As %Boolean = 0, useEnsembleExclusionlist As %Boolean = 0)
Export the contents of a CSP directory
classmethod BaselineExport(classesOnly As %Boolean = 0, interactive=1, targetDirectory=$get(^Sources), changeToReadonly As %Boolean = 1, includeMapped As %Boolean = {'$get(^SYS("SourceControl", "Misc", "LockMapped"))}) as %Status
This method exports all Classes, Routines, Include files, CSP Application files, and Projects files from a namespace into a file structure that can then be added to Source Control

This should be run from the terminal, and the user will be prompted as to whether they want to export to the current ^Sources location or an alternate location (alternate is recommended).

The method will then iterate through all Classes, Routines, Include files, CSP Application files and Projects and will export them to ^Sources based on the mappings in the ^Sources global.

NOTE - this does not export "Generated" classes

Passing classesOnly as '1' will export only the baseline of the classes. This is useful for exporting all updated XML after changing to a new class compiler version.

Pass interactive as 0 in order to call this programmatically

Pass targetDirectory to specify the directory for export (NOTE - this cannot equal ^Sources for TrakCare exports)

Pass boolean changeToReadOnly to control whether the files should be changed to read-only after export (defaults to true)

Pass boolean includeMapped to control whether items mapped from other databases should be included in the export (defaults to true) The default value for this argument will be the inverse of the source hooks LockMapped setting for this namespace (so if nothing is set, then Mapped will be included by default)

method BaselineExportEnsembleExclude() as %String
Earlier versions of Ensemble physically copied files into newly created csp applications; these need to be enumerated so they can be skipped by BaselineExport()
method BaselineExportItem(InternalName As %String, ToReadOnly As %Boolean = 0, CheckOut As %Boolean = 0, includeMapped As %Boolean = {'$get(^SYS("SourceControl", "Misc", "LockMapped"))}) as %Status
Exports a specific item
If ToReadOnly is true, then the files will be manually changed to ReadOnly afterwards (for use when exporting from LIVE and leaving items uneditable afterwards)
If CheckOut is true, then the Source Control CheckOut/AddToSourceControl logic is used If includeMapped is true, then items mapped from other DBs will be exported, otherwise they will be skipped. The default value for this argument will be the inverse of the source hooks LockMapped setting for this namespace (so if nothing is set, then Mapped will be included by default)
method CheckIn(InternalName As %String, Description As %String) as %Status
Check this routine/class/csp file into source control.
classmethod CheckIndexes()