Removing DoIts from a changeset

Torge Husfeldt torge.husfeldt at gmx.de
Wed May 7 18:24:25 UTC 2003


Hi Chris,


On Tue, 6 May 2003 05:50:15 -0400, Chris Reuter 
<cgreuter at csclub.uwaterloo.ca> wrote:

> In article <200305051619.15824 at ned.bike-nomad.com>,
> Ned Konz  <squeak-dev at lists.squeakfoundation.org> wrote:
>> On Monday 05 May 2003 04:06 pm, Chris Reuter wrote:
>>> I have a change set that contains a number of DoIts which invoke
>>> various initialization methods.  I'm trying to phase these out in
>>> favour of a SAR postscript.
>>
>> How did you get DoIts into a change set?
>
> Well _that_ sounds ominous.
>
> And now that I think of it, I have no idea.  It just started doing the
> right thing all of a sudden.  I guess there was (is?) a bug somewhere
> that let it in.  It would have happened in 2.4, probably.

There is AFAICT a feature in the fileout mechanism that adds these doIts
for all class initialization methods of the changeset.
That means it is OK to have them in the textual representation but they
don't show up in a message sorter.
It is in the method ChangeSet>>fileOutPSFor:on:.
You could comment out the marked ifFalse: block or make it a Preference.
fileOutPSFor: class on: stream 	"Write out removals and initialization for 
this class."

	| dict changeType classRecord currentDef |
	classRecord _ changeRecords at: class name ifAbsent: [^ self].
	dict _ classRecord methodChangeTypes.
	dict keysSortedSafely do:
		[:key | changeType _ dict at: key.
		(#(remove addedThenRemoved) includes: changeType)
			ifTrue: [stream nextChunkPut: class name,
						' removeSelector: ', key storeString; cr]
"here comes the block"
			ifFalse: [(key = #initialize and: [class isMeta]) ifTrue:
						[stream nextChunkPut: class soleInstance name, ' initialize'; cr]]].
"up to here"
	((classRecord includesChangeType: #change)
		and: [(currentDef _ class definition) ~= (self fatDefForClass: class)]) 
ifTrue:
		[stream command: 'H3'; nextChunkPut: currentDef; cr; command: '/H3'].
	(classRecord includesChangeType: #reorganize) ifTrue:
		[class fileOutOrganizationOn: stream.
		stream cr]

>
> I guess it's time to take a text editor to the changeset.
>
>
> --Chris
>
>
HTH,
Torge


-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



More information about the Squeak-dev mailing list