Skip to content

Fix: Export All better handles missing items. #825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
10 changes: 9 additions & 1 deletion cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3282,3 +3289,4 @@ ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ]
}

}

Loading