--- a/CVSSourceCodeManager.st Fri Feb 24 11:41:11 2017 +0100
+++ b/CVSSourceCodeManager.st Tue Mar 07 22:16:45 2017 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -52,10 +54,10 @@
It requires the shell environment variable CVSROOT to be set
to the top of the repository tree. (or alternatively, the CVSRoot
variable being set by a private.rc file).
- Under that top, for each module (especially the stx module itself),
+ Under that top, for each module (especially the stx module itself),
a subdirectory containing that modules directories must exist.
- If not specified otherwise, the module defaults to 'stx'.
+ If not specified otherwise, the module defaults to 'stx'.
If a class has its home in another module, it has to be compiled
with a corresponding entry in the package string (see below).
Within a module, classes are organized in classlibraries, and the corresponding
@@ -206,14 +208,14 @@
exeptsPrivateSTXRepositoryModuleRoot
"the actual stx repository as used within exept.
Only valid within exept"
-
+
^ ':pserver:',(OperatingSystem getLoginName),'@cvs.bh.exept.de:/cvs/stx'.
!
exeptsPublicSTXRepositoryModuleRoot
"the public repository, which is a read-only copy of the exept-internal repository.
- Updated every night."
-
+ Updated every night."
+
^ ':pserver:cvs@cvs.smalltalk-x.de:/cvs/stx'.
!
@@ -267,14 +269,14 @@
"/
"/ check if there is an stx directory there
"/
- ((f := CVSRoot asFilename) isDirectory
+ ((f := CVSRoot asFilename) isDirectory
and:[(top := f construct:'stx') isDirectory
and:[top isReadable]]) ifTrue:[
RemoteCVS := false
].
DefaultManager isNil ifTrue:[
- DefaultManager := self.
+ DefaultManager := self.
].
('CVSSourceCodeManager [info]: repository CVSROOT is ''' , CVSRoot , '''.') infoPrintCR.
@@ -287,7 +289,7 @@
"/ optionally set the WorkTreeDirectoryName from $STX_WORKTREE;
"/ if non-nil, a working tree is kept there
"/ and updated/commited files are not removed.
- "/ If you use a regular (make-) tree,
+ "/ If you use a regular (make-) tree,
"/ set WorkTreeDirectoryName (or the environment variable) to that.
"/
"/ this is not yet finished.
@@ -323,7 +325,7 @@
initializeForRepository:aDirectoryName
"set the global CVSROOT directory (i.e. the repositories name).
- And reinitialize.
+ And reinitialize.
Can be used from the launcher to change/configure the repository."
self repositoryName:aDirectoryName.
@@ -400,7 +402,7 @@
aString isEmptyOrNil ifTrue:[
CVSExecutable := nil
- ] ifFalse:[
+ ] ifFalse:[
CVSExecutable := aString.
].
@@ -1165,8 +1167,8 @@
line notNil ifTrue:[
line := line withoutSeparators.
line notEmpty ifTrue:[
- s := line restAfter:'RCS file:' withoutSeparators:true.
- s notNil ifTrue:[
+ s := line restAfter:'RCS file:' withoutSeparators:true.
+ s notNil ifTrue:[
(UnixFilename named:s) directory baseName = 'Attic' ifTrue:[
"/ file has been removed in the repository
revisionUsed := #deleted
@@ -1187,8 +1189,8 @@
revisionUsed := revisionUsed ? s. "/ deleted-info comes from the Attic-component in the path
info add:(fileName -> revisionUsed).
fileName := revisionUsed := nil.
- ].
- ].
+ ].
+ ].
]
].
^ info
@@ -1206,8 +1208,8 @@
line notNil ifTrue:[
line := line withoutSeparators.
line notEmpty ifTrue:[
- s := line restAfter:'RCS file:' withoutSeparators:true.
- s notNil ifTrue:[
+ s := line restAfter:'RCS file:' withoutSeparators:true.
+ s notNil ifTrue:[
(UnixFilename named:s) directory baseName = 'Attic' ifTrue:[
"/ file has been removed in the repository
revisionUsed := #deleted
@@ -1230,8 +1232,8 @@
info add:(fileName -> revisionUsed).
].
fileName := revisionUsed := nil.
- ].
- ].
+ ].
+ ].
]
].
^ info
@@ -4488,17 +4490,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.
].
@@ -4506,7 +4508,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 , '$'.
@@ -4557,8 +4559,8 @@
"Modified: / 28-02-2012 / 10:40:48 / cg"
!
-revisionLogOf:clsOrNil
- fromRevision:firstRevOrNil toRevision:lastRevOrNil numberOfRevisions:numRevisionsOrNil
+revisionLogOf:clsOrNil
+ fromRevision:firstRevOrNil toRevision:lastRevOrNil numberOfRevisions:numRevisionsOrNil
fileName:classFileName directory:packageDir module:moduleDir
"return info about the repository container and
@@ -4570,8 +4572,8 @@
The returned information is a structure (IdentityDictionary)
filled with:
- #container -> the CVS container file name
- #cvsRoot -> the CVS root (repository)
+ #container -> the CVS container file name
+ #cvsRoot -> the CVS root (repository)
#filename -> the actual source file name
#newestRevision -> the revisionString of the newest revision
#numberOfRevisions -> the number of revisions in the container (nil for all)
@@ -4595,7 +4597,7 @@
#numberOfChangedLines -> the number of changed lines w.r.t the previous (as string with +n -n)
#logMessage -> the checkIn log message
- revisions are ordered newest first
+ revisions are ordered newest first
(i.e. the last entry is for the initial revision; the first for the most recent one)
Attention: if state = 'dead' that revision is no longer valid.
"
@@ -4615,18 +4617,18 @@
|cmd revArg|
packageDir isEmptyOrNil ifTrue:[
- modulePath := moduleDir
+ modulePath := moduleDir
] ifFalse:[
- modulePath := moduleDir , '/' , packageDir.
+ modulePath := moduleDir , '/' , packageDir.
].
fullName := modulePath , '/' , classFileName.
self use_rlog ifFalse:[
- self createEntryFor:fullName
+ self createEntryFor:fullName
module:moduleDir
- in:(tempDir construct:modulePath)
- revision:'1.1'
- date:'dummy'
+ in:(tempDir construct:modulePath)
+ revision:'1.1'
+ date:'dummy'
special:''
overwrite:false.
].
@@ -4667,11 +4669,11 @@
cmd := ('log ' , revArg , ' ' , fullName).
].
- inStream := self
- executeCVSCommand:('rlog ' , revArg , ' ' , fullName)
- module:moduleDir
- inDirectory:tempDir
- log:true
+ inStream := self
+ executeCVSCommand:('rlog ' , revArg , ' ' , fullName)
+ module:moduleDir
+ inDirectory:tempDir
+ log:true
pipe:true.
(inStream isNil or:[inStream atEnd]) ifTrue:[
@@ -4698,7 +4700,7 @@
) pairWiseDo:[:word :key |
gotIt ifFalse:[
s := line restAfter:word withoutSeparators:true.
- s notNil ifTrue:[info at:key put:s. gotIt := true].
+ s notNil ifTrue:[info at:key put:s. gotIt := true].
]
].
gotIt ifFalse:[
@@ -4707,7 +4709,7 @@
tags := Dictionary new.
line:= inStream nextLine.
- [line notNil
+ [line notNil
and:[(line startsWith:Character space) or:[line startsWith:Character tab]]] whileTrue:[
tokens := line asCollectionOfSubstringsSeparatedBy:$:.
tags at:(tokens first withoutSeparators) put:(tokens second withoutSeparators).
@@ -4739,7 +4741,7 @@
info at:#numberOfSelectedRevisions put:selectedRevisions.
headerOnly ifFalse:[
"/
- "/ continue to read the commands pipe output
+ "/ continue to read the commands pipe output
"/ and extract revision info records
"/
inStream atEnd ifTrue:[
@@ -4781,12 +4783,12 @@
^ info
"
- SourceCodeManager revisionLogOf:Array
- SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43'
- SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:nil
- SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:'1.3'
- SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:nil
- SourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0
+ SourceCodeManager revisionLogOf:Array
+ SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43'
+ SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:nil
+ SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:'1.3'
+ SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:nil
+ SourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0
"
"Created: / 16-11-1995 / 13:25:30 / cg"
@@ -5787,7 +5789,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 '.
@@ -5817,23 +5819,24 @@
^ 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
"/libsvn uses $Id$ instead.
- "/self halt:'no longer supported'.
+ "/self halt:'no longer supported'.
words := s upToEnd asCollectionOfWords readStream.
- info fileName:(fn := words next).
+ fn := words next.
(fn endsWith:',v') ifFalse:[
"/ not a CVS version
^ nil
].
+ info fileName:(fn copyButLast:2).
info revision:(revString := words next).
"/ do not use matchesRegex:'[0-9]+\.[0-9]+.*') here: regex is an optional package
@@ -5860,6 +5863,7 @@
"Modified (comment): / 11-10-2011 / 23:41:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 22-11-2011 / 16:15:49 / cg"
"Modified (format): / 24-11-2011 / 10:56:51 / cg"
+ "Modified (format): / 07-03-2017 / 22:04:27 / mawalch"
! !
!CVSSourceCodeManager::CVSVersionInfo methodsFor:'accessing'!