Skip to content

Commit 633114d

Browse files
committed
Make sure we are using correct namespaces
1 parent 5599867 commit 633114d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

cls/SourceControl/Git/Change.cls

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,18 @@ ClassMethod InstanceUncommittedExecute(ByRef qHandle As %Binary) As %Status
198198
new $namespace
199199
while $LISTNEXT(namespaces, tPtr, tValue) {
200200
set namespace = $ZCONVERT(tValue, "U")
201-
set $NAMESPACE = namespace
202-
set statement = ##class(%SQL.Statement).%New()
203-
$$$ThrowOnError(statement.%Prepare(qHandle("q"), 0))
204-
set resultSet = statement.%Execute()
205-
throw:resultSet.%SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(resultSet.%SQLCODE,resultSet.%Message)
206-
while resultSet.%Next(.sc) {
207-
$$$ThrowOnError(sc)
208-
set qHandle("changes", $increment(qHandle("changes")), "InternalName") = resultSet.%GetData(1)
209-
set qHandle("changes", qHandle("changes"), "User") = resultSet.%GetData(2)
210-
set qHandle("changes", qHandle("changes"), "Namespace") = namespace
201+
if '(namespace [ "^") {
202+
set $NAMESPACE = namespace
203+
set statement = ##class(%SQL.Statement).%New()
204+
$$$ThrowOnError(statement.%Prepare(qHandle("q"), 0))
205+
set resultSet = statement.%Execute()
206+
throw:resultSet.%SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(resultSet.%SQLCODE,resultSet.%Message)
207+
while resultSet.%Next(.sc) {
208+
$$$ThrowOnError(sc)
209+
set qHandle("changes", $increment(qHandle("changes")), "InternalName") = resultSet.%GetData(1)
210+
set qHandle("changes", qHandle("changes"), "User") = resultSet.%GetData(2)
211+
set qHandle("changes", qHandle("changes"), "Namespace") = namespace
212+
}
211213
}
212214
}
213215

0 commit comments

Comments
 (0)