Skip to content

Commit 2e10749

Browse files
Improve config file handling in the incremental load pull event handler
Force import to start with as it was getting forced imported later anyway. Stop iterating through files once it has been imported. Don't import it a second time.
1 parent af1b42d commit 2e10749

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cls/SourceControl/Git/PullEventHandler/IncrementalLoad.cls

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ Method OnPull() As %Status
1515
for i=1:1:$get(..ModifiedFiles) {
1616
set internalName = ..ModifiedFiles(i).internalName
1717
if internalName = ##class(SourceControl.Git.Settings.Document).#INTERNALNAME {
18-
set sc = $$$ADDSC(sc, ##class(SourceControl.Git.Utils).ImportItem(internalName))
18+
set sc = $$$ADDSC(sc, ##class(SourceControl.Git.Utils).ImportItem(internalName, 1))
19+
quit
1920
}
2021
}
2122

2223
set nFiles = 0
2324

2425
for i=1:1:$get(..ModifiedFiles){
2526
set internalName = ..ModifiedFiles(i).internalName
27+
28+
// Don't import the config file a second time
29+
continue:internalName=##class(SourceControl.Git.Settings.Document).#INTERNALNAME
30+
2631
if ((internalName = "") && (..ModifiedFiles(i).changeType '= "D")) {
2732
write !, ..ModifiedFiles(i).externalName, " was not imported into the database and will not be compiled. "
2833
} elseif (..ModifiedFiles(i).changeType = "D") {

0 commit comments

Comments
 (0)