@@ -202,24 +202,25 @@ Query InstanceUncommitted() As %Query(ROWSPEC = "InternalName:%String,User:%Stri
202202
203203ClassMethod InstanceUncommittedExecute (ByRef qHandle As %Binary ) As %Status
204204{
205- set qHandle ( " q " ) = " SELECT InternalName, ChangedBy FROM SourceControl_Git.Change "
205+ set initNS = $namespace
206206 &sql (DECLARE InstanceCursor CURSOR FOR SELECT InternalName, ChangedBy into :internalName, :changedBy from SourceControl_Git .Change )
207207 set namespaces = ##class (SourceControl.Git.Utils ).GetGitEnabledNamespaces ()
208208 set tPtr = 0
209209 set qHandle (" i" ) = 1
210210 new $namespace
211+ kill ^||InstanceUncommitted
211212 while $LISTNEXT (namespaces , tPtr , tValue ) {
212213 set namespace = $ZCONVERT (tValue , " U" )
213- if '(namespace [ " ^" ) {
214+ if '(namespace [ " ^" ) && ( namespace '= initNS ) {
214215 set $NAMESPACE = namespace
215216
216217 &sql (OPEN InstanceCursor)
217218 throw :SQLCODE <0 ##class (%Exception.SQL ).CreateFromSQLCODE (SQLCODE , %msg )
218219 &sql (FETCH InstanceCursor)
219220 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
223224 &sql (FETCH InstanceCursor)
224225 }
225226 &sql (CLOSE InstanceCursor)
@@ -232,10 +233,10 @@ ClassMethod InstanceUncommittedExecute(ByRef qHandle As %Binary) As %Status
232233ClassMethod InstanceUncommittedFetch (ByRef qHandle As %Binary , ByRef Row As %List , ByRef AtEnd As %Integer = 0 ) As %Status [ PlaceAfter = InstanceUncommittedExecute ]
233234{
234235 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" ))
237238 }
238- if i >= $get (qHandle (" changes" ),0 ) {
239+ if i >= $get (^|| InstanceUncommitted (" changes" ),0 ) {
239240 set AtEnd = 1
240241 } else {
241242 set qHandle (" i" ) = $increment (qHandle (" i" ))
0 commit comments