#REFACTORING by exept
class: CVSSourceCodeManager class
eliminate withCRs - use c-strings
changed:
#executeCVSCommand:module:inDirectory:log:pipe:orElseOutputTo:errorTo:
#pathesForClasses:
#revisionInfoFromString:inClass:
--- a/CVSSourceCodeManager.st Sun Feb 23 16:36:01 2020 +0100
+++ b/CVSSourceCodeManager.st Tue Feb 25 12:24:48 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -1141,7 +1143,7 @@
[
done := true.
(osProcess waitUntilFinishedWithTimeout:self cvsCommandTimeout) isNil ifTrue:[
- (Dialog confirm:('CVS command timeout (%1) for:\\%2\\Hint: you can change this timeout in the launcher''s settings dialog.\Proceed?' withCRs
+ (Dialog confirm:(c'CVS command timeout (%1) for:\n\n%2\n\nHint: you can change this timeout in the launcher''s settings dialog.\nProceed?'
bindWith:self cvsCommandTimeout with:command))
ifTrue:[
done := false
@@ -4273,13 +4275,13 @@
|info path answer|
cls isLoaded ifFalse:[
- Transcript showCR:'Cannot handle unloaded class: %1.' with:cls name.
+ Logger warning:'Cannot handle unloaded class: %1.' with:cls name.
alreadyWarned == 0 ifTrue:[
Dialog warn:'Cannot handle unloaded class: %1.' with:cls name.
alreadyWarned := alreadyWarned + 1.
] ifFalse:[
alreadyWarned == 1 ifTrue:[
- answer := Dialog confirmWithCancel:('Cannot handle unloaded class: %1.\\Suppress further warnings?' withCRs bindWith:cls name).
+ answer := Dialog confirmWithCancel:(c'Cannot handle unloaded class: %1.\n\nSuppress further warnings?' bindWith:cls name).
answer isNil ifTrue:[^ self].
answer == true ifTrue:[
alreadyWarned := alreadyWarned + 1.
@@ -4763,17 +4765,17 @@
"/ The repair code will be removed at some time in the future...
"/ temporary fix Felix' bad string translation:
- (aString startsWith:'§Header:') ifTrue:[
- (aString endsWith:'Exp §') ifTrue:[
+ (aString startsWith:'§Header:') ifTrue:[
+ (aString endsWith:'Exp §') ifTrue:[
fixedString := '$' , (aString copyFrom:3 to:(aString size - 2)) , '$'.
aClass isNil ifTrue:[
autoFixHolder value ifFalse:[
- Dialog information:'Attention: the CVS version string is corrupted ("§"-bug). Please fix it manually'.
+ Dialog information:'Attention: the CVS version string is corrupted ("§"-bug). Please fix it manually'.
]
] ifFalse:[
(autoFixHolder value
- or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" ("§"-bug). Fix it?' bindWith:aClass name) ]
+ or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" ("§"-bug). Fix it?' bindWith:aClass name) ]
) ifTrue:[
self updateVersionMethodOf:aClass for:fixedString.
].
@@ -4781,7 +4783,7 @@
].
].
- "/ temporary fix Jan's bad Umlaut-removal (which results in Felix's bad § being removed):
+ "/ temporary fix Jan's bad Umlaut-removal (which results in Felix's bad § being removed):
(aString startsWith:'Header: ') ifTrue:[
(aString endsWith:'Exp ') ifTrue:[
fixedString := '$' , aString , '$'.
@@ -4811,7 +4813,7 @@
]
] ifFalse:[
(autoFixHolder value
- or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (Escaper-bug).\\Fix it?' withCRs bindWith:aClass name) ]
+ or:[ Dialog confirm:(c'Attention: the CVS version string is corrupted in "%1" (Escaper-bug).\n\nFix it?' bindWith:aClass name) ]
) ifTrue:[
self updateVersionMethodOf:aClass for:fixedString.
].
@@ -6137,7 +6139,7 @@
"/ $-Revision: rev $
"/ $-Id: fileName rev date time user state $
"/
- (firstWord = '$Header:' or:[firstWord = '§Header:']) ifTrue:[
+ (firstWord = '$Header:' or:[firstWord = '§Header:']) ifTrue:[
d := firstWord first.
s skipSeparators.
nm := s throughAll:',v '.
@@ -6167,12 +6169,12 @@
^ info
].
- (firstWord = '$Revision:' or:[firstWord = '§Revision:']) ifTrue:[
+ (firstWord = '$Revision:' or:[firstWord = '§Revision:']) ifTrue:[
info revision:(s upToEnd asCollectionOfWords first).
^ info
].
- (firstWord = '$Id:' or:[firstWord = '§Id:']) ifTrue:[
+ (firstWord = '$Id:' or:[firstWord = '§Id:']) ifTrue:[
"/commented out by Jan Vrany, 2009/10/20
"/according to http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html
"/svn has no support for $ Header $ expansion. Therefore