Skip to content

Commit 818547d

Browse files
committed
More small bugfixes from demo planning/recording
1 parent 05e150c commit 818547d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

cls/SourceControl/Git/Extension.cls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ Method OnSourceMenuContextItem(itemName As %String, menuItemName As %String, ByR
127127
} elseif $F(itemName,",") > 0 { //if more than one item is selected, we can only add/remove, no diff or blame
128128
set Enabled = $case(menuItemName,"%AddToSC":1,"%RemoveFromSC":1,:-1)
129129
} elseif menuItemName = "%Revert" {
130+
set Enabled = 1
130131
do ..GetStatus(itemName, .isInSourceControl, .isEditable,.isCheckedOut,.userCheckedOut)
131132
if '(##class(Change).IsUncommitted(##class(Utils).FullExternalName(itemName))) || ($username '= userCheckedOut) {
132133
set Enabled = 0
133134
}
134135
} elseif menuItemName = "%Commit" {
136+
set Enabled = 1
135137
do ..GetStatus(itemName, .isInSourceControl, .isEditable,.isCheckedOut,.userCheckedOut)
136138
if '(##class(Change).IsUncommitted(##class(Utils).FullExternalName(itemName))) || ($username '= userCheckedOut) {
137139
set Enabled = 0

cls/SourceControl/Git/PullEventHandler/IncrementalLoad.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Method OnPull() As %Status
1212
set loadSC = $$$OK
1313
set nFiles = 0
1414
for i=1:1:$Get(..ModifiedFiles) {
15-
if $Data(files(i))#2 {
16-
set internalName = ##class(SourceControl.Git.Utils).NameToInternalName(..ModifiedFiles(i))
15+
if $Data(..ModifiedFiles(i))#2 {
16+
set internalName = ##class(SourceControl.Git.Utils).NameToInternalName(..ModifiedFiles(i),,0)
1717
if (internalName = "") {
1818
write files(i), " was not imported into the database and will not be compiled. ", !
1919
} else {

cls/SourceControl/Git/Utils.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ ClassMethod Pull(remote As %String = "origin") As %Status
310310
merge event.ModifiedFiles = files
311311
for i=1:1:$Get(files) {
312312
if $Data(files(i))#2 {
313-
set internalName = ##class(SourceControl.Git.Utils).NameToInternalName(event.ModifiedFiles(i))
313+
set internalName = ##class(SourceControl.Git.Utils).NameToInternalName(event.ModifiedFiles(i),,0)
314314
if (internalName '= "") {
315315
set event.ModifiedItems(internalName) = ""
316316
}
@@ -1310,7 +1310,7 @@ ClassMethod NameToInternalName(Name, IgnorePercent = 1, IgnoreNonexistent = 1) A
13101310
}
13111311
If ((IgnorePercent)&&($extract(InternalName)="%")) { Set InternalName = "" } ; don't return a result for % items if instructed to ignore them
13121312
If ((IgnoreNonexistent)&&('##class(%RoutineMgr).Exists(InternalName))) { Set InternalName = "" } ; only return item names which exist in the DB
1313-
Quit ..NormalizeInternalName(InternalName)
1313+
Quit ..NormalizeInternalName(InternalName)
13141314
}
13151315

13161316
ClassMethod OutputConfigureMessage()

0 commit comments

Comments
 (0)