Skip to content
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 @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Baseline Export now includes decomposed production items when production decomposition is enabled (#680)
- Take Ownership option in source control menu allows you to take ownership of an item edited by another user (#926)
- The "warnInstanceWideUncommitted" option can now be changed through the settings page (#936)
- Added verbose option for BaselineExport

## Fixed
- Fixed `<VALUE OUT OF RANGE>` error in GetTempFileAndRoutineTS when an OS-level error code was stored as a routine timestamp (#832)
Expand Down
7 changes: 4 additions & 3 deletions cls/SourceControl/Git/API.cls
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ClassMethod Pull(pTerminateOnError As %Boolean = 0)

/// 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
ClassMethod ImportAll(pForce As %Boolean = 0) As %Status
{
return ##class(SourceControl.Git.Utils).ImportAll(pForce)
}
Expand All @@ -72,9 +72,10 @@ ClassMethod Unlock()
/// Run in terminal to baseline a namespace by adding all items to source control.
/// - pCommitMessage: if defined, all changes in namespace context will be committed.
/// - pPushToRemote: if defined, will run a git push to the specified remote
ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
/// - pVerbose: verbose output
ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "", pVerbose = 0) As %Status
{
quit ##class(SourceControl.Git.Utils).BaselineExport(pCommitMessage, pPushToRemote)
quit ##class(SourceControl.Git.Utils).BaselineExport(pCommitMessage, pPushToRemote, pVerbose)
}

ClassMethod MapEverywhere() As %Status
Expand Down
15 changes: 12 additions & 3 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -3138,7 +3138,7 @@ ClassMethod ResetSourceControlClass()
do ##class(%Studio.SourceControl.Interface).SourceControlClassSet("")
}

ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "", pVerbose = 0) As %Status
{
set sc = $$$OK
try {
Expand All @@ -3156,13 +3156,21 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
while rs.%Next(.sc) {
$$$ThrowOnError(sc)
set internalName = rs.Name
continue:..IsSchemaStandard(internalName)
write:pVerbose !, "baselining item: ", internalName
if ..IsSchemaStandard(internalName) {
write:pVerbose !?5, "skipping standard schema"
continue
}
// exclude items in a non-default IPM package
set context = ##class(SourceControl.Git.PackageManagerContext).ForInternalName(internalName)
continue:($isobject(context.Package) && 'context.IsInDefaultPackage)
if ($isobject(context.Package) && 'context.IsInDefaultPackage) {
write:pVerbose !?5, "skipping item in non-default IPM package"
continue
}
$$$ThrowOnError(..AddToSourceControl(internalName))
}
if settings.decomposeProductions && ##class(%Library.EnsembleMgr).IsEnsembleNamespace() {
write:pVerbose !, "baselining decomposed productions"
do ##class(SourceControl.Git.Util.Production).BaselineProductions()
}
if pCommitMessage '= "" {
Expand All @@ -3182,6 +3190,7 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
}
} catch err {
set sc = err.AsStatus()
write:pVerbose !, "Error baselining items: ", err.DisplayString()
}
return sc
}
Expand Down
Loading