mcz writing: do not include version_XX methods when include St/X extras is not wanted jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 24 Apr 2015 08:41:13 +0100
branchjv
changeset 988 536fd853efeb
parent 987 7dbc6348209e
child 989 4589c38afe55
mcz writing: do not include version_XX methods when include St/X extras is not wanted Asked for bu Jan Kurs - Pharo guys don't want to have these when merging stuff from Smalltalk/X :-)
MCCommitDialog.st
MCStXSnapshotPreWriteTransformation.st
--- a/MCCommitDialog.st	Fri Apr 24 12:49:54 2015 +0100
+++ b/MCCommitDialog.st	Fri Apr 24 08:41:13 2015 +0100
@@ -34,12 +34,16 @@
 'A log message describing this version (your changes)'
 
 #includeExtrasForSTX
-'Include extra support files (makefiles) needed to build a binary class library under ST/X.
+'When checked, include extra support files (makefiles) needed to build a binary class library under ST/X.
 If this is not checked, only the plain code is saved which is needed to load the package as bytecode.
 Notice, that those files are not strictly required - they can easily be recreated by loading the package,
 and then recreating the support files from the system browser on the target system.
 Turn this off, if this package is meant to be transported to or shared with other Smalltalk dialects.
-(however, this is transparent to other Smalltalk dialects - these will simply ignore these additional definitions)'
+(however, this is transparent to other Smalltalk dialects - these will simply ignore these additional definitions)
+
+When unchecked, project definition class and version_XX methods are ommited (i.e., not present in .mcz).
+This may be desirable when commiting Smalltalk/X changes back to Squeak / Pharo upstream repository
+(and maintainer does not want these in the code even though it does not hurt)'
 
 #clearChangeSet
 'Clear the internal changeset after the Monticello commit'
@@ -51,6 +55,8 @@
 'The name of the version (will also be the name of the generated package file)'
 
 )
+
+    "Modified: / 24-04-2015 / 08:39:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !MCCommitDialog class methodsFor:'interface specs'!
@@ -547,6 +553,11 @@
     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.13 2015-02-25 00:12:38 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_MC
     ^ '$stx:goodies/monticello-cg.3 4e70fe70-f030-11e1-ac62-001f3bda2d09 2012-08-27T12:16:46 cg$'
 !
--- a/MCStXSnapshotPreWriteTransformation.st	Fri Apr 24 12:49:54 2015 +0100
+++ b/MCStXSnapshotPreWriteTransformation.st	Fri Apr 24 08:41:13 2015 +0100
@@ -201,14 +201,18 @@
 visitMethodDefinition: definition
     | class source |
 
-    "/ If St/X extras should not be included, then remove all methods
-    "/ that belong to project definition class.
     includeExtrasForSTX ifFalse:[  
+        "/ If St/X extras should not be included, then remove all methods
+        "/ that belong to project definition class.
         class := definition actualClass.
         class == projectDefinition ifTrue:[ 
             transformed definitions remove: definition.
             ^ self.
         ].
+        "/ Also, remove all version_XX methods
+        (AbstractSourceCodeManager isVersionMethodSelector: definition selector) ifTrue:[
+            transformed definitions remove: definition.
+        ]
     ].
 
     source := definition source asStringWithNativeLineEndings asStringCollection withTabs asStringWithSqueakLineEndings.
@@ -230,7 +234,7 @@
     ].
 
     "Created: / 30-05-2013 / 22:48:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 23-04-2015 / 23:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 24-04-2015 / 08:32:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 visitOrganizationDefinition: defintion
@@ -255,5 +259,10 @@
 
 version_CVS
     ^ '$Header: /cvs/stx/stx/goodies/monticello/MCStXSnapshotPreWriteTransformation.st,v 1.11 2015-03-30 19:54:21 cg Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !