Skip to content

Errors switching to new branch are reported to UI #625

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 2 commits into from
Nov 8, 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.7.1] - Unreleased

### Fixed
- Creating a new branch now reports the error if uncommitted changes conflict (#624)

## [2.7.0] - 2024-11-04

### Added
Expand Down
11 changes: 9 additions & 2 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,17 @@ ClassMethod NewBranch(newBranchName As %String) As %Status
{
set settings = ##class(SourceControl.Git.Settings).%New()
if (settings.basicMode) && (settings.defaultMergeBranch '= ""){
do ..RunGitWithArgs(.errStream, .outStream, "checkout", settings.defaultMergeBranch)
set err = ..RunGitWithArgs(.errStream, .outStream, "checkout", settings.defaultMergeBranch)
do ..PrintStreams(errStream, outStream)
if (err) {
quit $$$ERROR($$$GeneralError,errStream.Read()_$c(10)_"Current branch is: "_..GetCurrentBranch())
}
kill errStream, outStream
do ..RunGitWithArgs(.errStream, .outStream, "pull")
set err = ..RunGitWithArgs(.errStream, .outStream, "pull")
do ..PrintStreams(errStream, outStream)
if (err) {
quit $$$ERROR($$$GeneralError,errStream.Read()_$c(10)_"Current branch is: "_..GetCurrentBranch())
}
kill errStream, outStream
}

Expand Down Expand Up @@ -2938,3 +2944,4 @@ ClassMethod InDefaultBranchBasicMode() As %Boolean
}

}

2 changes: 1 addition & 1 deletion module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Document name="git-source-control.ZPM">
<Module>
<Name>git-source-control</Name>
<Version>2.7.0</Version>
<Version>2.7.1</Version>
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
<Keywords>git source control studio vscode</Keywords>
<Packaging>module</Packaging>
Expand Down
Loading