Skip to content

Commit 639f4da

Browse files
committed
Fixed lock warning
1 parent 19c04f0 commit 639f4da

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cls/SourceControl/Git/Extension.cls

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,19 @@ Method UserAction(Type As %Integer, Name As %String, InternalName As %String, Se
5959
// if item is being edited in a different namespace, opening it will display an alert. Editing in this namespace will remove the alert.
6060
set filename = ##class(SourceControl.Git.Utils).FullExternalName(.InternalName)
6161
do ##class(SourceControl.Git.Change).GetUncommitted(filename,.tAction)
62+
do ..GetStatus(.InternalName, .isInSourceControl, .isEditable,.isCheckedOut,.userCheckedOut)
6263
if '$data(tAction) {
6364
set user = "", inNamespace = ""
6465
if ##class(SourceControl.Git.Utils).InstanceWideUncommittedCheck(InternalName, .user, .inNamespace) {
6566
set Target = "Warning: Item " _ InternalName _ " is currently being modified by " _ user _ " in namespace " _ inNamespace _ "."
6667
write !, Target
6768
set Action = 6
69+
} elseif 'isEditable || ##class(SourceControl.Git.Utils).Locked() {
70+
set Target = "Warning: Attempting to edit read-only file"
71+
write !, Target
72+
set Action = 6
6873
}
6974
}
70-
71-
do ..GetStatus(.InternalName, .isInSourceControl, .isEditable,.isCheckedOut,.userCheckedOut)
72-
if 'isEditable || ##class(SourceControl.Git.Utils).Locked() || ($username '= userCheckedOut) {
73-
set Target = "Warning: Attempting to edit read-only file"
74-
write !, Target
75-
set Action = 6
76-
}
7775
}
7876
}
7977

0 commit comments

Comments
 (0)