@@ -1578,20 +1578,27 @@ ClassMethod ImportRoutines(force As %Boolean = 0, pullEventClass As %String) As
1578
1578
set context = ##class (SourceControl.Git.PackageManagerContext ).ForInternalName (internalName )
1579
1579
continue :context .Package '=refPackage
1580
1580
set doImport = ..IsRoutineOutdated (internalName ) || force
1581
- if ..IsInSourceControl (internalName ) {
1582
- set sc = ..ImportItem (internalName , force )
1583
- } else {
1581
+ if '..IsInSourceControl (internalName ) {
1584
1582
set sc = ..AddToServerSideSourceControl (internalName )
1583
+ if $$$ISERR(sc ) {
1584
+ set ec = $$$ADDSC(ec , sc )
1585
+ }
1585
1586
}
1586
- if $$$ISERR(sc ) {
1587
- set ec = $$$ADDSC(ec , sc )
1588
- }
1589
- if doImport && settings .compileOnImport {
1590
- set modification = ##class (SourceControl.Git.Modification ).%New ()
1591
- set modification .changeType = " M"
1592
- set modification .internalName = internalName
1593
- set modification .externalName = ..ExternalName (internalName )
1594
- set files ($increment (files )) = modification
1587
+ if doImport {
1588
+ // If compiling then allow the pull event handler to import
1589
+ if (settings .compileOnImport ) {
1590
+ set modification = ##class (SourceControl.Git.Modification ).%New ()
1591
+ set modification .changeType = " M"
1592
+ set modification .internalName = internalName
1593
+ set modification .externalName = ..ExternalName (internalName )
1594
+ set files ($increment (files )) = modification
1595
+ } else {
1596
+ // If not compiling then import now as otherwise it won't happen
1597
+ set sc = ..ImportItem (internalName , force )
1598
+ if $$$ISERR(sc ) {
1599
+ set ec = $$$ADDSC(ec , sc )
1600
+ }
1601
+ }
1595
1602
}
1596
1603
}
1597
1604
0 commit comments