File tree 4 files changed +70
-12
lines changed
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
10
10
### Added
11
11
- LoadProductionsFromDirectory method to help custom deployment scripts load decomposed productions from the repository (#670 )
12
12
- 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
13
14
14
15
### Fixed
15
16
- 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
19
20
- Improved performance of IDE editing and baselining of decomposed productions
20
21
- Fixed Discard / Stash not working on deletes (#688 )
21
22
- Fixed errors deploying decomposed production changes on Windows network drives (#696 )
23
+ - Improved performance of deploying changes to decomposed production items (#690 )
22
24
23
25
## [ 2.9.0] - 2025-01-09
24
26
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 ]
24
24
/// <var>pullEventClass</var>: if defined, override the configured pull event class
25
25
ClassMethod ForModifications (ByRef files , pullEventClass As %String ) As %Status
26
26
{
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
35
50
}
36
51
37
52
/// <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
754
754
Return 0
755
755
}
756
756
757
+ /// Adds this item to the list of items that are tracked by source control
757
758
ClassMethod AddToServerSideSourceControl (InternalName As %String ) As %Status
758
759
{
759
760
#dim i as %Integer
@@ -764,10 +765,6 @@ ClassMethod AddToServerSideSourceControl(InternalName As %String) As %Status
764
765
continue
765
766
}
766
767
set @..#Storage@(" items" , item ) = " "
767
- #dim sc as %Status = ..ImportItem (item , 1 )
768
- if 'sc {
769
- set ec = $$$ADDSC(ec , sc )
770
- }
771
768
}
772
769
quit ec
773
770
}
You can’t perform that action at this time.
0 commit comments