diff --git a/CHANGELOG.md b/CHANGELOG.md index 9461ee15..5c818bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.15.0] - Unreleased + +### Added +- Import All has been added to public-facing API (#891) + ## [2.14.0] - 2025-11-07 ### Added diff --git a/cls/SourceControl/Git/API.cls b/cls/SourceControl/Git/API.cls index 1f21f203..7b86a881 100644 --- a/cls/SourceControl/Git/API.cls +++ b/cls/SourceControl/Git/API.cls @@ -48,6 +48,13 @@ ClassMethod Pull(pTerminateOnError As %Boolean = 0) quit st } +/// Imports all items from the Git repository into IRIS. +/// - pForce: if true, will import an item even if the last updated timestamp in IRIS is later than that of the file on disk. +ClassMethod ImportAll(pForce As %Boolean = 0) as %Status +{ + return ##class(SourceControl.Git.Utils).ImportAll(pForce) +} + /// Locks the environment to prevent changes to code other than through git pull. /// Returns 1 if the environment was already locked, 0 if it was previously unlocked. ClassMethod Lock() diff --git a/module.xml b/module.xml index f330512c..91ff4754 100644 --- a/module.xml +++ b/module.xml @@ -3,7 +3,7 @@ git-source-control - 2.14.0 + 2.15.0 Server-side source control extension for use of Git on InterSystems platforms git source control studio vscode module diff --git a/test/UnitTest/SourceControl/Git/ImportAll.cls b/test/UnitTest/SourceControl/Git/ImportAll.cls index e8e1aba8..c9689bda 100644 --- a/test/UnitTest/SourceControl/Git/ImportAll.cls +++ b/test/UnitTest/SourceControl/Git/ImportAll.cls @@ -58,7 +58,7 @@ Method TestImportAll() do ..WriteFile(##class(SourceControl.Git.Settings).%New().namespaceTemp_"csp/git/unittest/xsl/test.xsl", " ") $$$ThrowOnError(##class(%Routine).Delete("test.mac")) do ##class(%RoutineMgr).Delete("/csp/git/unittest/xsl/test.xsl") - $$$ThrowOnError(##class(SourceControl.Git.Utils).ImportAll(1)) + $$$ThrowOnError(##class(SourceControl.Git.API).ImportAll(1)) do $$$AssertTrue(##class(%Routine).Exists("test.mac")) do $$$AssertTrue(##class(%RoutineMgr).Exists("/csp/git/unittest/xsl/test.xsl")) do $$$AssertFilesSame(##class(SourceControl.Git.Settings).%New().namespaceTemp_"csp/git/unittest/xsl/test.xsl", ..WebAppPath_"/test.xsl")