@@ -15,13 +15,6 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
1515 #define isPercented (%code ) (" %" = $e (%code ))
1616 #define isMapped (%code ) ##class (%RoutineMgr ).IsMapped ( %code )
1717 #define log w !, code , " -> " , $piece (filename ,..workdir (),2 ), " "
18-
19- #define mkdir (%filename ) ##continue
20- s path = ##class (%File ).GetDirectory ( %filename ) ##continue
21- if '##class (%File ).DirectoryExists ( path ) { ##continue
22- s sc = ##class (%File ).CreateDirectoryChain ( path ) ##continue
23- w !, " mkdir " , path , " " , sc ##continue
24- }
2518
2619 w " #; Exporting to " , ..workdir (),!
2720 #; classes
@@ -38,7 +31,7 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
3831 if ( '$find ( code , mask ) ) continue
3932
4033 s filename = ..filename ( code )
41- $$$ mkdir( filename )
34+ do .. mkdir ( filename )
4235 $$$log
4336 $$$export( code , filename )
4437
@@ -59,7 +52,7 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
5952 if ( '$find ( code , mask ) ) continue
6053
6154 s filename = ..filename ( code )
62- $$$ mkdir( filename )
55+ do .. mkdir ( filename )
6356 $$$log
6457 $$$export( code , filename )
6558
@@ -80,7 +73,7 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
8073
8174 if ( '$find ($zcvt (documentName ," l" ), mask ) ) continue
8275 if ($L (code ," $TRASH" )>1 ) continue
83- $$$ mkdir( filename )
76+ do .. mkdir ( filename )
8477
8578 if dfi {
8679 $$$log
@@ -94,6 +87,9 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
9487
9588 } s rs =" "
9689
90+ #;DeepSee artefacts
91+ do ..exportDeepSeeArtefacts ()
92+
9793 w !,!, " #; Exported to " , ..workdir ()
9894
9995 Q 1
@@ -157,6 +153,26 @@ ClassMethod import(filemask = "*.xml;*.cls;*.mac;*.int;*.inc;*.dfi", qspec = "ck
157153 Q sc
158154}
159155
156+ ClassMethod exportDeepSeeArtefacts () As %Status
157+ {
158+ set sc = $$$OK
159+ set artefacts = $listbuild (" DeepSee.Variables" ," DeepSee.TermList" ," DeepSee.CalcMbrs" )
160+
161+ for i =1 :1 :$listlength (artefacts )
162+ {
163+ set artefact = $list (artefacts ,i )
164+ continue :$data (@(" ^" _artefact ))=0
165+
166+ set artefact = artefact _" .GBL"
167+ set filename = ..filename (artefact )
168+ do ..mkdir (filename )
169+
170+ set sc = ..fixXMLLine (artefact , filename _" .xml" )
171+ }
172+
173+ return sc
174+ }
175+
160176ClassMethod patch (filename = " " , commitFrom = " " , commitTo = " " ) As %Status
161177{
162178 s gln = ..gln ()
@@ -333,11 +349,12 @@ ClassMethod filename(code)
333349 s $p (filename ," ." ,*)=ext
334350 //B:code="DPRep.Rest.JSON.cls" "L"
335351 #; for *.cls Package.Subpackage.ClassName.cls -> Folder/Subfolder/ClassName.cls
336- if ext =" cls" {
352+ if ( ext =" cls" ) || ( ext = " gbl " ) {
337353 s dirs = $piece ( code , " ." ,1 , *-2 ), dirs = $translate ( dirs , " ." , " /" )
338354 s relpath = dirs _ " /" _ $piece ( code , " ." , *-1 , * ) ;
339355 s filename = ##class (%File ).NormalizeFilename ( relpath , wd )
340356 }
357+
341358 Q filename
342359}
343360
@@ -443,5 +460,17 @@ ClassMethod fixDashIntoName()
443460 k rs
444461}
445462
463+ ClassMethod mkdir (filename As %String ) As %Status
464+ {
465+ s sc = $$$OK
466+ s path = ##class (%File ).GetDirectory (filename )
467+ if '##class (%File ).DirectoryExists (path )
468+ {
469+ s sc = ##class (%File ).CreateDirectoryChain (path )
470+ w !, " mkdir " , path , " " , sc
471+ }
472+ return sc
473+ }
474+
446475}
447476
0 commit comments