<br><div class="gmail_quote">Le 14 mars 2012 18:10, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Catching up on mailing list.<br>
<br>
Nicolas, a couple of questions -- I believe the "diffsWithPrettyPrint"<br>
takes care of this already doesn't it?<br>
<br></blockquote><div><br>Well, my main requirement was to reduce the size of the list of methods marked as modified in the MC diff/merge tools.<br>And I didn't see how this setting would change MCMethodDefinition>>=, which seems to be the base for constructing such list (along with #hash of course)...<br>
I'll have to inquire a bit more about this option.<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If not, why have variable names like "t1" as if it were decompiled<br>
code rather than type-suggesting / intention-revealing names?<br>
<br></blockquote><div>Obviously, this was unintentional...<br>It is one of these nice features of our tools to use Decompiler when source code is unreachable...<br>I corrected in version 499 after Eliot's notification.<br>
Whether I uncovered a bug in source code management or just created this bug myself by some nasty change, I can't tell, because I'm not able to reproduce above behavior.<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks..<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div>You're welcome, anyway this change is really a fast and dirty hack.<br>The most questionable side effect is that it changes the merge behavior.<br>
Using this setting would break proper image update process for example...<br>For this reason, I'm not sure it should really go as is in trunk, <br><br>Nicolas<br> <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="HOEnZb"><div class="h5">
On Fri, Mar 9, 2012 at 4:17 PM, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
> A new version of Monticello was added to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/Monticello-nice.498.mcz" target="_blank">http://source.squeak.org/inbox/Monticello-nice.498.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Monticello-nice.498<br>
> Author: nice<br>
> Time: 9 March 2012, 11:17:06.384 pm<br>
> UUID: 395becce-f60f-4242-a937-d1fc6ab4f462<br>
> Ancestors: Monticello-bf.496<br>
><br>
> Add a Monticello preference in order to #ignoreSourceCodeFormattingDifferences in method definitions.<br>
> This will affect the diff/merge behavior of Monticello.<br>
> When ignoring the differences, the diff is performed on the scanned tokens and _ := also compare equal.<br>
> It's generally a bad idea to ignore those diffs, but does really help when browsing diffs with distant cousins like Etoys or Pharo.<br>
><br>
> This preference must be considered as a quick hack.<br>
> A better idea would be to implement such filter in the Monticello UI, but this ain't gonna be as easy.<br>
><br>
> Bis and don't forget hash this time...<br>
><br>
> =============== Diff against Monticello-bf.496 ===============<br>
><br>
> Item was removed:<br>
> - SystemOrganization addCategory: #Monticello!<br>
> - SystemOrganization addCategory: #'Monticello-Base'!<br>
> - SystemOrganization addCategory: #'Monticello-Chunk Format'!<br>
> - SystemOrganization addCategory: #'Monticello-Loading'!<br>
> - SystemOrganization addCategory: #'Monticello-Merging'!<br>
> - SystemOrganization addCategory: #'Monticello-Modeling'!<br>
> - SystemOrganization addCategory: #'Monticello-Patching'!<br>
> - SystemOrganization addCategory: #'Monticello-Repositories'!<br>
> - SystemOrganization addCategory: #'Monticello-Storing'!<br>
> - SystemOrganization addCategory: #'Monticello-UI'!<br>
> - SystemOrganization addCategory: #'Monticello-Versioning'!<br>
> - SystemOrganization addCategory: #'Monticello-Mocks'!<br>
> - SystemOrganization addCategory: #'Monticello-Utilities'!<br>
><br>
> Item was added:<br>
> + SystemOrganization addCategory: #'Monticello-Base'!<br>
> + SystemOrganization addCategory: #'Monticello-Chunk Format'!<br>
> + SystemOrganization addCategory: #'Monticello-Loading'!<br>
> + SystemOrganization addCategory: #'Monticello-Merging'!<br>
> + SystemOrganization addCategory: #'Monticello-Modeling'!<br>
> + SystemOrganization addCategory: #'Monticello-Patching'!<br>
> + SystemOrganization addCategory: #'Monticello-Repositories'!<br>
> + SystemOrganization addCategory: #'Monticello-Storing'!<br>
> + SystemOrganization addCategory: #'Monticello-UI'!<br>
> + SystemOrganization addCategory: #'Monticello-Versioning'!<br>
><br>
> Item was changed:<br>
> MCDefinition subclass: #MCMethodDefinition<br>
> + instanceVariableNames: 'classIsMeta source category selector className timeStamp tokens'<br>
> + classVariableNames: 'IgnoreSourceCodeFormattingDifferences'<br>
> - instanceVariableNames: 'classIsMeta source category selector className timeStamp'<br>
> - classVariableNames: ''<br>
> poolDictionaries: ''<br>
> category: 'Monticello-Modeling'!<br>
> MCMethodDefinition class<br>
> instanceVariableNames: 'definitions'!<br>
> MCMethodDefinition class<br>
> instanceVariableNames: 'definitions'!<br>
><br>
> Item was added:<br>
> + ----- Method: MCMethodDefinition class>>ignoreSourceCodeFormattingDifferences (in category 'preferences') -----<br>
> + ignoreSourceCodeFormattingDifferences<br>
> + "Accessor for the system-wide preference"<br>
> +<br>
> + <preference: 'Ignore source code formatting differences'<br>
> + category: 'Monticello'<br>
> + description: 'If enabled, the diff and merge tools will ignore formatting differences.'<br>
> + type: #Boolean><br>
> + ^IgnoreSourceCodeFormattingDifferences ifNil: [ false ]!<br>
><br>
> Item was added:<br>
> + ----- Method: MCMethodDefinition class>>ignoreSourceCodeFormattingDifferences: (in category 'preferences') -----<br>
> + ignoreSourceCodeFormattingDifferences: aBoolean<br>
> + "Accessor for the system-wide preference"<br>
> +<br>
> + IgnoreSourceCodeFormattingDifferences := aBoolean!<br>
><br>
> Item was changed:<br>
> ----- Method: MCMethodDefinition>>= (in category 'comparing') -----<br>
> + = t1<br>
> + self class ignoreSourceCodeFormattingDifferences<br>
> + ifTrue: [^ super = t1<br>
> + and: [t1 tokens = self tokens]].<br>
> + ^ super = t1<br>
> + and: [t1 source = self source<br>
> + and: [t1 category = self category<br>
> + and: [t1 timeStamp = self timeStamp]]]!<br>
> - = aDefinition<br>
> - ^(super = aDefinition)<br>
> - and: [aDefinition source = self source<br>
> - and: [aDefinition category = self category<br>
> - and: [aDefinition timeStamp = self timeStamp]]]!<br>
><br>
> Item was changed:<br>
> ----- Method: MCMethodDefinition>>hash (in category 'comparing') -----<br>
> hash<br>
> + | t1 |<br>
> + self class ignoreSourceCodeFormattingDifferences<br>
> + ifTrue: [t1 := classIsMeta asString hashWithInitialHash: self tokens hash.<br>
> + t1 := className hashWithInitialHash: t1.<br>
> + ^ t1].<br>
> + t1 := classIsMeta asString hashWithInitialHash: 0.<br>
> + t1 := source hashWithInitialHash: t1.<br>
> + t1 := category hashWithInitialHash: t1.<br>
> + t1 := className hashWithInitialHash: t1.<br>
> + ^ t1!<br>
> - | hash |<br>
> - hash := classIsMeta asString hashWithInitialHash: 0.<br>
> - hash := source hashWithInitialHash: hash.<br>
> - hash := category hashWithInitialHash: hash.<br>
> - hash := className hashWithInitialHash: hash.<br>
> - ^ hash!<br>
><br>
> Item was changed:<br>
> ----- Method: MCMethodDefinition>>initializeWithClassName:classIsMeta:selector:category:timeStamp:source: (in category 'serializing') -----<br>
> initializeWithClassName: classString<br>
> classIsMeta: metaBoolean<br>
> selector: selectorString<br>
> category: catString<br>
> timeStamp: timeString<br>
> source: sourceString<br>
> className := classString asSymbol.<br>
> selector := selectorString asSymbol.<br>
> category := catString asSymbol.<br>
> timeStamp := timeString.<br>
> classIsMeta := metaBoolean.<br>
> source := sourceString withSqueakLineEndings.<br>
> + tokens := nil<br>
> !<br>
><br>
> Item was added:<br>
> + ----- Method: MCMethodDefinition>>tokens (in category 'accessing') -----<br>
> + tokens<br>
> + ^tokens ifNil: [tokens := (Scanner new scanTokens: self source) replaceAll: #'_' with: #':=']!<br>
><br>
><br>
<br>
</div></div></blockquote></div><br>