Skip to content

Commit cb1c167

Browse files
committed
import production class without definition
1 parent 55d0986 commit cb1c167

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,13 +1261,19 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
12611261
#dim fileTSH = ##class(%File).GetFileDateModified(filename)
12621262
#dim sc as %Status = $$$OK
12631263

1264+
set settings = ##class(SourceControl.Git.Settings).%New()
12641265
set type = ..Type(InternalName)
12651266
if ..IsRoutineOutdated(InternalName) || force || (type = "ptd"){
12661267
if (type = "ptd") && $$$comClassDefined("Ens.Deployment.Deploy") {
12671268
set targetProduction = $piece(InternalName,"||",1)
12681269
set rollbackFile = ##class(%File).TempFilename()
12691270
set sc = ##class(Ens.Deployment.Deploy).DeployCode(filename,targetProduction,0,rollbackFile)
12701271
do ##class(%File).Delete(rollbackFile)
1272+
} elseif (type = "cls") && settings.decomposeProductions
1273+
&& $$$comClassDefined("%Studio.SourceControl.Production")
1274+
&& ##class(%Studio.SourceControl.Production).IsProductionClass(
1275+
..NameWithoutExtension(InternalName), "FullExternalName") {
1276+
set sc = ##class(%Studio.SourceControl.Production).ImportProductionWithoutDefinition(filename)
12711277
} elseif ..UserTypeCached(InternalName,.docclass,.doctype) {
12721278
set routineMgr = ##class(%RoutineMgr).%OpenId(InternalName)
12731279
do routineMgr.Code.Rewind()

0 commit comments

Comments
 (0)