@@ -202,24 +202,25 @@ Query InstanceUncommitted() As %Query(ROWSPEC = "InternalName:%String,User:%Stri
202
202
203
203
ClassMethod InstanceUncommittedExecute (ByRef qHandle As %Binary ) As %Status
204
204
{
205
- set qHandle ( " q " ) = " SELECT InternalName, ChangedBy FROM SourceControl_Git.Change "
205
+ set initNS = $namespace
206
206
&sql (DECLARE InstanceCursor CURSOR FOR SELECT InternalName, ChangedBy into :internalName, :changedBy from SourceControl_Git .Change )
207
207
set namespaces = ##class (SourceControl.Git.Utils ).GetGitEnabledNamespaces ()
208
208
set tPtr = 0
209
209
set qHandle (" i" ) = 1
210
210
new $namespace
211
+ kill ^||InstanceUncommitted
211
212
while $LISTNEXT (namespaces , tPtr , tValue ) {
212
213
set namespace = $ZCONVERT (tValue , " U" )
213
- if '(namespace [ " ^" ) {
214
+ if '(namespace [ " ^" ) && ( namespace '= initNS ) {
214
215
set $NAMESPACE = namespace
215
216
216
217
&sql (OPEN InstanceCursor)
217
218
throw :SQLCODE <0 ##class (%Exception.SQL ).CreateFromSQLCODE (SQLCODE , %msg )
218
219
&sql (FETCH InstanceCursor)
219
220
while (SQLCODE = 0 ) {
220
- set qHandle (" changes" , $increment (qHandle (" changes" )), " InternalName" ) = internalName
221
- set qHandle (" changes" , qHandle (" changes" ), " User" ) = changedBy
222
- set qHandle (" changes" , qHandle (" changes" ), " Namespace" ) = namespace
221
+ set ^|| InstanceUncommitted (" changes" , $increment (^|| InstanceUncommitted (" changes" )), " InternalName" ) = internalName
222
+ set ^|| InstanceUncommitted (" changes" , ^|| InstanceUncommitted (" changes" ), " User" ) = changedBy
223
+ set ^|| InstanceUncommitted (" changes" , ^|| InstanceUncommitted (" changes" ), " Namespace" ) = namespace
223
224
&sql (FETCH InstanceCursor)
224
225
}
225
226
&sql (CLOSE InstanceCursor)
@@ -232,10 +233,10 @@ ClassMethod InstanceUncommittedExecute(ByRef qHandle As %Binary) As %Status
232
233
ClassMethod InstanceUncommittedFetch (ByRef qHandle As %Binary , ByRef Row As %List , ByRef AtEnd As %Integer = 0 ) As %Status [ PlaceAfter = InstanceUncommittedExecute ]
233
234
{
234
235
set i = qHandle (" i" )
235
- if $data (qHandle (" changes" ,i ))=10 {
236
- set Row = $listbuild (qHandle (" changes" , i , " InternalName" ), qHandle (" changes" , i , " User" ), qHandle (" changes" , i , " Namespace" ))
236
+ if $data (^|| InstanceUncommitted (" changes" ,i ))=10 {
237
+ set Row = $listbuild (^|| InstanceUncommitted (" changes" , i , " InternalName" ), ^|| InstanceUncommitted (" changes" , i , " User" ), ^|| InstanceUncommitted (" changes" , i , " Namespace" ))
237
238
}
238
- if i >= $get (qHandle (" changes" ),0 ) {
239
+ if i >= $get (^|| InstanceUncommitted (" changes" ),0 ) {
239
240
set AtEnd = 1
240
241
} else {
241
242
set qHandle (" i" ) = $increment (qHandle (" i" ))
0 commit comments