Skip to content

Commit

Permalink
Issue #4: poised to login and attempt to execute a command
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Jun 6, 2023
1 parent 2dc8ee8 commit db169b1
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 66 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
evaluation
evaluateCommand: command batchMode: batchBool
| stonString transcriptOop |
stonString := self objectSerializer toString: command.
batchBool
ifFalse: [ transcriptOop := self session clientForwarderCache keyAtValue: Transcript ifAbsent: [ ] ].
[
(transcriptOop notNil and: [ batchBool not ])
ifTrue: [ self session clientForwarderCache at: transcriptOop put: self shell console ].
| stonString |
stonString := (STON toString: command) encodeAsUTF8.
^ self session
executeStringExpectingStringNB:
'(' , self todeServerAccessString , ' for: ' , self shell shellId asString , ') evaluateSTONCommand:'
, stonString printString
envId: self environmentId ]
ensure: [
(session notNil and: [ transcriptOop notNil and: [ batchBool not ] ])
ifTrue: [ self session clientForwarderCache at: transcriptOop put: Transcript ] ]
envId: self environmentId
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
session management
login
| sess gemNRS stoneNRS aUsername aPassword |
| sess gemNRS stoneNRS sessionDescription |
sessionDescription := self sessionDescription.
gemNRS := GsNetworkResourceString
gemNRSForNetLDI: sessionDescription netLDIPort
onHost: sessionDescription gemHost.
stoneNRS := GsNetworkResourceString
stoneNRSForStoneName: sessionDescription stoneName
onHost: sessionDescription stoneHost.
sess := GsTsExternalSession
gemNRS: gemNRS
stoneNRS: stoneNRS
username: aUsername
password: aPassword.
(sess loginWith: self sessionDescription)
ifFalse: [
| gciError messageText |
gciError := sess getAndClearLastError.
messageText := gciError message.
^ Error
signal:
messageText
, ' For further information about login failures, check the gem log file' ].
self class addDependent: self.
false
ifTrue: [ sess enableGemTrace ].
^ sess
username: sessionDescription userId
password: sessionDescription password

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
session management
session
session
ifNil: [
session := self login.
self topezServerProxy ].
^ session
session ifNil: [ session := self login ].
^ session
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
sessionDescription
^ self shell sessionDescription
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ evaluate: aString batchMode: aBool
| result |
TDCommandLine
fromStream: aString readStream
selectLine: [ :line |
self actionStack notEmpty
ifTrue: [
result := self accumulateText: line.
false "do not create or evaluate command for this line" ]
ifFalse: [
self addToHistory: line.
true "create and evaluate the command for this line" ] ]
selectLine: [ :line | true ]
forEachCommand: [ :command | result := self evaluateCommand: command batchMode: aBool ].
^ result ]
on: Error , TDRestoreFromBackupComplete , GsTopezCommandErrorNotification
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
stash
postCopy
"windowStatus is shared"
"windowStatus is shared"

shellId := promptString := actionStack := inputStream := shellWindow := nil.
topezClient := self topezClient copy
shell: self;
topezServerProxy;
yourself
shellId := promptString := actionStack := inputStream := shellWindow := nil.
topezClient := self topezClient copy
shell: self;
yourself

0 comments on commit db169b1

Please sign in to comment.