File tree Expand file tree Collapse file tree 4 files changed +70
-12
lines changed Expand file tree Collapse file tree 4 files changed +70
-12
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010### Added
1111- LoadProductionsFromDirectory method to help custom deployment scripts load decomposed productions from the repository (#670 )
1212- Added ability to reset head / revert most recent commit (#586 )
13+ - Changes deployed through Git are now logged in a new table SourceControl_Git.DeploymentLog
1314
1415### Fixed
1516- Fixed not showing warnings on Studio (#660 )
@@ -19,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1920- Improved performance of IDE editing and baselining of decomposed productions
2021- Fixed Discard / Stash not working on deletes (#688 )
2122- Fixed errors deploying decomposed production changes on Windows network drives (#696 )
23+ - Improved performance of deploying changes to decomposed production items (#690 )
2224
2325## [ 2.9.0] - 2025-01-09
2426
Original file line number Diff line number Diff line change 1+ Class SourceControl .Git .DeploymentLog Extends %Persistent [ Owner = {%Developer } ]
2+ {
3+
4+ Property Token As %String [ InitialExpression = {$System .Util .CreateGUID ()} ];
5+
6+ Property StartTimestamp As %TimeStamp ;
7+
8+ Property EndTimestamp As %TimeStamp ;
9+
10+ Property HeadRevision As %String ;
11+
12+ Property Status As %Status ;
13+
14+ Storage Default
15+ {
16+ <Data name =" DeploymentLogDefaultData" >
17+ <Value name =" 1" >
18+ <Value >%%CLASSNAME </Value >
19+ </Value >
20+ <Value name =" 2" >
21+ <Value >Token </Value >
22+ </Value >
23+ <Value name =" 3" >
24+ <Value >StartTimestamp </Value >
25+ </Value >
26+ <Value name =" 4" >
27+ <Value >EndTimestamp </Value >
28+ </Value >
29+ <Value name =" 5" >
30+ <Value >HeadRevision </Value >
31+ </Value >
32+ <Value name =" 6" >
33+ <Value >Status </Value >
34+ </Value >
35+ </Data >
36+ <DataLocation >^SourceContro22B9 .DeploymentLogD </DataLocation >
37+ <DefaultData >DeploymentLogDefaultData </DefaultData >
38+ <IdLocation >^SourceContro22B9 .DeploymentLogD </IdLocation >
39+ <IndexLocation >^SourceContro22B9 .DeploymentLogI </IndexLocation >
40+ <StreamLocation >^SourceContro22B9 .DeploymentLogS </StreamLocation >
41+ <Type >%Storage .Persistent </Type >
42+ }
43+
44+ }
Original file line number Diff line number Diff line change @@ -24,14 +24,29 @@ Method OnPull() As %Status [ Abstract ]
2424/// <var>pullEventClass</var>: if defined, override the configured pull event class
2525ClassMethod ForModifications (ByRef files , pullEventClass As %String ) As %Status
2626{
27- set event = $classmethod (
28- $select (
29- $data (pullEventClass )#2 : pullEventClass ,
30- 1 : ##class (SourceControl.Git.Utils ).PullEventClass ())
31- ," %New" )
32- set event .LocalRoot = ##class (SourceControl.Git.Utils ).TempFolder ()
33- merge event .ModifiedFiles = files
34- quit event .OnPull ()
27+ set st = $$$OK
28+ try {
29+ set log = ##class (SourceControl.Git.DeploymentLog ).%New ()
30+ set log .HeadRevision = ##class (SourceControl.Git.Utils ).GetCurrentRevision ()
31+ set log .StartTimestamp = $zdatetime ($ztimestamp ,3 )
32+ set st = log .%Save ()
33+ quit :$$$ISERR(st )
34+ set event = $classmethod (
35+ $select (
36+ $data (pullEventClass )#2 : pullEventClass ,
37+ 1 : ##class (SourceControl.Git.Utils ).PullEventClass ())
38+ ," %New" )
39+ set event .LocalRoot = ##class (SourceControl.Git.Utils ).TempFolder ()
40+ merge event .ModifiedFiles = files
41+ set st = event .OnPull ()
42+ set log .EndTimestamp = $zdatetime ($ztimestamp ,3 )
43+ set log .Status = st
44+ set st = log .%Save ()
45+ quit :$$$ISERR(st )
46+ } catch err {
47+ set st = err .AsStatus ()
48+ }
49+ quit st
3550}
3651
3752/// <var>InternalName</var> may be a comma-delimited string or $ListBuild list
Original file line number Diff line number Diff line change @@ -754,6 +754,7 @@ ClassMethod Exists(ByRef pFilename) As %Boolean
754754 Return 0
755755}
756756
757+ /// Adds this item to the list of items that are tracked by source control
757758ClassMethod AddToServerSideSourceControl (InternalName As %String ) As %Status
758759{
759760 #dim i as %Integer
@@ -764,10 +765,6 @@ ClassMethod AddToServerSideSourceControl(InternalName As %String) As %Status
764765 continue
765766 }
766767 set @..#Storage@(" items" , item ) = " "
767- #dim sc as %Status = ..ImportItem (item , 1 )
768- if 'sc {
769- set ec = $$$ADDSC(ec , sc )
770- }
771768 }
772769 quit ec
773770}
You can’t perform that action at this time.
0 commit comments