added:
#streamForExtensionFile:directory:module:cache:
#streamForExtensionFile:package:directory:module:cache:
recover the correct version of an extensions container,
based on the information in extensionsVersion_XXX.
Also cache the checked out file just like any other source file.
--- a/AbstractSourceCodeManager.st Fri Oct 09 19:21:40 2009 +0200
+++ b/AbstractSourceCodeManager.st Fri Oct 09 20:14:42 2009 +0200
@@ -232,6 +232,25 @@
^ self subclassResponsibility
"Modified: 14.2.1997 / 21:18:35 / cg"
+!
+
+streamForExtensionFile:fileName package:package directory:dir module:mod cache:doCache
+ |defClass extensionsRevisionString extensionsRevisionInfo rev|
+
+ defClass := ProjectDefinition definitionClassForPackage:package.
+ extensionsRevisionString := defClass perform:(self nameOfVersionMethodForExtensions) ifNotUnderstood:nil.
+ extensionsRevisionString isNil ifTrue:[
+ Transcript showCR:'warning: no valid version info for extensions of "',package,'"'.
+ ^ self streamForClass:nil fileName:fileName revision:nil directory:dir module:mod cache:false.
+ ].
+
+ extensionsRevisionInfo := self revisionInfoFromString:extensionsRevisionString.
+
+ self assert:(fileName = 'extensions.st').
+ self assert:(fileName = extensionsRevisionInfo fileName).
+
+ rev := extensionsRevisionInfo revision.
+ ^ self streamForClass:nil fileName:fileName revision:rev directory:dir module:mod cache:doCache.
! !
!AbstractSourceCodeManager class methodsFor:'basic administration'!
@@ -1665,7 +1684,7 @@
self ensureDollarsInVersionMethod:'foo ^ ''hello'' '
self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' '
self ensureDollarsInVersionMethod:'foo ^ '' hello '' '
- self ensureDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '
+ self ensureDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.223 2009-10-09 18:14:42 cg Exp $'' '
-- errors:
self ensureDollarsInVersionMethod:'foo ^ ''$Head'' '
self ensureDollarsInVersionMethod:'foo ^ ''Header$'' '
@@ -1710,7 +1729,7 @@
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ '' hello '' '
- self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '
+ self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.223 2009-10-09 18:14:42 cg Exp $'' '
-- errors:
self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '
@@ -1728,7 +1747,7 @@
^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
"
- self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.223 2009-10-09 18:14:42 cg Exp $'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''$Head'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '
@@ -2699,11 +2718,11 @@
!AbstractSourceCodeManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.223 2009-10-09 18:14:42 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.223 2009-10-09 18:14:42 cg Exp $'
! !
AbstractSourceCodeManager initialize!