Skip to content

Commit ebf34b1

Browse files
committed
fix: import all sets external name properly when calling pull event handler
Only really relevant for deletes of PTD items
1 parent c6e7c5e commit ebf34b1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cls/SourceControl/Git/Modification.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Class SourceControl.Git.Modification Extends %RegisteredObject
33
{
44

5-
/// path of the file
5+
/// path of the file relative to the Git repository
66
Property externalName As %String;
77

88
/// Name in IRIS SourceControl.Git.Modification
@@ -11,4 +11,4 @@ Property internalName As %String;
1111
/// Type of change (A|C|D|M|R|T|U|X|B). See git diff documentation.
1212
Property changeType As %String;
1313

14-
}
14+
}

cls/SourceControl/Git/Utils.cls

+3-2
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ ClassMethod ImportRoutines(force As %Boolean = 0) As %Status
15731573
set modification = ##class(SourceControl.Git.Modification).%New()
15741574
set modification.changeType = "M"
15751575
set modification.internalName = internalName
1576-
set modification.externalName = ..FullExternalName(internalName)
1576+
set modification.externalName = ..ExternalName(internalName)
15771577
set files($increment(files)) = modification
15781578
}
15791579
}
@@ -1588,13 +1588,14 @@ ClassMethod ImportRoutines(force As %Boolean = 0) As %Status
15881588
set context = ##class(SourceControl.Git.PackageManagerContext).ForInternalName(item)
15891589
continue:context.Package'=refPackage
15901590

1591+
set externalName = ..ExternalName(item)
15911592
set fullExternalName = ..FullExternalName(item)
15921593
if '##class(%File).Exists(fullExternalName) {
15931594
write !,fullExternalName," does not exist - deleting ",item
15941595
set modification = ##class(SourceControl.Git.Modification).%New()
15951596
set modification.changeType = "D"
15961597
set modification.internalName = item
1597-
set modification.externalName = fullExternalName
1598+
set modification.externalName = externalName
15981599
set files($increment(files)) = modification
15991600
}
16001601
}

0 commit comments

Comments
 (0)