#REFACTORING by stefan
class: CVSSourceCodeManager class
changed:
#checkin:text:directory:module:logMessage:force:onBranch:
#createContainerFor:inModule:package:container:
#createContainerForText:inModule:package:container:
use #contentsAsString
--- a/CVSSourceCodeManager.st Wed May 09 18:57:49 2018 +0200
+++ b/CVSSourceCodeManager.st Wed May 09 20:10:29 2018 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -1702,7 +1700,7 @@
"/
"/ correct our current time, so that converting it will give us UTC
- time := Timestamp now asUtcTimestamp subtractSeconds:1.
+ time := UtcTimestamp now subtractSeconds:1.
self createEntryFor:checkoutName
module:moduleDir
@@ -2082,7 +2080,7 @@
inDirectory:tempdir name
) ifFalse:[
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[
- whatHappened := cmdOut contentsOfEntireFile asString.
+ whatHappened := cmdOut contentsAsString.
] ifFalse:[
whatHappened := '<< no message >>'
].
@@ -2099,7 +2097,7 @@
].
logTmp notNil ifTrue:[logTmp remove].
(cmdOut exists and:[cmdOut fileSize > 0]) ifTrue:[
- whatHappened := cmdOut contentsOfEntireFile asString.
+ whatHappened := cmdOut contentsAsString.
] ifFalse:[
whatHappened := nil
].
@@ -2128,6 +2126,7 @@
"Created: / 05-12-2017 / 23:28:31 / cg"
"Modified: / 06-12-2017 / 03:19:59 / cg"
+ "Modified: / 09-05-2018 / 19:31:44 / stefan"
!
checkinClass:cls fileName:classFileName directory:packageDir module:moduleDir source:sourceFileName logMessage:logMessage force:forceArg
@@ -3529,7 +3528,7 @@
tempdir recursiveRemove.
^ false.
].
- whatHappened := cmdOut contentsOfEntireFile asString.
+ whatHappened := cmdOut contentsAsString.
cmdOut remove.
"/
@@ -3608,8 +3607,8 @@
^ true
"Created: / 09-12-1995 / 19:13:37 / cg"
- "Modified: / 23-07-1999 / 19:47:59 / stefan"
"Modified: / 12-11-2010 / 11:04:42 / cg"
+ "Modified: / 09-05-2018 / 19:26:53 / stefan"
!
createContainerForText:someText inModule:moduleDir package:packageDir container:fileName
@@ -3730,7 +3729,7 @@
cmdOut remove.
^ false.
].
- whatHappened := cmdOut contentsOfEntireFile asString.
+ whatHappened := cmdOut contentsAsString.
cmdOut remove.
"/
@@ -3780,6 +3779,7 @@
^ true
"Modified: / 12-11-2010 / 11:04:55 / cg"
+ "Modified: / 09-05-2018 / 19:27:06 / stefan"
!
createModule:moduleName
@@ -4587,17 +4587,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?' withCRs bindWith:aClass name) ]
+ or:[ Dialog confirm:('Attention: the CVS version string is corrupted in "%1" (§-bug). Fix it?' withCRs bindWith:aClass name) ]
) ifTrue:[
self updateVersionMethodOf:aClass for:fixedString.
].
@@ -4605,7 +4605,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 , '$'.
@@ -5917,7 +5917,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 '.
@@ -5947,12 +5947,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