@@ -2067,33 +2067,30 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
2067
2067
{
2068
2068
set sc = $$$OK
2069
2069
try {
2070
- write !, " Exporting classes..."
2071
- set sql = " SELECT ID FROM %Dictionary.ClassDefinition"
2072
- _ " WHERE GeneratedBy IS Null AND Deployed = 0"
2073
- _ " AND NOT ("
2074
- _ " ID %STARTSWITH 'csr.csp.' OR ID %STARTSWITH '%' OR ID %STARTSWITH 'CSPX.' OR ID %STARTSWITH 'Ens.'"
2075
- _ " OR ID %STARTSWITH 'EnsLib.' OR ID %STARTSWITH 'EnsPortal.'"
2076
- _ " )"
2077
- set rs = ##class (%SQL.Statement ).%ExecDirect (,sql )
2070
+ write !, " Exporting items..."
2071
+ set rs = ##class (%Library.RoutineMgr ).StudioOpenDialogFunc (
2072
+ " *.mac,*.int,*.inc,*.cls,*.csp" // Spec
2073
+ , , ,0 // SystemFiles
2074
+ ,1 // Flat
2075
+ ,0 // NotStudio
2076
+ ,0 // ShowGenerated
2077
+ , , ,0 // Mapped
2078
+ )
2078
2079
throw :rs .%SQLCODE <0 ##class (%Exception.SQL ).CreateFromSQLCODE (rs .%SQLCODE ,rs .%Message )
2079
- while rs .%Next () {
2080
- set internalName = rs .ID _ " .CLS"
2080
+ while rs .%Next (.sc ) {
2081
+ $$$ThrowOnError(sc )
2082
+ set internalName = rs .Name
2081
2083
// exclude items in a non-default IPM package
2082
2084
set context = ##class (SourceControl.Git.PackageManagerContext ).ForInternalName (internalName )
2083
2085
continue :($isobject (context .Package ) && 'context .IsInDefaultPackage )
2086
+ // exclude CSPX classes
2087
+ continue :(rs .Type =4 )&&($match (internalName ," CSPX\..*" ))
2088
+ // exclude Ensemble system classes
2089
+ continue :(rs .Type =4 )&&($match (internalName ," Ens\..*" )||$match (internalName ," EnsLib\..*" )||$match (internalName ," EnsPortal\..*" ))
2090
+ // exclude Ensemble system MAC and INC routines
2091
+ continue :((rs .Type =0 )||(rs .Type =2 ))&&($extract (internalName ,1 ,3 )=" Ens" )
2084
2092
$$$ThrowOnError(..AddToSourceControl (internalName ))
2085
2093
}
2086
- write !, " Exporting mac routines..."
2087
- do ..BaselineExportRoutines (" *.MAC" )
2088
- write !, " Exporting inc routines..."
2089
- do ..BaselineExportRoutines (" *.INC" )
2090
- /*
2091
- Other items may be supported in the future:
2092
- - DeepSee folder items
2093
- - Ensemble lookup tables
2094
- - Ensemble schema documents
2095
- - CSP applications
2096
- */
2097
2094
if pCommitMessage '= " " {
2098
2095
// switch to default context
2099
2096
do ##class (SourceControl.Git.PackageManagerContext ).ForInternalName (" " )
@@ -2115,22 +2112,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
2115
2112
return sc
2116
2113
}
2117
2114
2118
- ClassMethod BaselineExportRoutines (pFilter ) [ Private ]
2119
- {
2120
- set rs = ##class (%Library.Routine ).RoutineListFunc (pFilter )
2121
- throw :rs .%SQLCODE <0 ##class (%Exception.SQL ).CreateFromSQLCODE (rs .%SQLCODE ,rs .%Message )
2122
- while rs .%Next () {
2123
- continue :rs .Size =0
2124
- set item = rs .Name
2125
- // exclude items in a non-default IPM package
2126
- set context = ##class (SourceControl.Git.PackageManagerContext ).ForInternalName (item )
2127
- continue :($isobject (context .Package ) && 'context .IsInDefaultPackage )
2128
- // exclude generated routines from classes, SQL, etc.
2129
- continue :##class (%Library.RoutineMgr ).IsGenerated (item )
2130
- // exclude Ens* routines
2131
- continue :($extract (item ,1 ,3 )=" Ens" )
2132
- $$$ThrowOnError(..AddToSourceControl (item ))
2133
- }
2134
- }
2135
-
2136
2115
}
0 commit comments