File tree Expand file tree Collapse file tree 2 files changed +41
-22
lines changed
cls/SourceControl/Git/PullEventHandler Expand file tree Collapse file tree 2 files changed +41
-22
lines changed Original file line number Diff line number Diff line change 1
1
Include SourceControl .Git
2
2
3
- Class SourceControl .Git .PullEventHandler .Default Extends SourceControl .Git .PullEventHandler
3
+ Class SourceControl .Git .PullEventHandler .Default Extends ( SourceControl .Git .PullEventHandler . IncrementalLoad , SourceControl . Git . PullEventHandler . PackageManager )
4
4
{
5
5
6
6
Parameter NAME = " Default" ;
7
7
8
- Parameter DESCRIPTION = " Performs an incremental load and compile of all changes pulled ." ;
8
+ Parameter DESCRIPTION = " Does a zpm " " load <repo root> " " for PackageManager-enabled repos and an incremental load otherwise ." ;
9
9
10
10
Method OnPull () As %Status
11
11
{
12
- set loadSC = $$$OK
13
- set nFiles = 0
14
- for i =1 :1 :$Get (..ModifiedFiles ) {
15
- if $Data (files (i ))#2 {
16
- set internalName = ##class (SourceControl.Git.Utils ).NameToInternalName (..ModifiedFiles (i ))
17
- if (internalName = " " ) {
18
- write files (i ), " was not imported into the database and will not be compiled. " , !
19
- } else {
20
- set compilelist (internalName ) = " "
21
- set nFiles = nFiles + 1
22
- set loadSC = $$$ADDSC(loadSC ,##class (SourceControl.Git.Utils ).ImportItem (internalName , 1 ))
23
- }
24
- }
12
+ If ##class (%Library.File ).Exists (##class (%Library.File ).NormalizeFilename (" module.xml" ,..LocalRoot )) {
13
+ Quit ##class (SourceControl.Git.PullEventHandler.PackageManager )$This .OnPull ()
25
14
}
26
-
27
- if (nFiles = 0 ) {
28
- write " Nothing to compile." ,!
29
- quit $$$OK
30
- }
31
-
32
- Quit $System .OBJ .CompileList (.compilelist , " cukb" )
15
+ Quit ##class (SourceControl.Git.PullEventHandler.IncrementalLoad )$This .OnPull ()
33
16
}
34
17
35
18
}
Original file line number Diff line number Diff line change
1
+ Include SourceControl .Git
2
+
3
+ Class SourceControl .Git .PullEventHandler .Default Extends SourceControl .Git .PullEventHandler
4
+ {
5
+
6
+ Parameter NAME = " Incremental Load" ;
7
+
8
+ Parameter DESCRIPTION = " Performs an incremental load and compile of all changes pulled." ;
9
+
10
+ Method OnPull () As %Status
11
+ {
12
+ set loadSC = $$$OK
13
+ set nFiles = 0
14
+ for i =1 :1 :$Get (..ModifiedFiles ) {
15
+ if $Data (files (i ))#2 {
16
+ set internalName = ##class (SourceControl.Git.Utils ).NameToInternalName (..ModifiedFiles (i ))
17
+ if (internalName = " " ) {
18
+ write files (i ), " was not imported into the database and will not be compiled. " , !
19
+ } else {
20
+ set compilelist (internalName ) = " "
21
+ set nFiles = nFiles + 1
22
+ set loadSC = $$$ADDSC(loadSC ,##class (SourceControl.Git.Utils ).ImportItem (internalName , 1 ))
23
+ }
24
+ }
25
+ }
26
+
27
+ if (nFiles = 0 ) {
28
+ write " Nothing to compile." ,!
29
+ quit $$$OK
30
+ }
31
+
32
+ Quit $System .OBJ .CompileList (.compilelist , " cukb" )
33
+ }
34
+
35
+ }
36
+
You can’t perform that action at this time.
0 commit comments