Skip to content

Commit 19c04f0

Browse files
committed
Added suppression of locked classes
1 parent 17e75d2 commit 19c04f0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4545
- Fix errors on commit when a file was added, never committed, then deleted from the repository (#481)
4646
- Fixed issue with saving multiple new no-folder mapping settings at the same time (#533)
4747
- Fixed sending OS error when git pull encounters error (#545)
48+
- Fixed suppressing editing of locked classes (#301)
4849

4950
## [2.6.0] - 2024-10-07
5051

cls/SourceControl/Git/Extension.cls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ Method UserAction(Type As %Integer, Name As %String, InternalName As %String, Se
6767
set Action = 6
6868
}
6969
}
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+
}
7077
}
7178
}
7279

0 commit comments

Comments
 (0)