Skip to content

Commit 1c9072c

Browse files
authored
Merge pull request #910 from intersystems/export-storage-def
Storage definition changes export to Git repo
2 parents 04c5f8a + f4e34d4 commit 1c9072c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
## Fixed
1515
- Web UI workspace view labels changes as Merge Conflict if there are unmerged changes (#890)
1616
- Web UI workspace view displays diff correctly for files with merge conflicts (#898)
17+
- Storage definition changes in persistent classes are now correctly exported to the Git repository (#906)
1718

1819
## [2.14.0] - 2025-11-07
1920

cls/SourceControl/Git/Extension.cls

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,22 @@ Method OnAfterDelete(InternalName As %String) As %Status
441441
quit $$$OK
442442
}
443443

444+
/// This is called if you compile a class and the compilation updates the class storage.
445+
/// It is called after the storage has been updated so you can determine how to deal with this
446+
/// change in the class. The <var>Location</var> is the global reference to the class definition that was changed.
447+
Method OnAfterStorage(InternalName As %String, Location As %String = "") As %Status
448+
{
449+
if (InternalName '= "") {
450+
write !,"Item '"_InternalName_"' changed during compile so exporting new version."
451+
set ..Modified(InternalName) = 1
452+
set sc = ..OnAfterSave(InternalName)
453+
if $$$ISERR(sc) {
454+
do $System.OBJ.DisplayError(sc)
455+
}
456+
}
457+
return $$$OK
458+
}
459+
444460
/// Convert the internal name, e.g. TEST.MAC, to an external name that is used to export
445461
/// the routine/class/csp item. This is often a filename to write the file out to.
446462
Method ExternalName(InternalName As %String) As %String

0 commit comments

Comments
 (0)