@@ -56,23 +56,23 @@ Method UserAction(Type As %Integer, Name As %String, InternalName As %String, Se
5656 }
5757
5858 if (Type = 1 ) && (Name = 3 ) {
59- if settings . warnInstanceWideUncommitted {
60- // if item is being edited in a different namespace, opening it will display an alert. Editing in this namespace will remove the alert.
61- set filename = ##class ( SourceControl.Git.Utils ). FullExternalName (.InternalName )
62- do ##class ( SourceControl.Git.Change ). GetUncommitted ( filename ,. tAction )
63- do .. GetStatus (. InternalName , . isInSourceControl , . isEditable ,. isCheckedOut ,. userCheckedOut )
64- if '$data ( tAction ) {
65- set user = " " , inNamespace = " "
66- if ' isEditable || ##class ( SourceControl.Git.Utils ). Locked () {
67- set Target = " Warning: Attempting to edit read-only file "
68- write !, Target
69- set Action = 6
70- } elseif ##class (SourceControl.Git.Utils ).InstanceWideUncommittedCheck (InternalName , . user , . inNamespace ) {
71- set Target = " Warning: Item " _ InternalName _ " is currently being modified by " _ user _ " in namespace " _ inNamespace _ " . "
72- write !, Target
73- set Action = 6
74- }
75- }
59+ set filename = ##class ( SourceControl.Git.Utils ). FullExternalName (. InternalName )
60+ do ##class ( SourceControl.Git.Change ). GetUncommitted ( filename ,. tAction )
61+ do .. GetStatus (.InternalName , . isInSourceControl , . isEditable ,. isCheckedOut ,. userCheckedOut )
62+ if ' $data ( tAction ) {
63+ set user = " " , inNamespace = " "
64+ if 'isEditable || ##class ( SourceControl.Git.Utils ). Locked ( ) {
65+ set Target = " Warning: Attempting to edit read-only file "
66+ write !, Target
67+ set Action = 6
68+ } elseif settings . warnInstanceWideUncommitted
69+ && ##class ( SourceControl.Git.Utils ). InstanceWideUncommittedCheck ( InternalName , . user , . inNamespace )
70+ && '( ##class (SourceControl.Git.Utils ).ItemIsProductionToDecompose (InternalName ) ) {
71+ // if item is being edited in a different namespace, opening it will display an alert. Editing in this namespace will remove the alert.
72+ set Target = " Warning: Item " _ InternalName _ " is currently being modified by " _ user _ " in namespace " _ inNamespace _ " . "
73+ write !, Target
74+ set Action = 6
75+ }
7676 }
7777 }
7878
0 commit comments