Skip to content

Keep iris sync output #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- WebUI workspace view now works properly for filenames with spaces (#423)
- Fixed error popups in interop editors in Studio on 2024.1 (#417)
- Reintroduced amend (#425)
- Git operations that import items into IRIS now report output from compilation (#426)
- Double quotes now permissible in commit messages (#433)

## [2.4.0] - 2024-07-08
Expand Down
30 changes: 28 additions & 2 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1767,10 +1767,36 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O

if syncIrisWithDiff {
do ..PrintStreams(errStream, outStream)
$$$ThrowOnError(..SyncIrisWithRepoThroughDiff(.files, .filterToFiles, invert))
set buffer = ##class(SourceControl.Git.Util.Buffer).%New()
do buffer.BeginCaptureOutput()
set st = ..SyncIrisWithRepoThroughDiff(.files, .filterToFiles, invert)
set out = ##class(%Stream.GlobalCharacter).%New()
do buffer.EndCaptureOutput(.out)
if $$$ISOK(st) {
while 'out.AtEnd {
do outStream.WriteLine(out.ReadLine())
}
} else {
while 'out.AtEnd {
do errStream.WriteLine(out.ReadLine())
}
}
} elseif syncIrisWithCommand {
do ..PrintStreams(errStream, outStream)
$$$ThrowOnError(..SyncIrisWithRepoThroughCommand(.outStream))
set buffer = ##class(SourceControl.Git.Util.Buffer).%New()
do buffer.BeginCaptureOutput()
set st = ..SyncIrisWithRepoThroughCommand(.outStream)
set out = ##class(%Stream.Global).%New()
do buffer.EndCaptureOutput(.out)
if $$$ISOK(st) {
while 'out.AtEnd {
do outStream.WriteLine(out.ReadLine())
}
} else {
while 'out.AtEnd {
do errStream.WriteLine(out.ReadLine())
}
}
}
quit returnCode
}
Expand Down
4 changes: 0 additions & 4 deletions cls/SourceControl/Git/WebUIDriver.cls
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ Class SourceControl.Git.WebUIDriver

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

ClassMethod UserInfo() As %SystemBase
Expand Down
Loading