Skip to content

Commit 777faba

Browse files
authored
Merge pull request #849 from raymond-rebbeck/main
Fix pull failure when deleted items have no internal or external name
2 parents a9892a3 + 9165ff9 commit 777faba

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111
- Fixed Import All deploying changes to files in a CSP application (#828)
12+
- Fixed pull failure when deleted items have no internal or external name (#848)
1213

1314
## [2.13.0] - 2025-08-20
1415

cls/SourceControl/Git/PullEventHandler/IncrementalLoad.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Method DeleteFile(item As %String = "", externalName As %String = "") As %Status
117117
$$$ThrowOnError(sc)
118118
} catch e {
119119
set filename = ##class(SourceControl.Git.Utils).FullExternalName(item)
120-
if '##class(%File).Exists(filename) {
120+
if (filename = "") || '##class(%File).Exists(filename) {
121121
do ##class(SourceControl.Git.Utils).RemoveRoutineTSH(item)
122122
// file doesn't exist anymore despite error -- should be ok
123123
set sc = $$$OK

cls/SourceControl/Git/Utils.cls

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,8 +1337,14 @@ ClassMethod UpdateRoutineTSH(InternalName As %String, tsh As %String) As %Status
13371337

13381338
ClassMethod RemoveRoutineTSH(InternalName As %String) As %Status
13391339
{
1340-
kill @..#Storage@("TSH", ##class(%Studio.SourceControl.Interface).normalizeName(InternalName))
1341-
quit $$$OK
1340+
Quit:(InternalName = "") $$$OK
1341+
Set tInternalName = ##class(%Studio.SourceControl.Interface).normalizeName(InternalName)
1342+
1343+
// Prevent a possible null subscript error
1344+
Quit:(tInternalName = "") $$$OK
1345+
Kill @..#Storage@("TSH", tInternalName)
1346+
1347+
Quit $$$OK
13421348
}
13431349

13441350
ClassMethod DeleteExternalFile(InternalName As %String) As %Status

0 commit comments

Comments
 (0)