Skip to content

Commit 2398ac0

Browse files
committed
Revert "fix: git pull now successfully deletes production config items"
This reverts commit 9024dac.
1 parent dd221fc commit 2398ac0

File tree

2 files changed

+6
-39
lines changed

2 files changed

+6
-39
lines changed

cls/SourceControl/Git/Util/ProductionItemCache.cls

Lines changed: 0 additions & 26 deletions
This file was deleted.

cls/SourceControl/Git/Utils.cls

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,9 +2157,7 @@ ClassMethod Name(InternalName As %String, ByRef MappingExists As %Boolean) As %S
21572157
quit $translate(found_$translate(InternalName,"%","_"),"\","/")
21582158
} elseif (..Type(InternalName) = "ptd") {
21592159
do ##class(SourceControl.Git.Production).ParseInternalName(InternalName,'default,.filename)
2160-
set externalName = $translate(found_filename, "\","/")
2161-
do ##class(SourceControl.Git.Util.ProductionItemCache).Store(..TempFolder()_externalName, InternalName)
2162-
return externalName
2160+
return $translate(found_filename, "\","/")
21632161
} elseif ext="CLS"||(ext="PRJ")||usertype {
21642162
set nam=$replace(nam,"%", ..PercentClassReplace())
21652163
if default{
@@ -2225,6 +2223,10 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
22252223
}
22262224
if (##class(%File).Exists(Name)) {
22272225
set InternalName = ##class(SourceControl.Git.File).ExternalNameToInternalName(Name)
2226+
if (InternalName '= "") && (context.IsInGitEnabledPackage) {
2227+
// Don't need mappings!
2228+
return ..NormalizeInternalName(InternalName)
2229+
}
22282230
} else {
22292231
// check for file in uncommitted queue
22302232
&sql(SELECT internalName into :InternalName FROM SourceControl_Git.Change where ItemFile = :Name)
@@ -2234,11 +2236,6 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
22342236
set Deleted = 1
22352237
}
22362238
}
2237-
// check for file in production item cache
2238-
if InternalName = "" {
2239-
set InternalName = ##class(SourceControl.Git.Util.ProductionItemCache).Lookup(Name)
2240-
}
2241-
// use mappings
22422239
if (InternalName="") {
22432240
set name=$extract(Name,$length($$$SourceRoot)+1,*)
22442241
set name=$replace(name,"\","/") // standardize slash direction
@@ -2371,11 +2368,7 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1, V
23712368
}
23722369
if ((IgnorePercent)&&($extract(InternalName)="%")) { set InternalName = "" } // don't return a result for % items if instructed to ignore them
23732370
if ((IgnoreNonexistent)&&('##class(%RoutineMgr).Exists(InternalName))&&('Deleted)) { set InternalName = "" } // only return item names which exist in the DB
2374-
set normalizedInternalName = ..NormalizeInternalName(InternalName)
2375-
if ..Type(normalizedInternalName) = "ptd" {
2376-
do ##class(SourceControl.Git.Util.ProductionItemCache).Store(Name, normalizedInternalName)
2377-
}
2378-
quit normalizedInternalName
2371+
quit ..NormalizeInternalName(InternalName)
23792372
}
23802373

23812374
ClassMethod OutputConfigureMessage()

0 commit comments

Comments
 (0)