Skip to content

Commit 8aa09fd

Browse files
authored
Merge pull request #825 from cambot/bugfix/exportAll-better-handle-deleted-items
Fix: Export All better handles missing items.
2 parents 76ba8fa + c79414a commit 8aa09fd

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Import All now imports configuration file before everything else (#806)
1818
- Fixed another instance of deletes showing as owned by undefined user (#812)
1919
- Fix Revert not syncing files with IRIS (#789)
20+
- Fix "Export All" stopping prematurely because a tracked item no longer exist in the namespace (#821)
2021
- Import All now outputs a warning instead of an error when an item is in the wrong path (#291)
2122

2223

cls/SourceControl/Git/Utils.cls

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ ClassMethod RemoveFromServerSideSourceControl(InternalName As %String) As %Statu
983983

984984
if $data(@..#Storage@("items", item)) {
985985
kill @..#Storage@("items", item)
986+
do ..RemoveRoutineTSH(item)
986987
do ..RemoveFolderIfEmpty(..TempFolder())
987988
} elseif (type = "cls") {
988989
set tsc = ..MakeError(item _ " is not in SourceControl")
@@ -1721,7 +1722,13 @@ ClassMethod ExportItem(InternalName As %String, expand As %Boolean = 1, force As
17211722
write !, "Production decomposition enabled, skipping export of production class"
17221723
set filename = ""
17231724
} else {
1724-
$$$QuitOnError($system.OBJ.ExportUDL(InternalName, filename,"-d/diff"))
1725+
if '##class(%RoutineMgr).Exists(InternalName) {
1726+
write !?5, InternalName, " not found. Cleaning up source control."
1727+
do ..RemoveFromServerSideSourceControl(InternalName)
1728+
}
1729+
else {
1730+
$$$QuitOnError($SYSTEM.OBJ.ExportUDL(InternalName, filename,"-d/diff"))
1731+
}
17251732
}
17261733
if (filename '= "") && ##class(%File).Exists(filename) {
17271734
set filenames($I(filenames)) = filename
@@ -3282,3 +3289,4 @@ ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ]
32823289
}
32833290

32843291
}
3292+

0 commit comments

Comments
 (0)