@@ -402,6 +402,13 @@ ClassMethod AddToSourceControl(InternalName As %String) As %Status
402
402
quit ec
403
403
}
404
404
405
+ ClassMethod RemoveFromGit (InternalName )
406
+ {
407
+ #dim fullName = ##class (Utils ).FullExternalName (InternalName )
408
+ do ..RunGitCommand (" rm" ,.errStream ,.outStream ," --cached" , fullName )
409
+ do errStream .OutputToDevice ()
410
+ }
411
+
405
412
ClassMethod DeleteExternalsForItem (InternalName As %String ) As %Status
406
413
{
407
414
#dim type as %String = ..Type (InternalName )
@@ -425,16 +432,19 @@ ClassMethod DeleteExternalsForItem(InternalName As %String) As %Status
425
432
if 'sc {
426
433
set ec = $$$ADDSC(ec , sc )
427
434
}
435
+ do ..RemoveFromGit (item )
428
436
}
429
437
}
430
438
} else {
431
439
set ec = ..DeleteExternalFile (InternalName )
440
+ do ..RemoveFromGit (InternalName )
432
441
}
433
442
quit ec
434
443
}
435
444
436
445
ClassMethod RemoveFromSourceControl (InternalName As %String ) As %Status
437
446
{
447
+ write !
438
448
#dim sc as %Status = $$$OK
439
449
for i = 1 :1 :$length (InternalName , " ," ) {
440
450
#dim tsc as %Status = $$$OK
@@ -828,8 +838,28 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A
828
838
ClassMethod ListItemsInFiles (ByRef itemList , ByRef err ) As %Status
829
839
{
830
840
#define DoNotLoad 1
831
- set res = $system .OBJ .ImportDir (..TempFolder ()," *.xml" ," -d" ,.err ,1 , .itemList , $$$DoNotLoad)
832
841
842
+ set mappingFileType = $order ($$$SourceMapping(" " ))
843
+ while (mappingFileType '= " " ) {
844
+
845
+ set mappingCoverage = $order ($$$SourceMapping(mappingFileType , " " ))
846
+
847
+ while (mappingCoverage '= " " ){
848
+
849
+ set mappedRelativePath = $$$SourceMapping(mappingFileType , mappingCoverage )
850
+ set mappedFilePath = ##class (%File ).NormalizeFilename (mappedRelativePath , ..TempFolder ())
851
+
852
+ if (##class (%File ).DirectoryExists (mappedFilePath )){
853
+ set res = $system .OBJ .ImportDir (mappedFilePath ,," -d" ,.err ,1 , .tempItemList , $$$DoNotLoad)
854
+ merge itemList = tempItemList
855
+ }
856
+
857
+ set mappingCoverage = $order ($$$SourceMapping(mappingFileType , mappingCoverage ))
858
+ }
859
+
860
+ set mappingFileType = $order ($$$SourceMapping(mappingFileType ))
861
+ }
862
+
833
863
if '$data (itemList ) && $$$ISERR(res ) {
834
864
quit res
835
865
}
0 commit comments