Skip to content

Commit 6bfb5c0

Browse files
committed
update uncommitted now removes other user's uncommitted files when they're committed
1 parent 46a6f41 commit 6bfb5c0

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

cls/SourceControl/Git/Change.cls

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ ClassMethod RemoveUncommitted(FileList, Display = 1, Revert = 0, ActiveCommit =
4444
set changeSourceClass=##class(%Studio.SourceControl.Interface).SourceControlClassGet()
4545
}
4646
if ('$get(^SYS("SourceControl","ChangeConfig","KeepHistory")))||(Revert) {
47-
if (obj.ChangedBy = $username) {
48-
set sc=..%DeleteId(obj.%Id())
49-
}
47+
set sc=..%DeleteId(obj.%Id())
5048
} else {
5149
if $get(CommitCCR)'="" set obj.CCR=CommitCCR
5250
set obj.P4Issued=$zdatetime($h,3)
@@ -112,6 +110,7 @@ ClassMethod GetOtherDeveloperChanges() As %Boolean
112110
/// Goes through Uncommitted queue and removes any items of action 'edit' or 'add' which are ReadOnly or non-existent on the filesystem
113111
ClassMethod RefreshUncommitted(Display = 0, IncludeRevert = 0, Output gitFiles, Force As %Boolean = 0) As %Status
114112
{
113+
115114
set lock = $System.AutoLock.Lock("^SourceControl.Git.Refresh",,10)
116115
if lock = $$$NULLOREF {
117116
quit $$$ERROR($$$GeneralError,"Unable to get exclusive lock for refresh of uncommitted changes.")

cls/SourceControl/Git/Utils.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,3 +2544,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
25442544
}
25452545

25462546
}
2547+

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
159159
do %data.Write("Git-Return-Code: " _ returnCode) // No ending newline expected
160160
do %data.Rewind()
161161
if '$listfind(readOnlyCommands,baseCommand) {
162-
do ##class(SourceControl.Git.Change).RefreshUncommitted()
162+
do ##class(SourceControl.Git.Change).RefreshUncommitted(,,,1)
163163
}
164164
set handled = 1
165165
}

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ webui.showWarning = function(message) {
9090
var messageBox = $("#message-box");
9191
messageBox.empty();
9292

93+
// convert links in message into actual html links
9394
var messageAsArr = message.split(" ");
9495
messageAsArr = messageAsArr.map(function(messagePart){
9596
if (messagePart.startsWith("https://")) {
@@ -99,6 +100,8 @@ webui.showWarning = function(message) {
99100
}
100101
});
101102
message = messageAsArr.join(" ")
103+
104+
102105
$( '<div class="alert alert-warning alert-dismissible" role="alert">' +
103106
'<button type="button" class="btn btn-default close" data-dismiss="alert">' +
104107
webui.largeXIcon+

0 commit comments

Comments
 (0)