Smalltalk.st
changeset 23414 c10ead3a5a86
parent 23408 559e80ba680d
child 23419 90b6b18e27de
--- a/Smalltalk.st	Wed Oct 10 00:41:34 2018 +0200
+++ b/Smalltalk.st	Wed Oct 10 00:44:36 2018 +0200
@@ -7331,78 +7331,78 @@
 "/  should be fixed in code that files-out the package and generates build files.
 "/  Certainly a hack, but do not remove this until fixed elsewhere
 
-    compatQuery := Smalltalk classNamed: 'SVN::CompatModeQuery'.
+    compatQuery := #'SVN::CompatModeQuery' asClassIfAbsent:nil.
     (compatQuery notNil
       and:[compatQuery isLoaded
-	and:[compatQuery query not]]) ifTrue:[
-	    nm := aClassOrClassName isBehavior
-		ifTrue:[aClassOrClassName name]
-		ifFalse:[aClassOrClassName].
-	    nm := nm copyReplaceAll:$: with:$_ ifNone:nm.
-	    ^nm
+        and:[compatQuery query not]]) ifTrue:[
+            nm := aClassOrClassName isBehavior
+                ifTrue:[aClassOrClassName name]
+                ifFalse:[aClassOrClassName].
+            nm := nm copyReplaceAll:$: with:$_ ifNone:nm.
+            ^nm
     ].
 
     "/ Same for another query for new libscm. Here we have to do
     "/ this only for packages that are being filed out and NOT for others.
     "/ The problem is that this method is also used for getting filenames
     "/ of classes OUTSIDE filed-out package when generating makefile dependencies.
-    compatQuery := Smalltalk classNamed: 'SCMCompatModeQuery'.
+    compatQuery := #'SCMCompatModeQuery' asClassIfAbsent:nil.
     (compatQuery notNil
       and:[compatQuery isLoaded
-	and:[(compatPkg := compatQuery query) notNil]]) ifTrue:[
-	    | compatPkgs |
-	    "/ Originally libscm could only fileout one package at time so
-	    "/ the query answered one package name. However, to support nested
-	    "/ packages, libscm is being rewritten to commit multiple packages
-	    "/ at once, so query answers a collection of packages. The code below
-	    "/ makes sure it works for both.
-	    compatPkgs := compatPkg isString ifTrue:[ Array with: compatPkg] ifFalse:[ compatPkg ].
-	    nm := aClassOrClassName isBehavior
-		ifTrue:[aClassOrClassName name]
-		ifFalse:[aClassOrClassName].
-	    cls := Smalltalk at: nm asSymbol.
-	    (cls notNil and:[compatPkgs includes: cls package]) ifTrue:[
-		nm := nm copyReplaceAll:$: with:$_.
-		^nm
-	    ].
+        and:[(compatPkg := compatQuery query) notNil]]) ifTrue:[
+            | compatPkgs |
+            "/ Originally libscm could only fileout one package at time so
+            "/ the query answered one package name. However, to support nested
+            "/ packages, libscm is being rewritten to commit multiple packages
+            "/ at once, so query answers a collection of packages. The code below
+            "/ makes sure it works for both.
+            compatPkgs := compatPkg isString ifTrue:[ Array with: compatPkg] ifFalse:[ compatPkg ].
+            nm := aClassOrClassName isBehavior
+                ifTrue:[aClassOrClassName name]
+                ifFalse:[aClassOrClassName].
+            cls := Smalltalk at: nm asSymbol.
+            (cls notNil and:[compatPkgs includes: cls package]) ifTrue:[
+                nm := nm copyReplaceAll:$: with:$_.
+                ^nm
+            ].
     ].
 
     aClassOrClassName isBehavior ifTrue:[
-	cls := aClassOrClassName.
+        cls := aClassOrClassName.
     ] ifFalse:[
-	cls := Smalltalk classNamed:aClassOrClassName.
-	cls isNil ifTrue:[
-	    nameWithPrefix := aClassOrClassName.
-	    nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1).
-	].
+        cls := Smalltalk classNamed:aClassOrClassName.
+        cls isNil ifTrue:[
+            nameWithPrefix := aClassOrClassName.
+            nameWithoutPrefix := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1).
+        ].
     ].
 
     cls notNil ifTrue:[
-	nonMetaclass := cls theNonMetaclass.
-	nm := nonMetaclass getClassFilename.
-	nm isNil ifTrue:[
-	    |revisionInfo|
-
-	    (revisionInfo := cls revisionInfo) notNil ifTrue:[
-		nm := revisionInfo fileName.
-	    ].
-	].
-	nm notNil ifTrue:[
-	    ^ nm asFilename withoutSuffix baseName
-	].
-	nameWithPrefix := nonMetaclass name.
-	nameWithoutPrefix := nonMetaclass nameWithoutPrefix.
+        nonMetaclass := cls theNonMetaclass.
+        nm := nonMetaclass getClassFilename.
+        nm isNil ifTrue:[
+            |revisionInfo|
+
+            (revisionInfo := cls revisionInfo) notNil ifTrue:[
+                nm := revisionInfo fileName.
+            ].
+        ].
+        nm notNil ifTrue:[
+            ^ nm asFilename withoutSuffix baseName
+        ].
+        nameWithPrefix := nonMetaclass name.
+        nameWithoutPrefix := nonMetaclass nameWithoutPrefix.
     ].
 
     CachedAbbreviations notNil ifTrue:[
-	nameWithPrefix := nameWithPrefix asSymbol.
-	(CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[
-	    ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName
-	].
-	nameWithoutPrefix := nameWithoutPrefix asSymbol.
-	(CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[
-	    ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName
-	].
+        nameWithPrefix := nameWithPrefix asSymbol.
+        (CachedAbbreviations includesKey:nameWithPrefix) ifTrue:[
+            ^ (CachedAbbreviations at:nameWithPrefix) asFilename baseName
+        ].
+        nameWithoutPrefix := nameWithoutPrefix asSymbol.
+        (CachedAbbreviations includesKey:nameWithoutPrefix) ifTrue:[
+            ^ (CachedAbbreviations at:nameWithoutPrefix) asFilename baseName
+        ].
     ].
 
     ^ nameWithPrefix copyReplaceAll:$: with:$_
@@ -7424,6 +7424,7 @@
     "Modified: / 06-10-2006 / 16:16:01 / cg"
     "Modified: / 23-02-2014 / 10:39:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified (comment): / 23-02-2014 / 12:39:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 10-10-2018 / 00:44:07 / Claus Gittinger"
 !
 
 filenameAbbreviations