BeeSourceWriter.st
branchjv
changeset 4366 5a3597de6ece
parent 4365 edfc925ae6b1
child 4368 ae1d97e98f56
--- a/BeeSourceWriter.st	Thu Oct 11 19:03:57 2018 +0200
+++ b/BeeSourceWriter.st	Thu Oct 11 19:44:14 2018 +0200
@@ -226,12 +226,26 @@
         "/ expanded by CVS. The same is true vice-versa for CVS-Ids, which get clobbered by SVN.
         "/ also used, when generating sourcecode for another Smalltalk system (VSE fileout)
 
+        | history author |
+
         rewriteQuery := AbstractSourceFileWriter methodSourceRewriteQuery new.
         rewriteQuery method:aMethod source:source.
         possiblyRewrittenSource := (rewriteQuery query) ? source.
 
+        history := HistoryManager getAllHistoriesFrom: source.
+        history notEmptyOrNil ifTrue:[ 
+            author := history last user.
+        ] ifFalse:[ 
+            | revInfo |
+
+            revInfo := aMethod revisionInfo.
+            revInfo notNil ifTrue:[ 
+                author := revInfo author.
+            ].
+        ].
+
         aStream nextPutAll: '!!MethodDefinition timeStamp:'; nextPutAll: timestamp storeString; 
-                nextPutAll: ' author: ';    nextPutAll: 'Unknown' storeString;
+                nextPutAll: ' author: ';    nextPutAll: (author ? 'Unknown') storeString;
                 nextPutAll: ' className: '; nextPutAll: aMethod mclass name storeString; 
                 nextPutAll: ' selector: ';  nextPutAll: aMethod selector storeString; 
                 nextPutAll: ' category: ';  nextPutAll: aMethod category storeString; 
@@ -242,7 +256,7 @@
     ].
 
     "Created: / 14-04-2015 / 12:41:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 14-04-2015 / 14:48:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 11-10-2018 / 19:40:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 fileOutMethods: methods on: stream