--- a/CVSSourceCodeManager.st Thu Feb 23 16:47:42 2006 +0100
+++ b/CVSSourceCodeManager.st Thu Feb 23 20:33:33 2006 +0100
@@ -1251,6 +1251,10 @@
"Created: 7.12.1995 / 20:23:38 / cg"
"Modified: 16.9.1996 / 20:24:28 / cg"
+!
+
+use_rlog
+ ^ OperatingSystem isMSWINDOWSlike not
! !
!CVSSourceCodeManager class methodsFor:'source code access'!
@@ -3483,6 +3487,21 @@
|tempDir fullName modulePath inStream line s|
+ self use_rlog ifFalse:[
+ "/ Uses 'cvs status' - rlog seems not to work
+
+ |info|
+
+ info := self
+ statusOf:nil
+ fileName:classFileName
+ directory:packageDir
+ module:moduleDir.
+
+ info isNil ifTrue:[^ nil].
+ ^ info at:#newestRevision ifAbsent:nil
+ ].
+
modulePath := moduleDir , '/' , packageDir.
fullName := modulePath , '/' , classFileName.
@@ -3508,15 +3527,16 @@
line:= inStream nextLine.
line notNil ifTrue:[
line := line withoutSeparators.
- ].
- line notEmpty ifTrue:[
- s := line restAfter:'head:' withoutSeparators:true.
- s notNil ifTrue:[ |i|
- i := s indexOfSeparator.
- i ~~ 0 ifTrue:[
- s := s copyTo:i-1
- ].
- ^ s
+ line notEmpty ifTrue:[
+Transcript showCR:line.
+ s := line restAfter:'head:' withoutSeparators:true.
+ s notNil ifTrue:[ |i|
+ i := s indexOfSeparator.
+ i ~~ 0 ifTrue:[
+ s := s copyTo:i-1
+ ].
+ ^ s
+ ].
].
]
].
@@ -3924,13 +3944,33 @@
(i.e. the last entry is for the initial revision; the first for the most recent one)
"
- |tempDir fullName modulePath inStream inHeaderInfo atEnd line revArg idx
+ |tempDir fullName modulePath inStream inHeaderInfo atEnd line idx
info record revisionRecords s headerOnly msg|
- modulePath := moduleDir , '/' , packageDir.
- fullName := modulePath , '/' , classFileName.
+ self use_rlog ifFalse:[
+ tempDir := self createTempDirectory:nil forModule:nil.
+ tempDir isNil ifTrue:[
+ ('CVSSourceCodeManager [error]: no tempDir - cannot extract log') errorPrintCR.
+ ^ nil.
+ ].
+ ].
[
+ |cmd revArg|
+
+ modulePath := moduleDir , '/' , packageDir.
+ fullName := modulePath , '/' , classFileName.
+
+ self use_rlog ifFalse:[
+ self createEntryFor:fullName
+ module:moduleDir
+ in:(tempDir construct:modulePath)
+ revision:'1.1'
+ date:'dummy'
+ special:''
+ overwrite:false.
+ ].
+
revArg := ''.
headerOnly := false.
(firstRev notNil or:[lastRef notNil]) ifTrue:[
@@ -3961,6 +4001,12 @@
].
self activityNotification:msg.
+ self use_rlog ifTrue:[
+ cmd := ('rlog ' , revArg , ' ' , fullName).
+ ] ifFalse:[
+ cmd := ('log ' , revArg , ' ' , fullName).
+ ].
+
inStream := self
executeCVSCommand:('rlog ' , revArg , ' ' , fullName)
module:moduleDir
@@ -4049,6 +4095,14 @@
].
] ensure:[
inStream notNil ifTrue:[inStream close].
+
+ tempDir notNil ifTrue:[
+ OperatingSystem accessDeniedErrorSignal handle:[:ex |
+ ('CVSSourceCodeManager [warning]: could not remove tempDir ', tempDir pathName) infoPrintCR.
+ ] do:[
+ tempDir recursiveRemove
+ ].
+ ].
].
^ info
@@ -4232,7 +4286,7 @@
!CVSSourceCodeManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.298 2006-02-23 12:06:15 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/CVSSourceCodeManager.st,v 1.299 2006-02-23 19:33:33 cg Exp $'
! !
CVSSourceCodeManager initialize!