@@ -1265,14 +1265,16 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
1265
1265
set imported = 1
1266
1266
if ..IsRoutineOutdated (InternalName ) || force || (type = " ptd" ){
1267
1267
if (type = " ptd" ) && settings .decomposeProductions && ##class (%Library.EnsembleMgr ).IsEnsembleNamespace () {
1268
- // Deployment manager should not reexport because studio project file includes timestamp
1269
- // ideally we could just new %SourceControl, but Ens portal config pages do not use %SourceControl
1270
- new %gscSkipSaveHooks
1271
- set %gscSkipSaveHooks = 1
1272
- set targetProduction = $piece (InternalName ," ||" ,1 )
1273
- set rollbackFile = ##class (%File ).TempFilename ()
1274
- set sc = ##class (Ens.Deployment.Deploy ).DeployCode (filename ,targetProduction ,0 ,rollbackFile )
1275
- do ##class (%File ).Delete (rollbackFile )
1268
+ if ##class (%File ).Exists (filename ) {
1269
+ // Deployment manager should not reexport because studio project file includes timestamp
1270
+ // ideally we could just new %SourceControl, but Ens portal config pages do not use %SourceControl
1271
+ new %gscSkipSaveHooks
1272
+ set %gscSkipSaveHooks = 1
1273
+ set targetProduction = $piece (InternalName ," ||" ,1 )
1274
+ set rollbackFile = ##class (%File ).TempFilename ()
1275
+ set sc = ##class (Ens.Deployment.Deploy ).DeployCode (filename ,targetProduction ,0 ,rollbackFile )
1276
+ do ##class (%File ).Delete (rollbackFile )
1277
+ }
1276
1278
} elseif (type = " cls" ) && settings .decomposeProductions
1277
1279
&& ##class (SourceControl.Git.Production ).IsProductionClass (
1278
1280
..NameWithoutExtension (InternalName ), " FullExternalName" ) {
@@ -2150,7 +2152,9 @@ ClassMethod Name(InternalName As %String, ByRef MappingExists As %Boolean) As %S
2150
2152
quit $translate (found _$translate (InternalName ," %" ," _" )," \" ," /" )
2151
2153
} elseif (..Type (InternalName ) = " ptd" ) {
2152
2154
do ##class (SourceControl.Git.Production ).ParseInternalName (InternalName ,'default ,.filename )
2153
- return $translate (found _filename , " \" ," /" )
2155
+ set externalName = $translate (found _filename , " \" ," /" )
2156
+ do ##class (SourceControl.Git.Util.ProductionItemCache ).Store (..TempFolder ()_externalName , InternalName )
2157
+ return externalName
2154
2158
} elseif ext =" CLS" ||(ext =" PRJ" )||usertype {
2155
2159
set nam =$replace (nam ," %" , ..PercentClassReplace ())
2156
2160
if default {
@@ -2216,10 +2220,6 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
2216
2220
}
2217
2221
if (##class (%File ).Exists (Name )) {
2218
2222
set InternalName = ##class (SourceControl.Git.File ).ExternalNameToInternalName (Name )
2219
- if (InternalName '= " " ) && (context .IsInGitEnabledPackage ) {
2220
- // Don't need mappings!
2221
- return ..NormalizeInternalName (InternalName )
2222
- }
2223
2223
} else {
2224
2224
// check for file in uncommitted queue
2225
2225
&sql (SELECT internalName into :InternalName FROM SourceControl_Git .Change where ItemFile = :Name)
@@ -2229,6 +2229,11 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
2229
2229
set Deleted = 1
2230
2230
}
2231
2231
}
2232
+ // check for file in production item cache
2233
+ if InternalName = " " {
2234
+ set InternalName = ##class (SourceControl.Git.Util.ProductionItemCache ).Lookup (Name )
2235
+ }
2236
+ // use mappings
2232
2237
if (InternalName =" " ) {
2233
2238
set name =$extract (Name ,$length ($$$SourceRoot)+1 ,*)
2234
2239
set name =$replace (name ," \" ," /" ) // standardize slash direction
@@ -2361,7 +2366,11 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
2361
2366
}
2362
2367
if ((IgnorePercent )&&($extract (InternalName )=" %" )) { set InternalName = " " } // don't return a result for % items if instructed to ignore them
2363
2368
if ((IgnoreNonexistent )&&('##class (%RoutineMgr ).Exists (InternalName ))&&('Deleted )) { set InternalName = " " } // only return item names which exist in the DB
2364
- quit ..NormalizeInternalName (InternalName )
2369
+ set normalizedInternalName = ..NormalizeInternalName (InternalName )
2370
+ if ..Type (normalizedInternalName ) = " ptd" {
2371
+ do ##class (SourceControl.Git.Util.ProductionItemCache ).Store (Name , normalizedInternalName )
2372
+ }
2373
+ quit normalizedInternalName
2365
2374
}
2366
2375
2367
2376
ClassMethod OutputConfigureMessage ()
0 commit comments