Skip to content

Commit bf99a2d

Browse files
committed
Fix issues
1 parent 4956dd3 commit bf99a2d

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

cls/SourceControl/Git/DiscardState.cls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Property FullExternalName As %String(MAXLEN = "") [ Required ];
55

66
Property Name As %String [ Required ];
77

8-
Property Contents As %Stream.GlobalCharacter(LOCATION = "^DiscardStateContents");
8+
Property Contents As %Stream.GlobalCharacter(LOCATION = "^SourceControl.Git.DiscardS");
99

1010
Property Username As %String [ Required ];
1111

@@ -15,6 +15,8 @@ Property Timestamp As %TimeStamp [ Required ];
1515

1616
Property ExternalFile As %Boolean [ Required ];
1717

18+
Index BranchMap On Branch [ Type = bitmap ];
19+
1820
Method RestoreToFileTree()
1921
{
2022
// Make sure directory for file exists
@@ -45,7 +47,7 @@ ClassMethod SaveDiscardState(InternalName As %String, name As %String) As %Statu
4547

4648
if (InternalName = "") {
4749
// If not in IRIS
48-
set externalName = ##class(%File).Construct($Get(^SYS("SourceControl","Git","settings","namespaceTemp")),name)
50+
set externalName = ##class(%File).Construct(##class(SourceControl.Git.Utils).DefaultTempFolder(),name)
4951
set discardState.FullExternalName = externalName
5052
set discardState.Name = name
5153
set discardState.ExternalFile = 1

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
139139
set handled = 1
140140
} elseif (pathStart = "discarded-states") {
141141
set discardsInBranch = ##class(SourceControl.Git.DiscardState).DiscardStatesInBranch()
142-
do %data.Write(discardsInBranch.%ToJSON())
142+
do discardsInBranch.%ToJSON(%data)
143143
set handled = 1
144144
} elseif (pathStart = "contexts") {
145145
set contexts = ##class(SourceControl.Git.Utils).GetContexts()

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,8 +1964,6 @@ webui.DiscardedView = function(mainView) {
19641964
$('.restore-discarded').html('');
19651965
$('.external-name').text('');
19661966

1967-
1968-
// TODO: Empty the discarded list properly
19691967
$.get("discarded-states", function(discarded) {
19701968
self.discarded = JSON.parse(discarded);
19711969
if (self.discarded.length == 0) {
@@ -1978,8 +1976,6 @@ webui.DiscardedView = function(mainView) {
19781976

19791977
}
19801978

1981-
1982-
19831979
self.populateUiWithDiscardedStates = function() {
19841980
self.discarded.forEach((discardedState, ind) => {
19851981
var discardedListEntry = $(

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,8 +1964,6 @@ webui.DiscardedView = function(mainView) {
19641964
$('.restore-discarded').html('');
19651965
$('.external-name').text('');
19661966

1967-
1968-
// TODO: Empty the discarded list properly
19691967
$.get("discarded-states", function(discarded) {
19701968
self.discarded = JSON.parse(discarded);
19711969
if (self.discarded.length == 0) {
@@ -1978,8 +1976,6 @@ webui.DiscardedView = function(mainView) {
19781976

19791977
}
19801978

1981-
1982-
19831979
self.populateUiWithDiscardedStates = function() {
19841980
self.discarded.forEach((discardedState, ind) => {
19851981
var discardedListEntry = $(

0 commit comments

Comments
 (0)