@@ -765,7 +765,7 @@ ClassMethod AddToServerSideSourceControl(InternalName As %String) As %Status
765
765
#dim i as %Integer
766
766
#dim ec as %Status = $$$OK
767
767
for i = 1 :1 :$length (InternalName , " ," ) {
768
- #dim item as %String = .. NormalizeExtension ($piece (InternalName , " ," , i ))
768
+ #dim item as %String = ##class ( %Studio.SourceControl.Interface ). normalizeName ($piece (InternalName , " ," , i ))
769
769
if (item = " " ) {
770
770
continue
771
771
}
@@ -781,7 +781,7 @@ ClassMethod AddToSourceControl(InternalName As %String, refreshUncommitted As %B
781
781
#dim i as %Integer
782
782
#dim ec as %Status = $$$OK
783
783
for i = 1 :1 :$length (InternalName , " ," ) {
784
- #dim item as %String = .. NormalizeExtension ($piece (InternalName , " ," , i ))
784
+ #dim item as %String = ##class ( %Studio.SourceControl.Interface ). normalizeName ($piece (InternalName , " ," , i ))
785
785
#dim type as %String = ..Type (.item )
786
786
787
787
#dim sc as %Status = ..ExportItem (item ,,1 ,.filenames )
@@ -791,7 +791,7 @@ ClassMethod AddToSourceControl(InternalName As %String, refreshUncommitted As %B
791
791
792
792
for i =1 :1 :$Get (filenames ) {
793
793
set ignoreNonexistent = (type '= " ptd" )
794
- set FileInternalName = ##class (SourceControl.Git.Utils ). NormalizeExtension (
794
+ set FileInternalName = ##class (%Studio. SourceControl.Interface ). normalizeName (
795
795
##class (SourceControl.Git.Utils ).NameToInternalName (filenames (i ), 0 ,ignoreNonexistent ,1 ))
796
796
if (FileInternalName = " " ) {
797
797
continue
@@ -971,7 +971,7 @@ ClassMethod RemoveFromServerSideSourceControl(InternalName As %String) As %Statu
971
971
#dim i as %Integer
972
972
#dim ec as %Status = $$$OK
973
973
for i = 1 :1 :$length (InternalName , " ," ) {
974
- #dim item as %String = .. NormalizeExtension ($piece (InternalName , " ," , i ))
974
+ #dim item as %String = ##class ( %Studio.SourceControl.Interface ). normalizeName ($piece (InternalName , " ," , i ))
975
975
#dim tsc as %Status = $$$OK
976
976
#dim type as %String = ..Type (.InternalName )
977
977
@@ -999,8 +999,8 @@ ClassMethod RemoveFromSourceControl(InternalName As %String, cascadeDelete As %B
999
999
#dim type as %String = ..Type (.InternalName )
1000
1000
1001
1001
set item = $piece (InternalName , " ," , i )
1002
- if $data (@..#Storage@(" items" , .. NormalizeExtension (item ))) {
1003
- set item = .. NormalizeExtension (item )
1002
+ if $data (@..#Storage@(" items" , ##class ( %Studio.SourceControl.Interface ). normalizeName (item ))) {
1003
+ set item = ##class ( %Studio.SourceControl.Interface ). normalizeName (item )
1004
1004
}
1005
1005
1006
1006
if $data (@..#Storage@(" items" , item )) {
@@ -1202,21 +1202,21 @@ ClassMethod IsInSourceControl(InternalName As %String, ByRef sourceControlItem A
1202
1202
{
1203
1203
#dim isInSourceControl as %Boolean = 1
1204
1204
set sourceControlItem = " "
1205
- set InternalName = ##class (SourceControl.Git.Utils ). NormalizeExtension (InternalName )
1205
+ set InternalName = ##class (%Studio. SourceControl.Interface ). normalizeName (InternalName )
1206
1206
if (InternalName = " " ) {
1207
1207
quit 0
1208
1208
}
1209
1209
1210
1210
set context = ##class (SourceControl.Git.PackageManagerContext ).%Get ()
1211
- if $data (@..#Storage@(" items" , .. NormalizeExtension (InternalName ))) {
1212
- set InternalName = .. NormalizeExtension (InternalName )
1211
+ if $data (@..#Storage@(" items" , ##class ( %Studio.SourceControl.Interface ). normalizeName (InternalName ))) {
1212
+ set InternalName = ##class ( %Studio.SourceControl.Interface ). normalizeName (InternalName )
1213
1213
}
1214
1214
1215
1215
set isInSourceControl = $data (@..#Storage@(" items" , InternalName )) > 0
1216
1216
if isInSourceControl {
1217
1217
// Direct reference to namespace-default project
1218
1218
set sourceControlItem = InternalName
1219
- } elseif context .IsInGitEnabledPackage && (InternalName = .. NormalizeExtension (context .InternalName )) {
1219
+ } elseif context .IsInGitEnabledPackage && (InternalName = ##class ( %Studio.SourceControl.Interface ). normalizeName (context .InternalName )) {
1220
1220
// Next thing to check is if we're in a package manager-based package
1221
1221
set isInSourceControl = 1
1222
1222
set sourceControlItem = context .ResourceReference .Name
@@ -1270,7 +1270,7 @@ ClassMethod NormalizeInternalName(ByRef name As %String, Output fromWebApp As %B
1270
1270
set type = ..Type (.name )
1271
1271
1272
1272
if ($extract (name ) '= " /" ) && (type '=" csp" ) {
1273
- quit .. NormalizeExtension (name )
1273
+ quit ##class ( %Studio.SourceControl.Interface ). normalizeName (name )
1274
1274
}
1275
1275
1276
1276
if (name [ " /" ) && (type = " csp" ) {
@@ -1289,16 +1289,11 @@ ClassMethod NormalizeInternalName(ByRef name As %String, Output fromWebApp As %B
1289
1289
quit name
1290
1290
}
1291
1291
1292
- ClassMethod NormalizeExtension (name As %String ) As %String
1293
- {
1294
- return ##class (%Studio.SourceControl.Interface ).normalizeName (name )
1295
- }
1296
-
1297
1292
ClassMethod RoutineTSH (InternalName As %String ) As %String
1298
1293
{
1299
1294
#dim type = ..Type (InternalName )
1300
1295
//for csp-files (csp,js,html,css, all that stored in csp/...) we always check for changes in external file
1301
- #dim tsh = $case (type ," csp" :" " ,:$get (@..#Storage@(" TSH" , .. NormalizeExtension (InternalName ))))
1296
+ #dim tsh = $case (type ," csp" :" " ,:$get (@..#Storage@(" TSH" , ##class ( %Studio.SourceControl.Interface ). normalizeName (InternalName ))))
1302
1297
1303
1298
// in case an OS level error is returned
1304
1299
set :(($$$isUNIX & (tsh = -2 )) || ($$$isWINDOWS & (tsh = -3 ))) tsh = 0
@@ -1317,13 +1312,13 @@ ClassMethod RoutineTSH(InternalName As %String) As %String
1317
1312
1318
1313
ClassMethod UpdateRoutineTSH (InternalName As %String , tsh As %String ) As %Status
1319
1314
{
1320
- set @..#Storage@(" TSH" , .. NormalizeExtension (InternalName )) = $get (tsh , $h )
1315
+ set @..#Storage@(" TSH" , ##class ( %Studio.SourceControl.Interface ). normalizeName (InternalName )) = $get (tsh , $h )
1321
1316
quit $$$OK
1322
1317
}
1323
1318
1324
1319
ClassMethod RemoveRoutineTSH (InternalName As %String ) As %Status
1325
1320
{
1326
- kill @..#Storage@(" TSH" , .. NormalizeExtension (InternalName ))
1321
+ kill @..#Storage@(" TSH" , ##class ( %Studio.SourceControl.Interface ). normalizeName (InternalName ))
1327
1322
quit $$$OK
1328
1323
}
1329
1324
0 commit comments