#REFACTORING by cg
class: AbstractSourceCodeManager class
added: #versionString:isLessThan:
--- a/AbstractSourceCodeManager.st Tue May 28 08:29:24 2019 +0200
+++ b/AbstractSourceCodeManager.st Tue May 28 15:55:00 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -2163,6 +2161,12 @@
"Modified (comment): / 19-08-2011 / 01:19:08 / cg"
"Modified: / 27-09-2011 / 16:46:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+versionString:stringA isLessThan:stringB
+ ^ self utilities versionString:stringA isLessThan:stringB
+
+ "Created: / 28-05-2019 / 15:53:16 / Claus Gittinger"
! !
!AbstractSourceCodeManager class methodsFor:'source code access'!
@@ -4114,12 +4118,12 @@
|versionString|
- versionString := aString copyWithout: $§.
+ versionString := aString copyWithout: $§.
^ self ensureKeywordExpansionWith: $$ inVersionMethod:versionString.
"
self ensureDollarsInVersionMethod:'foo ^ ''hello'' '
- self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' '
+ self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' '
self ensureDollarsInVersionMethod:'foo ^ '' hello '' '
self ensureDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
self ensureDollarsInVersionMethod:'foo ^ ''$Head'' '
@@ -4211,16 +4215,16 @@
,aCharacter asString ,(aString copyFrom:indexOfLastQuote)
"
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''hello'' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ '' hello '' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.218 2009/10/07 12:12:30 fm Exp §'' '
+ self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''hello'' '
+ self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ '' hello '' '
+ self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.218 2009/10/07 12:12:30 fm Exp §'' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ '' hello '' '
self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '
- self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''Header§'' '
+ self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '
+ self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''Header§'' '
"
"Modified: / 12-02-2019 / 00:12:06 / Claus Gittinger"
@@ -4236,23 +4240,23 @@
ensureNoDollarsInVersionMethod:aString
"given the source code of another manager's version method, ensure that it does NOT
- contain dollars and add $§ instead, to avoid that CVS expands keywords in it"
+ contain dollars and add $§ instead, to avoid that CVS expands keywords in it"
|versionString|
versionString := aString copyWithout: $$.
- ^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
+ ^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
"
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.228 2009/10/20 09:55:58 fm Exp $'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''$','Head'' '
self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' '
- self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '
-- errors:
- self ensureNoDollarsInVersionMethod:'foo ^ ''§Header'' '
- self ensureNoDollarsInVersionMethod:'foo ^ ''Header§'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''§Header'' '
+ self ensureNoDollarsInVersionMethod:'foo ^ ''Header§'' '
"
!