Skip to content

Commit

Permalink
#250 & #249 -- #250: expand --hard option to include TDTopezServer cl…
Browse files Browse the repository at this point in the history
…ass>>clearStaleTopezReferences and TDStandardTool class>>initializeTools; #249 create and use TDDirectoryNode>>_addBasicChildNode: to create child nodes without initliazing topez that is bound to be stale; add TDDirectoryNodeTopezCleaner for traversing and cleaning out stale topez refs in persistent TDDirectory structure ..
  • Loading branch information
dalehenrich committed Mar 26, 2016
1 parent 8dc5ade commit 4e15e51
Show file tree
Hide file tree
Showing 49 changed files with 185 additions and 79 deletions.
Expand Up @@ -8,5 +8,8 @@ gsFlushCaches: hardFlush
MCMethodDefinition shutDown.
TDTopezServer clearPersistentElementCacheStack.
hardFlush
ifTrue: [ MethodVersionHistory reset ]
ifTrue: [
MethodVersionHistory reset.
TDTopezServer clearStaleTopezReferences.
TDStandardTool initializeTools ]
ifFalse: [ MethodVersionHistory uniqueInstance cleanUp ]
Expand Up @@ -73,7 +73,7 @@
"fullBackupTo:safely:uncompressed:" : "dkh 09/16/2015 14:49",
"gsFileSizeReportOn:" : "dkh 02/08/2015 09:05",
"gsFlushCaches" : "dkh 03/25/2016 13:46",
"gsFlushCaches:" : "dkh 03/25/2016 13:46",
"gsFlushCaches:" : "dkh 03/25/2016 16:22",
"gsMfc" : "dkh 02/08/2015 15:44",
"gsMfc:wait:buffer:cpu:" : "dkh 02/08/2015 11:06",
"gsReclaimAll" : "dkh 02/08/2016 15:57",
Expand Down

Large diffs are not rendered by default.

@@ -0,0 +1,6 @@
as yet unclassified
_addBasicChildNode: aNode
"use in very restricted circumstances --- topez not set properly in aNode"

aNode parent: self.
self basicContents at: aNode name put: aNode
@@ -1,7 +1,6 @@
as yet unclassified
addChildNode: aNode
aNode parent: self.
self basicContents at: aNode name put: aNode.
self _addBasicChildNode: aNode.
^ aNode
topez: self topez;
yourself
Expand Up @@ -2,11 +2,12 @@
"class" : {
},
"instance" : {
"_addBasicChildNode:" : "dkh 03/25/2016 16:55",
"acceptVisitor:" : "dkh 01/30/2014 12:32",
"addAsChildOfFileSystemDirectoryNode:" : "dkh 11/27/2013 10:33",
"addChild:" : "dkh 11/28/2012 05:31",
"addChildIfAbsent:" : "dkh 11/05/2014 13:57",
"addChildNode:" : "DataCurator 01/23/2013 18:23",
"addChildNode:" : "dkh 03/25/2016 16:55",
"addTempValueTo:" : "07/12/2013 08:47",
"asTDNode:" : "DataCurator 01/26/2013 23:22",
"basicContents" : "dkh 11/28/2012 05:31",
Expand Down
Empty file.
@@ -0,0 +1,3 @@
instance creation
cleanDirectoryNodesRootedAt: aDirectoryNode
^ self new cleanDirectoryNodesRootedAt: aDirectoryNode
@@ -0,0 +1,4 @@
visitor-double dispatching
acceptDirectoryNode: aTDDirectoryNode
super acceptDirectoryNode: aTDDirectoryNode.
aTDDirectoryNode topez ifNotNil: [ dNodes add: aTDDirectoryNode ]
@@ -0,0 +1,4 @@
visitor-double dispatching
acceptFileSystemDirectoryDirectoryNode: aTDFileSystemDirectoryDirectoryNode
aTDFileSystemDirectoryDirectoryNode topez
ifNotNil: [ dNodes add: aTDFileSystemDirectoryDirectoryNode ]
@@ -0,0 +1,3 @@
visitor-double dispatching
acceptGatewayNode: aTDGatewayNode
aTDGatewayNode topez ifNotNil: [ dNodes add: aTDGatewayNode ]
@@ -0,0 +1,3 @@
visitor-double dispatching
acceptLeafNode: aTDLeafNode
aTDLeafNode topez ifNotNil: [ dNodes add: aTDLeafNode ]
@@ -0,0 +1,3 @@
visitor-double dispatching
acceptObjectNode: aTDObjectNode
aTDObjectNode topez ifNotNil: [ dNodes add: aTDObjectNode ]
@@ -0,0 +1,3 @@
visitor-double dispatching
acceptPluggableNode: aTDPluggableNode
self acceptDirectoryNode: aTDPluggableNode
@@ -0,0 +1,3 @@
visitor-leaves
acceptScriptLeafNode: aTDScriptLeafNode
self acceptLeafNode: aTDScriptLeafNode
@@ -0,0 +1,3 @@
visitor-double dispatching
acceptSessionTempNode: aTDSessionTempNode
aTDSessionTempNode topez ifNotNil: [ dNodes add: aTDSessionTempNode ]
@@ -0,0 +1,3 @@
visitor-leaves
acceptSmalltalkLeafNode: aTDSmalltalkLeafNode
self acceptLeafNode: aTDSmalltalkLeafNode
@@ -0,0 +1,3 @@
visitor-leaves
acceptStringLeafNode: aTDStringLeafNode
self acceptLeafNode: aTDStringLeafNode
@@ -0,0 +1,3 @@
visitor-leaves
acceptTopezLeafNode: aTDTopezLeafNode
self acceptLeafNode: aTDTopezLeafNode
@@ -0,0 +1,3 @@
visitor-leaves
acceptTxtLeafNode: aTDTxtLeafNode
self acceptLeafNode: aTDTxtLeafNode
@@ -0,0 +1,5 @@
cleaning
cleanDirectoryNodesRootedAt: aDirectoryNode
dNodes := {}.
self visitNode: aDirectoryNode.
^ dNodes
@@ -0,0 +1,17 @@
{
"class" : {
"cleanDirectoryNodesRootedAt:" : "dkh 03/25/2016 15:00" },
"instance" : {
"acceptDirectoryNode:" : "dkh 03/25/2016 17:32",
"acceptFileSystemDirectoryDirectoryNode:" : "dkh 03/25/2016 15:17",
"acceptGatewayNode:" : "dkh 03/25/2016 15:17",
"acceptLeafNode:" : "dkh 03/25/2016 17:32",
"acceptObjectNode:" : "dkh 03/25/2016 15:31",
"acceptPluggableNode:" : "dkh 03/25/2016 17:25",
"acceptScriptLeafNode:" : "dkh 03/25/2016 17:19",
"acceptSessionTempNode:" : "dkh 03/25/2016 15:28",
"acceptSmalltalkLeafNode:" : "dkh 03/25/2016 17:19",
"acceptStringLeafNode:" : "dkh 03/25/2016 17:19",
"acceptTopezLeafNode:" : "dkh 03/25/2016 17:20",
"acceptTxtLeafNode:" : "dkh 03/25/2016 17:20",
"cleanDirectoryNodesRootedAt:" : "dkh 03/25/2016 15:16" } }
@@ -0,0 +1,14 @@
{
"category" : "Topez-Server-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"dNodes" ],
"name" : "TDDirectoryNodeTopezCleaner",
"pools" : [
],
"super" : "TDNodeVisitor",
"type" : "normal" }
Expand Up @@ -4,7 +4,7 @@ mcRepositoryNode: aTopez
| node |
node := aTopez ensureChildrenExistIn: '/mc'.
node
addChildNode:
_addBasicChildNode:
(TDPluggableNode new
name: 'repos';
readMe: self readMeRepos;
Expand Down
Expand Up @@ -10,7 +10,7 @@
"installOn:" : "dkh 04/26/2014 09:21",
"mc" : "dkh 11/10/2013 10:30",
"mcManPage" : "dkh 08/25/2015 14:05",
"mcRepositoryNode:" : "dkh 03/10/2013 09:30",
"mcRepositoryNode:" : "dkh 03/25/2016 17:02",
"mcWorkingCopiesNode:" : "dkh 05/27/2013 19:24",
"mm" : "dkh 11/10/2013 10:30",
"mmManPage" : "dkh 11/10/2013 11:33",
Expand Down
@@ -0,0 +1,6 @@
visitor-double dispatching
acceptPluggableNode: aTDPluggableNode
aTDPluggableNode
childrenDo: [ :child |
child topez: self topez.
self visitNode: child ]
Expand Up @@ -10,6 +10,7 @@
"acceptLeafeNode:" : "dkh 01/30/2014 12:21",
"acceptNode:" : "dkh 01/30/2014 12:19",
"acceptObjectNode:" : "dkh 01/30/2014 12:24",
"acceptPluggableNode:" : "dkh 03/25/2016 15:32",
"acceptScriptLeafNode:" : "dkh 01/30/2014 17:09",
"acceptSessionTempNode:" : "dkh 01/30/2014 12:20",
"acceptSmalltalkLeafNode:" : "dkh 01/30/2014 17:09",
Expand Down
@@ -0,0 +1,3 @@
visiting
acceptVisitor: aTDNodeVisitor
aTDNodeVisitor acceptPluggableNode: self
Expand Up @@ -2,6 +2,7 @@
"class" : {
},
"instance" : {
"acceptVisitor:" : "dkh 03/25/2016 15:26",
"addBlock" : "dkh 11/29/2012 17:59",
"addBlock:" : "dkh 11/29/2012 17:59",
"basicContents" : "DataCurator 11/30/2012 10:51",
Expand Down
Expand Up @@ -2,12 +2,12 @@ as yet unclassified
installExampleOn: aTDTopezServer
| examplesNode |
(aTDTopezServer ensureChildrenExistIn: '/examples')
addChildNode:
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'st';
contents: '3+4';
yourself);
addChildNode:
_addBasicChildNode:
(TDTxtLeafNode new
name: 'text';
contents:
Expand All @@ -20,7 +20,7 @@ installExampleOn: aTDTopezServer
(TextEmphasis bold)})
, ' text.' asText;
yourself);
addChildNode:
_addBasicChildNode:
(TDTxtLeafNode new
name: 'analysis';
contents:
Expand All @@ -30,12 +30,12 @@ installExampleOn: aTDTopezServer
=============================='
attributes: {(TextEmphasis bold)});
yourself);
addChildNode:
_addBasicChildNode:
(TDTopezLeafNode new
name: 'topez';
contents: 'cat /home/.window/model';
yourself);
addChildNode:
_addBasicChildNode:
(TDScriptLeafNode new
name: 'script';
block: [ :topez :objIn :tokens :windowId | 'hello world' ];
Expand All @@ -61,7 +61,7 @@ DESCRIPTION
'))
yourself.
(aTDTopezServer lookup: self commandPath)
addChildNode:
_addBasicChildNode:
(examplesNode := TDDirectoryNode new
name: 'examples';
readMe:
Expand All @@ -70,7 +70,7 @@ DESCRIPTION
shellInit - initialize topez system ... relogin afterwards';
yourself).
examplesNode
addChildNode:
_addBasicChildNode:
(TDTopezLeafNode new
name: 'runEx';
contents:
Expand All @@ -83,7 +83,7 @@ run | run
self + 3
%';
yourself);
addChildNode:
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'shellInit';
contents:
Expand Down
Expand Up @@ -2,26 +2,26 @@ as yet unclassified
installOptionsOn: aTDTopezServer
| optionsNode |
((aTDTopezServer ensureChildrenExistIn: self commandPath)
addChildNode:
_addBasicChildNode:
(optionsNode := TDDirectoryNode new
name: 'options';
readMe: 'options for core tools';
yourself))
addChildNode:
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'setListLimit';
contents:
self class theNonMetaClass name asString , ' listLimit: '
, self listLimit asString;
yourself);
addChildNode:
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'setDisplayOops';
contents:
self class theNonMetaClass name asString , ' displayOops: '
, self displayOops asString;
yourself);
addChildNode:
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'setCharacterLimit';
contents:
Expand Down
Expand Up @@ -79,9 +79,9 @@
"history" : "dkh 11/10/2013 10:32",
"historyManPage" : "dkh 03/28/2013 19:56",
"homeReadMe" : "dkh 12/21/2012 11:23",
"installExampleOn:" : "dkh 10/23/2015 10:07",
"installExampleOn:" : "dkh 03/25/2016 16:59",
"installOn:" : "dkh 01/09/2016 09:19",
"installOptionsOn:" : "dkh 03/10/2013 09:30",
"installOptionsOn:" : "dkh 03/25/2016 16:59",
"limit" : "dkh 11/10/2013 10:19",
"limitManPage" : "dkh 07/20/2015 10:29",
"listLimit" : "dkh 09/27/2013 18:05",
Expand Down
Expand Up @@ -22,9 +22,8 @@ installMasterTestSpecOn: aTDTopezServer
nextPutAll: '^suite';
cr.
(aTDTopezServer ensureChildrenExistIn: path)
addChildNode:
(TDSmalltalkLeafNode new
name: 'testSuite';
contents: stream contents;
yourself);
yourself
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'testSuite';
contents: stream contents;
yourself)
Expand Up @@ -11,6 +11,7 @@ installOn: aTDTopezServer
block: block
vendor: self
at: self commandPath.
node topez: nil. "avoid keeping the parent topez alive forever"
pragmaResult := self perform: (pragma argumentAt: 2).
pragmaResult isString
ifTrue: [ manPage := TDManPage commandName: commandName fromString: pragmaResult ]
Expand Down
Expand Up @@ -20,9 +20,8 @@ installTestSpecOn: aTDTopezServer
nextPutAll: '^suite';
cr.
(aTDTopezServer ensureChildrenExistIn: path)
addChildNode:
(TDSmalltalkLeafNode new
name: 'testSuite';
contents: stream contents;
yourself);
yourself
_addBasicChildNode:
(TDSmalltalkLeafNode new
name: 'testSuite';
contents: stream contents;
yourself)
Expand Up @@ -4,9 +4,9 @@
"basePathReadMe" : "dkh 05/18/2013 07:18",
"commandPath" : "dkh 05/18/2013 07:18",
"initializeTools" : "dkh 05/13/2014 18:44",
"installMasterTestSpecOn:" : "dkh 05/18/2013 07:18",
"installOn:" : "dkh 04/20/2014 11:51",
"installTestSpecOn:" : "dkh 05/18/2013 07:19",
"installMasterTestSpecOn:" : "dkh 03/25/2016 16:57",
"installOn:" : "dkh 03/25/2016 16:37",
"installTestSpecOn:" : "dkh 03/25/2016 16:57",
"priority" : "dkh 05/18/2013 07:19",
"testSuiteClasses" : "dkh 05/18/2013 07:19",
"toolName" : "dkh 05/18/2013 07:19",
Expand Down
@@ -0,0 +1,9 @@
accessing
clearStaleTopezReferences
"self clearStaleTopezReferences"

| nodes |
nodes := TDDirectoryNodeTopezCleaner
cleanDirectoryNodesRootedAt: self rootNode.
nodes do: [ :node | node topez: nil ].
^ nodes

0 comments on commit 4e15e51

Please sign in to comment.