--- a/AbstractSourceCodeManager.st Fri Nov 14 14:27:40 2008 +0100
+++ b/AbstractSourceCodeManager.st Fri Nov 14 14:27:42 2008 +0100
@@ -327,7 +327,18 @@
"Created: / 23-08-2006 / 14:05:42 / cg"
!
-revisionLogOf:cls fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir
+revisionLogOf:clsOrNil fromRevision:firstRev toRevision:lastRef fileName:classFileName directory:packageDir module:moduleDir
+ ^ self
+ revisionLogOf:clsOrNil
+ fromRevision:firstRev
+ toRevision:lastRef
+ numberOfRevisions:nil
+ fileName:classFileName
+ directory:packageDir
+ module:moduleDir
+!
+
+revisionLogOf:cls fromRevision:rev1 toRevision:rev2 numberOfRevisions:limitOrNil fileName:classFileName directory:packageDir module:moduleDir
"actually do return a revisionLog. The main worker method.
This must be implemented by a concrete source-code manager"
@@ -1801,6 +1812,50 @@
the first for the most recent one)
"
+ ^ self
+ revisionLogOf:aClass fromRevision:rev1 toRevision:rev2
+ finishAfter:nil
+!
+
+revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCountOrNil
+ "return info about the repository container and
+ (part of) the revisionlog as a collection of revision entries.
+ Return nil on failure.
+
+ The returned information is a structure (IdentityDictionary)
+ filled with:
+ #container -> the RCS container file name
+ #filename -> the actual source file name
+ #newestRevision -> the revisionString of the newest revision
+ #numberOfRevisions -> the number of revisions in the container
+ #revisions -> collection of per-revision info (see below)
+
+ for some classes, additional info is returned:
+
+ #renamed -> true if the class has been renamed or copied
+ and the sourceInfo is from the previous one
+ #expectedFileName -> the filename we would expect (i.e. for the new class)
+
+ rev1 / rev2 specify from which revisions a logEntry is wanted:
+ If rev1 is nil, the first revision is the initial revision
+ otherwise, the log starts with that revision.
+ If rev2 is nil, the last revision is the newest revision
+ otherwise, the log ends with that revision.
+ If both are nil, no logEntries are extracted (i.e. only the header).
+
+ per revision info consists of one record per revision:
+
+ #revision -> the revision string
+ #author -> who checked that revision into the repository
+ #date -> when was it checked in
+ #state -> the RCS state
+ #numberOfChangedLines -> the number of changed line w.r.t the previous
+
+ revisions are ordered newest first
+ (i.e. the last entry is for the initial revision;
+ the first for the most recent one)
+ "
+
|sourceInfo packageDir moduleDir classFileName info|
sourceInfo := self sourceInfoOfClass:aClass.
@@ -1814,6 +1869,7 @@
revisionLogOf:aClass
fromRevision:rev1
toRevision:rev2
+ numberOfRevisions:maxCountOrNil
fileName:classFileName
directory:packageDir
module:moduleDir.
@@ -2287,12 +2343,12 @@
"Modified: 27.11.1996 / 18:26:30 / stefan"
!
-writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream
+writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCount to:aStream
"extract a classes log and append it to aStream."
|log |
- log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2.
+ log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2 finishAfter:maxCount.
log isNil ifTrue:[
aStream cr; nextPutAll:' ** No revision log available **'.
^ false
@@ -2309,11 +2365,41 @@
"Modified: 14.2.1997 / 21:11:57 / cg"
!
-writeRevisionLogOf:aClass to:aStream
+writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream
"extract a classes log and append it to aStream."
^ self
- writeRevisionLogOf:aClass fromRevision:nil toRevision:nil to:aStream
+ writeRevisionLogOf:aClass
+ fromRevision:rev1 toRevision:rev2
+ finishAfter:nil to:aStream
+
+ "
+ SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript
+ "
+
+ "Created: 6.11.1995 / 18:56:00 / cg"
+ "Modified: 14.2.1997 / 21:11:57 / cg"
+!
+
+writeRevisionLogOf:aClass short:shortOrNot to:aStream
+ "extract a classes log and append it to aStream."
+
+ ^ self
+ writeRevisionLogOf:aClass
+ fromRevision:nil
+ toRevision:nil
+ finishAfter:(shortOrNot ifTrue:20 ifFalse:nil)
+ to:aStream
+
+ "
+ SourceCodeManager writeRevisionLogOf:Array to:Transcript
+ "
+!
+
+writeRevisionLogOf:aClass to:aStream
+ "extract a classes log and append it to aStream."
+
+ ^ self writeRevisionLogOf:aClass short:false to:aStream
"
SourceCodeManager writeRevisionLogOf:Array to:Transcript
@@ -2357,7 +2443,7 @@
!AbstractSourceCodeManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.211 2008-10-30 15:55:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.212 2008-11-14 13:27:42 cg Exp $'
! !
AbstractSourceCodeManager initialize!