@@ -10,23 +10,20 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0)
10
10
11
11
#define export (%code, %file ) ##continue
12
12
s sc = $system .OBJ .ExportUDL (%code , %file ," /diffexport" ) ##continue
13
- w +sc ##continue
14
- if 'sc d $system .OBJ .DisplayError (sc )
13
+ if +sc w " Ok" else d $system .OBJ .DisplayError (sc )
15
14
16
15
#define isGenerated (%code ) ##class (%RoutineMgr ).IsGenerated ( %code )
17
16
#define isPercented (%code ) (" %" = $e (%code ))
18
17
#define isMapped (%code ) ##class (%RoutineMgr ).IsMapped ( %code )
19
- #define log w !, code , " -> " , filename , " "
20
-
18
+ #define log w !, code , " -> " , ##class ( %File ). GetFilename ( filename ) , " "
19
+
21
20
#define mkdir (%filename ) ##continue
22
21
s path = ##class (%File ).GetDirectory ( %filename ) ##continue
23
22
if '##class (%File ).DirectoryExists ( path ) { ##continue
24
23
s sc = ##class (%File ).CreateDirectoryChain ( path ) ##continue
25
24
w !, " mkdir " , path , " " , sc ##continue
26
25
}
27
-
28
-
29
-
26
+ w " #; Exporting to " , ..workdir (),!
30
27
#; classes
31
28
s rs = ##class (%ResultSet ).%New (" %Dictionary.ClassDefinition:Summary" )
32
29
if rs .Execute () {
@@ -67,7 +64,8 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0)
67
64
68
65
69
66
#; dfi
70
- #define export (%code,%file ) w ##class (%DeepSee.UserLibrary.Utils ).%Export ( %code , %file , 0 )
67
+ #define export (%code,%file ) s sc = ##class (%DeepSee.UserLibrary.Utils ).%Export ( %code , %file , 0 )
68
+
71
69
s sql = " Select fullName as Name From %DeepSee_UserLibrary.FolderItem"
72
70
s rs = ##class (%SQL.Statement ).%ExecDirect ( .stm , sql )
73
71
while rs .%Next () {
@@ -77,7 +75,9 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0)
77
75
$$$export(code ,filename )
78
76
79
77
} s rs =" "
80
-
78
+
79
+ w !,!, " #; Exported to: " , ..workdir ()
80
+
81
81
Q 1
82
82
}
83
83
@@ -87,10 +87,10 @@ ClassMethod import(filemask = "*.*", qspec = "cku-d", ByRef err = "", recurse =
87
87
#define push (%dir ) s dirs ( $i ( dirs ) ) = %dir
88
88
#define next (%i,%dir ) s %i =$o ( dirs ( " " ), 1 , %dir ) k :%i '=" " dirs (%i )
89
89
#define isDirectory (%type ) ( %type = " D" )
90
- #define log w !, $piece ( filename ,.. workdir (), 2 ), " " , +sc , $S ( sc = 1 : " " , 1 : " " _ $system .Status .GetOneErrorText (sc ) )
90
+ #define log w !, ##class ( %File ). GetFilename ( filename ), " " if +sc w " Ok " else d $system .Status .GetOneErrorText (sc )
91
91
92
92
s sc = 1 , dirs = " " , dir = ..workdir () $$$push(dir )
93
- if verbose w " Starting import of updated files in " _dir ,!
93
+ if verbose w " #; Importing from " _dir ,!
94
94
for { $$$next(i ,dir ) Q :i =" " Q :dir =" "
95
95
96
96
s rs = ##class (%File ).FileSetFunc ( dir , filemask , , 1 )
@@ -115,7 +115,7 @@ ClassMethod import(filemask = "*.*", qspec = "cku-d", ByRef err = "", recurse =
115
115
116
116
}
117
117
}
118
-
118
+ w : verbose !,!, " #; Imported from " , .. workdir ()
119
119
Q sc
120
120
}
121
121
@@ -177,10 +177,10 @@ ClassMethod importUpdated(filemask = "*.*", qspec = "cku-d", ByRef err = "", rec
177
177
#define push (%dir ) s dirs ( $i ( dirs ) ) = %dir
178
178
#define next (%i,%dir ) s %i =$o ( dirs ( " " ), 1 , %dir ) k :%i '=" " dirs (%i )
179
179
#define isDirectory (%type ) ( %type = " D" )
180
- #define log w !, $piece ( filename ,.. workdir (), 2 ), " " , +sc , $S ( sc = 1 : " " , 1 : " " _ $system .Status .GetOneErrorText (sc ) )
180
+ #define log w !, ##class ( %File ). GetFilename ( filename ), " " if +sc w " Ok " else d $system .Status .GetOneErrorText ( sc )
181
181
182
182
s sc = 1 , dirs = " " , dir = ..workdir () $$$push(dir )
183
- if verbose w " Starting import of updated files in " _ dir ,!
183
+ if verbose w " #; Importing updated from " , dir ,!
184
184
for { $$$next(i ,dir ) Q :i =" " Q :dir =" "
185
185
186
186
s rs = ##class (%File ).FileSetFunc ( dir , filemask , , 1 )
@@ -220,6 +220,7 @@ ClassMethod importUpdated(filemask = "*.*", qspec = "cku-d", ByRef err = "", rec
220
220
if verbose $$$log
221
221
}
222
222
}
223
+ w :verbose !," #; Imported updated from " , ..workdir ()
223
224
Q sc
224
225
}
225
226
0 commit comments