Skip to content

update uncommitted now removes other user's uncommitted files if they're committed #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cls/SourceControl/Git/Change.cls
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ ClassMethod RemoveUncommitted(FileList, Display = 1, Revert = 0, ActiveCommit =
set changeSourceClass=##class(%Studio.SourceControl.Interface).SourceControlClassGet()
}
if ('$get(^SYS("SourceControl","ChangeConfig","KeepHistory")))||(Revert) {
if (obj.ChangedBy = $username) {
set sc=..%DeleteId(obj.%Id())
}
set sc=..%DeleteId(obj.%Id())
} else {
if $get(CommitCCR)'="" set obj.CCR=CommitCCR
set obj.P4Issued=$zdatetime($h,3)
Expand Down Expand Up @@ -112,6 +110,7 @@ ClassMethod GetOtherDeveloperChanges() As %Boolean
/// Goes through Uncommitted queue and removes any items of action 'edit' or 'add' which are ReadOnly or non-existent on the filesystem
ClassMethod RefreshUncommitted(Display = 0, IncludeRevert = 0, Output gitFiles, Force As %Boolean = 0) As %Status
{

set lock = $System.AutoLock.Lock("^SourceControl.Git.Refresh",,10)
if lock = $$$NULLOREF {
quit $$$ERROR($$$GeneralError,"Unable to get exclusive lock for refresh of uncommitted changes.")
Expand Down
1 change: 1 addition & 0 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -2544,3 +2544,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
}

}

2 changes: 1 addition & 1 deletion cls/SourceControl/Git/WebUIDriver.cls
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
do %data.Write("Git-Return-Code: " _ returnCode) // No ending newline expected
do %data.Rewind()
if '$listfind(readOnlyCommands,baseCommand) {
do ##class(SourceControl.Git.Change).RefreshUncommitted()
do ##class(SourceControl.Git.Change).RefreshUncommitted(,,,1)
}
set handled = 1
}
Expand Down
3 changes: 3 additions & 0 deletions git-webui/release/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ webui.showWarning = function(message) {
var messageBox = $("#message-box");
messageBox.empty();

// convert links in message into actual html links
var messageAsArr = message.split(" ");
messageAsArr = messageAsArr.map(function(messagePart){
if (messagePart.startsWith("https://")) {
Expand All @@ -99,6 +100,8 @@ webui.showWarning = function(message) {
}
});
message = messageAsArr.join(" ")


$( '<div class="alert alert-warning alert-dismissible" role="alert">' +
'<button type="button" class="btn btn-default close" data-dismiss="alert">' +
webui.largeXIcon+
Expand Down
Loading