SourceCodeManagerUtilities.st
changeset 3900 621438521fee
parent 3896 41784f108832
child 3901 5b03b8d3968b
child 3906 0b1447ec43b9
--- a/SourceCodeManagerUtilities.st	Wed Sep 09 16:26:59 2015 +0200
+++ b/SourceCodeManagerUtilities.st	Wed Sep 09 16:28:50 2015 +0200
@@ -3251,7 +3251,7 @@
      Returns 2 values: a log message and additional checkinInfo (containing things like
      markAsStable, etc,)"
 
-    |initialLogMessage checkinInfo logMessage|
+    |initialLogMessage checkinInfo reasonLine logMessage|
     
     "/ heuristics for a useful initial log message...
     aLogInfoOrNil isNil ifTrue:[
@@ -3265,6 +3265,19 @@
                         initialAnswer:initialLogMessage.
         checkinInfo isNil ifTrue:[^ false].
         logMessage := checkinInfo logMessage.
+
+        reasonLine := '#OTHER'. 
+        checkinInfo checkinReason == Tools::CheckinInfoDialog reasonBugfix ifTrue:[
+            reasonLine := '#BUGFIX' 
+        ] ifFalse:[ 
+            checkinInfo checkinReason == Tools::CheckinInfoDialog reasonFeature ifTrue:[
+                reasonLine := '#FEATURE' 
+            ] ifFalse:[ 
+                checkinInfo checkinReason == Tools::CheckinInfoDialog reasonRefactoring ifTrue:[
+                    reasonLine := '#REFACTORING' 
+                ]
+            ]
+        ]
     ] ifFalse:[
         aLogInfoOrNil isString ifTrue:[
             "soon obsolete..."    
@@ -3277,6 +3290,9 @@
     logMessage notNil ifTrue:[  
         logMessage := logMessage asSingleByteStringReplaceInvalidWith:$?
     ].
+    reasonLine notNil ifTrue:[
+        logMessage := reasonLine , '\' withCRs , (logMessage ? '')
+    ].
     aBlock value:logMessage value:checkinInfo.
     ^ true
 !