Server-side source control hooks for InterSystems' platforms to facilitate use of git, especially in shared and/or remote development environments and for interoperability graphical editors
12
stars
8
forks
source link
NameToInternalName on LUT (for example) could convert _ to % #588
SourceControl.Git.Utils:NameToInternalName could potentially switch _ to % on import of a lookup table (.LUT) document:
if (InternalName="") {
//take our best guess based on the document extension mapped to that subdirectory
set nam=$piece(nam,".",1,*-1)
set nam=$replace(nam, ..PercentClassReplace(), "%")
set nam=$translate(nam,"/",".")
set InternalName=nam_"."_fileExt
if (fileExt="cls") {
// special handling for possible collissions between % and non-% classes of the same name
set alternateInternalName="%"_InternalName
set primaryExists=##class(%RoutineMgr).Exists(InternalName), alternateExists=##class(%RoutineMgr).Exists(alternateInternalName)
if ('primaryExists)&&(alternateExists) { set InternalName=alternateInternalName } // it must have been a %-class as one by that name exists
if (primaryExists)&&(alternateExists) { quit "" } //indeterminate as the class exists in % and non-% form in the DB
}
}
I haven't reproduced this but it seems like the only path to explain what's happening. PercentClassReplace should only apply to classes/routines/include files, not user types and definitely not automatically reverse-translating.
SourceControl.Git.Utils:NameToInternalName could potentially switch _ to % on import of a lookup table (.LUT) document:
I haven't reproduced this but it seems like the only path to explain what's happening. PercentClassReplace should only apply to classes/routines/include files, not user types and definitely not automatically reverse-translating.