You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file is added to source control (e.g. "murks.int") this is done internally by calling ##class(SourceControl.Git.Utils).AddToSourceControl() which calls ##class(SourceControl.Git.Utils).NormalizeExtension() to convert the file extension to lowercase and adds an entry to ^SYS("SourceControl","Git","items"...).
The function ##class(SourceControl.Git.Utils).GitStatus() is called, too, and if an internal name is found to an external name, it sets an entry in ^SYS after calling ##class(SourceControl.Git.Utils).NormalizeInternalName() which converts the file extension to uppercase.
This leads to two entries in ^SYS:
^SYS("SourceControl","Git","items","murks.INT") = ""
^SYS("SourceControl","Git","items","murks.int") = ""
Thus calling "Export All (Force)" exports each file twice.
Removing a file from source control with ##class(SourceControl.Git.Utils).RemoveFromSourceControl() removes only the entry with lowercase extension, so "Export All (Force)" is still trying to export "murks.INT".
When the file is deleted, "Export All (Force)" will fail, because it cannot find the file though it is listed in ^SYS
In order to have this work consistently ##class(SourceControl.Git.Utils).NormalizeInternalName() should convert the extension to lowercase, too.
Before:
if ($extract(name) '= "/") && (type'="csp") {
quit $piece(name,".",1,*-1)_"."_$zconvert($piece(name,".",*),"U")
}
After:
if ($extract(name) '= "/") && (type'="csp") {
quit $piece(name,".",1,*-1)_"."_$zconvert($piece(name,".",*),"L")
}
The text was updated successfully, but these errors were encountered:
Letting ##class(SourceControl.Git.Utils).NormalizeInternalName() as it was before (with conversion to uppercase)
and change ##class(SourceControl.Git.Utils).GitStatus() instead:
@@ -2272,7 +2272,9 @@ ClassMethod GitStatus(ByRef files, IncludeAllFiles = 0)
set internalName = ..NameToInternalName(externalName,,0)
if (internalName '= "") {
set files(internalName) = $listbuild(operation, externalName)
+ set thename=..NormalizeInternalName(internalName)
+ set $piece(thename,".",*)=$zconvert($piece(thename,".",*),"l")
+ set @..#Storage@("items",thename) = ""
} elseif ((IncludeAllFiles) && (externalName '= "")) {
set externalName = $TRANSLATE(externalName, "\", "/")
set files($I(files)) = $listbuild(operation, externalName)
This way committing classes is working, too, and duplicate entries are avoided.
When a file is added to source control (e.g. "
murks.int
") this is done internally by calling##class(SourceControl.Git.Utils).AddToSourceControl()
which calls##class(SourceControl.Git.Utils).NormalizeExtension()
to convert the file extension to lowercase and adds an entry to^SYS("SourceControl","Git","items"...)
.The function
##class(SourceControl.Git.Utils).GitStatus()
is called, too, and if an internal name is found to an external name, it sets an entry in^SYS
after calling##class(SourceControl.Git.Utils).NormalizeInternalName()
which converts the file extension to uppercase.This leads to two entries in
^SYS
:^SYS("SourceControl","Git","items","murks.INT") = ""
^SYS("SourceControl","Git","items","murks.int") = ""
Thus calling "Export All (Force)" exports each file twice.
Removing a file from source control with
##class(SourceControl.Git.Utils).RemoveFromSourceControl()
removes only the entry with lowercase extension, so "Export All (Force)" is still trying to export "murks.INT".When the file is deleted, "Export All (Force)" will fail, because it cannot find the file though it is listed in
^SYS
In order to have this work consistently
##class(SourceControl.Git.Utils).NormalizeInternalName()
should convert the extension to lowercase, too.Before:
After:
The text was updated successfully, but these errors were encountered: