File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -1567,14 +1567,42 @@ ClassMethod ImportRoutines(force As %Boolean = 0, pullEventClass As %String) As
1567
1567
1568
1568
#dim ec as %Status = ..ListItemsInFiles (.itemList , .err )
1569
1569
quit :'ec ec
1570
-
1570
+
1571
+ // If there is a config file it must be imported before everything else.
1572
+ set internalName = " "
1573
+ for {
1574
+ set internalName = $order (itemList (internalName ))
1575
+ quit :internalName =" "
1576
+
1577
+ // If a config file is found then import it
1578
+ if internalName = ##class (SourceControl.Git.Settings.Document ).#INTERNALNAME {
1579
+ set sc = ##class (SourceControl.Git.Utils ).ImportItem (internalName , force )
1580
+
1581
+ if $$$ISERR(sc ) {
1582
+ set ec = $$$ADDSC(ec , sc )
1583
+ } else {
1584
+ kill err , itemList
1585
+ set err = 0
1586
+
1587
+ // Get the item list again as it may be different after just importing the config file
1588
+ set ec = $$$ADDSC(ec , ..ListItemsInFiles (.itemList , .err ))
1589
+ }
1590
+ quit
1591
+ }
1592
+ }
1593
+ quit :'ec ec
1594
+
1571
1595
kill files
1572
1596
1573
1597
set settings = ##class (SourceControl.Git.Settings ).%New ()
1574
1598
#dim internalName as %String = " "
1575
1599
for {
1576
1600
set internalName = $order (itemList (internalName ))
1577
1601
quit :internalName =" "
1602
+
1603
+ // Don't import the config file a second time
1604
+ continue :internalName =##class (SourceControl.Git.Settings.Document ).#INTERNALNAME
1605
+
1578
1606
set context = ##class (SourceControl.Git.PackageManagerContext ).ForInternalName (internalName )
1579
1607
continue :context .Package '=refPackage
1580
1608
set doImport = ..IsRoutineOutdated (internalName ) || force
You can’t perform that action at this time.
0 commit comments