@@ -1263,6 +1263,7 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
1263
1263
1264
1264
set settings = ##class (SourceControl.Git.Settings ).%New ()
1265
1265
set type = ..Type (InternalName )
1266
+ set imported = 1
1266
1267
if ..IsRoutineOutdated (InternalName ) || force || (type = " ptd" ){
1267
1268
if (type = " ptd" ) && ##class (%Library.EnsembleMgr ).IsEnsembleNamespace () {
1268
1269
// Deployment manager should not reexport because studio project file includes timestamp
@@ -1277,7 +1278,8 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
1277
1278
&& $$$comClassDefined(" %Studio.SourceControl.Production" )
1278
1279
&& ##class (%Studio.SourceControl.Production ).IsProductionClass (
1279
1280
..NameWithoutExtension (InternalName ), " FullExternalName" ) {
1280
- set sc = ##class (%Studio.SourceControl.Production ).ImportProductionWithoutDefinition (filename )
1281
+ write !, " Production decomposition enabled, skipping import of production class"
1282
+ set imported = 0
1281
1283
} elseif ..UserTypeCached (InternalName ,.docclass ,.doctype ) {
1282
1284
set routineMgr = ##class (%RoutineMgr ).%OpenId (InternalName )
1283
1285
do routineMgr .Code .Rewind ()
@@ -1293,12 +1295,14 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
1293
1295
set sc = $system .OBJ .Load (filename ," -l-d" )
1294
1296
}
1295
1297
}
1296
- if sc {
1297
- set sc = ..UpdateRoutineTSH (InternalName , fileTSH )
1298
- if type = " prj" {
1299
- set sc = $$$ADDSC(sc , ..FixProjectCspReferences (InternalName ))
1298
+ if $$$ISOK(sc ) {
1299
+ if imported {
1300
+ set sc = ..UpdateRoutineTSH (InternalName , fileTSH )
1301
+ if type = " prj" {
1302
+ set sc = $$$ADDSC(sc , ..FixProjectCspReferences (InternalName ))
1303
+ }
1304
+ write !, InternalName ," has been imported from " , filename
1300
1305
}
1301
- write !, InternalName ," has been imported from " , filename
1302
1306
} else {
1303
1307
write !, " ERROR importing" ,InternalName , !
1304
1308
do $system .Status .DisplayError (sc )
@@ -1537,7 +1541,7 @@ ClassMethod ExportItem(InternalName As %String, expand As %Boolean = 1, force As
1537
1541
if (type = " ptd" ) {
1538
1542
$$$QuitOnError(##class (%Studio.SourceControl.Production ).ExportPTD (InternalName ," FullExternalName" ))
1539
1543
} elseif (..ItemIsProductionToDecompose (InternalName , .productionName )) {
1540
- $$$QuitOnError( ##class ( %Studio.SourceControl. Production). ExportProductionWithoutDefinition ( productionName , " FullExternalName " ))
1544
+ write !, " Production decomposition enabled, skipping export of production class "
1541
1545
} else {
1542
1546
$$$QuitOnError($system .OBJ .ExportUDL (InternalName , filename ," -d/diff" ))
1543
1547
}
@@ -1555,7 +1559,8 @@ ClassMethod ItemIsProductionToDecompose(InternalName, Output productionName)
1555
1559
set settings = ##class (SourceControl.Git.Settings ).%New ()
1556
1560
set name = $piece (InternalName ," ." ,1 ,*-1 )
1557
1561
set decomposeProduction = settings .decomposeProductions && (..Type (InternalName ) = " cls" )
1558
- && $$$comClassDefined(name ) && $classmethod (name , " %Extends" ," Ens.Production" )
1562
+ && $$$comClassDefined(" %Studio.SourceControl.Production" )
1563
+ && ##class (%Studio.SourceControl.Production ).IsProductionClass (name , " FullExternalName" )
1559
1564
if decomposeProduction {
1560
1565
set productionName = name
1561
1566
}
@@ -2633,3 +2638,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
2633
2638
}
2634
2639
2635
2640
}
2641
+
0 commit comments