diff --git a/CHANGELOG.md b/CHANGELOG.md index 273dc6f7..c8198a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Import All now imports configuration file before everything else (#806) - Fixed another instance of deletes showing as owned by undefined user (#812) - Fix Revert not syncing files with IRIS (#789) +- Fix "Export All" stopping prematurely because a tracked item no longer exist in the namespace (#821) - Import All now outputs a warning instead of an error when an item is in the wrong path (#291) diff --git a/cls/SourceControl/Git/Utils.cls b/cls/SourceControl/Git/Utils.cls index bda31460..68828cf5 100644 --- a/cls/SourceControl/Git/Utils.cls +++ b/cls/SourceControl/Git/Utils.cls @@ -983,6 +983,7 @@ ClassMethod RemoveFromServerSideSourceControl(InternalName As %String) As %Statu if $data(@..#Storage@("items", item)) { kill @..#Storage@("items", item) + do ..RemoveRoutineTSH(item) do ..RemoveFolderIfEmpty(..TempFolder()) } elseif (type = "cls") { set tsc = ..MakeError(item _ " is not in SourceControl") @@ -1721,7 +1722,13 @@ ClassMethod ExportItem(InternalName As %String, expand As %Boolean = 1, force As write !, "Production decomposition enabled, skipping export of production class" set filename = "" } else { - $$$QuitOnError($system.OBJ.ExportUDL(InternalName, filename,"-d/diff")) + if '##class(%RoutineMgr).Exists(InternalName) { + write !?5, InternalName, " not found. Cleaning up source control." + do ..RemoveFromServerSideSourceControl(InternalName) + } + else { + $$$QuitOnError($SYSTEM.OBJ.ExportUDL(InternalName, filename,"-d/diff")) + } } if (filename '= "") && ##class(%File).Exists(filename) { set filenames($I(filenames)) = filename @@ -3282,3 +3289,4 @@ ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ] } } +