Skip to content

Commit 659a268

Browse files
authored
Merge pull request #625 from intersystems/new-branch-errors
Errors switching to new branch are reported to UI
2 parents 9320089 + 0f88702 commit 659a268

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.7.1] - Unreleased
9+
10+
### Fixed
11+
- Creating a new branch now reports the error if uncommitted changes conflict (#624)
12+
813
## [2.7.0] - 2024-11-04
914

1015
### Added

cls/SourceControl/Git/Utils.cls

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,17 @@ ClassMethod NewBranch(newBranchName As %String) As %Status
395395
{
396396
set settings = ##class(SourceControl.Git.Settings).%New()
397397
if (settings.basicMode) && (settings.defaultMergeBranch '= ""){
398-
do ..RunGitWithArgs(.errStream, .outStream, "checkout", settings.defaultMergeBranch)
398+
set err = ..RunGitWithArgs(.errStream, .outStream, "checkout", settings.defaultMergeBranch)
399399
do ..PrintStreams(errStream, outStream)
400+
if (err) {
401+
quit $$$ERROR($$$GeneralError,errStream.Read()_$c(10)_"Current branch is: "_..GetCurrentBranch())
402+
}
400403
kill errStream, outStream
401-
do ..RunGitWithArgs(.errStream, .outStream, "pull")
404+
set err = ..RunGitWithArgs(.errStream, .outStream, "pull")
402405
do ..PrintStreams(errStream, outStream)
406+
if (err) {
407+
quit $$$ERROR($$$GeneralError,errStream.Read()_$c(10)_"Current branch is: "_..GetCurrentBranch())
408+
}
403409
kill errStream, outStream
404410
}
405411

@@ -2938,3 +2944,4 @@ ClassMethod InDefaultBranchBasicMode() As %Boolean
29382944
}
29392945

29402946
}
2947+

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Document name="git-source-control.ZPM">
44
<Module>
55
<Name>git-source-control</Name>
6-
<Version>2.7.0</Version>
6+
<Version>2.7.1</Version>
77
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
88
<Keywords>git source control studio vscode</Keywords>
99
<Packaging>module</Packaging>

0 commit comments

Comments
 (0)