Skip to content

Commit d423060

Browse files
authored
Merge pull request #435 from intersystems/keep-iris-sync-output
Keep iris sync output
2 parents f54ca38 + 97887d5 commit d423060

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- WebUI workspace view now works properly for filenames with spaces (#423)
1818
- Fixed error popups in interop editors in Studio on 2024.1 (#417)
1919
- Reintroduced amend (#425)
20+
- Git operations that import items into IRIS now report output from compilation (#426)
2021
- Double quotes now permissible in commit messages (#433)
2122

2223
## [2.4.0] - 2024-07-08

cls/SourceControl/Git/Utils.cls

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,10 +1767,36 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
17671767

17681768
if syncIrisWithDiff {
17691769
do ..PrintStreams(errStream, outStream)
1770-
$$$ThrowOnError(..SyncIrisWithRepoThroughDiff(.files, .filterToFiles, invert))
1770+
set buffer = ##class(SourceControl.Git.Util.Buffer).%New()
1771+
do buffer.BeginCaptureOutput()
1772+
set st = ..SyncIrisWithRepoThroughDiff(.files, .filterToFiles, invert)
1773+
set out = ##class(%Stream.GlobalCharacter).%New()
1774+
do buffer.EndCaptureOutput(.out)
1775+
if $$$ISOK(st) {
1776+
while 'out.AtEnd {
1777+
do outStream.WriteLine(out.ReadLine())
1778+
}
1779+
} else {
1780+
while 'out.AtEnd {
1781+
do errStream.WriteLine(out.ReadLine())
1782+
}
1783+
}
17711784
} elseif syncIrisWithCommand {
17721785
do ..PrintStreams(errStream, outStream)
1773-
$$$ThrowOnError(..SyncIrisWithRepoThroughCommand(.outStream))
1786+
set buffer = ##class(SourceControl.Git.Util.Buffer).%New()
1787+
do buffer.BeginCaptureOutput()
1788+
set st = ..SyncIrisWithRepoThroughCommand(.outStream)
1789+
set out = ##class(%Stream.Global).%New()
1790+
do buffer.EndCaptureOutput(.out)
1791+
if $$$ISOK(st) {
1792+
while 'out.AtEnd {
1793+
do outStream.WriteLine(out.ReadLine())
1794+
}
1795+
} else {
1796+
while 'out.AtEnd {
1797+
do errStream.WriteLine(out.ReadLine())
1798+
}
1799+
}
17741800
}
17751801
quit returnCode
17761802
}

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Class SourceControl.Git.WebUIDriver
33

44
ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Output handled As %Boolean = 0, Output %data As %Stream.Object)
55
{
6-
// Make sure we capture any stray output
7-
set buffer = ##class(SourceControl.Git.Util.Buffer).%New()
8-
do buffer.BeginCaptureOutput()
96
set context = ##class(SourceControl.Git.PackageManagerContext).ForInternalName(InternalName)
107
kill %data
118
#dim %response as %CSP.Response
@@ -165,7 +162,6 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
165162
}
166163
}
167164
}
168-
do buffer.EndCaptureOutput(.throwaway)
169165
}
170166

171167
ClassMethod UserInfo() As %SystemBase

0 commit comments

Comments
 (0)