diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a8e33e8..1dbba46d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Now skips files belonging to other git enabled packages in `##class(SourceControl.Git.Change).RefreshUncommitted()` (#347) - Added a new "Branch" parameter to `##class(SourceControl.Git.PullEventHandler)` (#351) - Command-line utility to do a baseline export of items in a namespace -- 'New Branch' menu option in basic now will create new branches from the configured default merge branch -- Merging back with the default merge branch is now a part of the basic mode's Sync flow +- 'New Branch' menu option in basic now will create new branches from the configured default merge branch (#366) +- Merging back with the default merge branch is now a part of the basic mode's Sync flow (#366) ### Fixed +- Modifications to local repo files are now synced with IRIS (#153) - Menu items names are properly translated from internal name in VSCode, Management Portal (#372) ## [2.3.1] - 2024-04-30 diff --git a/cls/SourceControl/Git/API.cls b/cls/SourceControl/Git/API.cls index 132e2d52..0e10964e 100644 --- a/cls/SourceControl/Git/API.cls +++ b/cls/SourceControl/Git/API.cls @@ -37,9 +37,9 @@ ClassMethod Configure() } /// API for git pull - just wraps Utils -ClassMethod Pull(preview As %Boolean = 0) +ClassMethod Pull() { - quit ##class(SourceControl.Git.Utils).Pull(,.preview) + quit ##class(SourceControl.Git.Utils).Pull() } /// Locks the environment to prevent changes to code other than through git pull. @@ -65,3 +65,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status } } + diff --git a/cls/SourceControl/Git/Utils.cls b/cls/SourceControl/Git/Utils.cls index 5ed3bf0b..85791da9 100644 --- a/cls/SourceControl/Git/Utils.cls +++ b/cls/SourceControl/Git/Utils.cls @@ -468,89 +468,17 @@ ClassMethod GetCurrentBranch() As %String quit branchName } -ClassMethod Pull(remote As %String = "origin", preview As %Boolean = 0) As %Status +ClassMethod Pull(remote As %String = "origin") As %Status { #define Force 1 do ##class(SourceControl.Git.Utils).RunGitCommandWithInput("branch",,.errStream,.outStream,"--show-current") set branchName = outStream.ReadLine(outStream.Size) write !, "Pulling from branch: ", branchName - - set sc = ##class(SourceControl.Git.Utils).RunGitCommandWithInput("fetch",,.errStream,.outStream, remote, branchName) - if (sc=1){ - do ..PrintStreams(errStream) - quit sc - } - - write !, "Fetch done" - write !, "Files that will be modified by git pull: " - - do ##class(SourceControl.Git.Utils).RunGitCommandWithInput("diff",,.errStream,.outStream, branchName_".."_remote_"/"_branchName, "--name-status") - while (outStream.AtEnd = 0) { - set file = outStream.ReadLine() - set modification = ##class(SourceControl.Git.Modification).%New() - set modification.changeType = $piece(file, $c(9), 1) - set modification.externalName = $zstrip($piece(file, $c(9),2),"