[squeak-dev] The Inbox: Monticello-nice.498.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Mar 14 18:31:10 UTC 2012


Le 14 mars 2012 18:10, Chris Muller <asqueaker at gmail.com> a écrit :

> Catching up on mailing list.
>
> Nicolas, a couple of questions -- I believe the "diffsWithPrettyPrint"
> takes care of this already doesn't it?
>
>
Well, my main requirement was to reduce the size of the list of methods
marked as modified in the MC diff/merge tools.
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)...
I'll have to inquire a bit more about this option.

If not, why have variable names like "t1" as if it were decompiled
> code rather than type-suggesting / intention-revealing names?
>
> Obviously, this was unintentional...
It is one of these nice features of our tools to use Decompiler when source
code is unreachable...
I corrected in version 499 after Eliot's notification.
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.


> Thanks..
>
> You're welcome, anyway this change is really a fast and dirty hack.
The most questionable side effect is that it changes the merge behavior.
Using this setting would break proper image update process for example...
For this reason, I'm not sure it should really go as is in trunk,

Nicolas


> On Fri, Mar 9, 2012 at 4:17 PM,  <commits at source.squeak.org> wrote:
> > A new version of Monticello was added to project The Inbox:
> > http://source.squeak.org/inbox/Monticello-nice.498.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Monticello-nice.498
> > Author: nice
> > Time: 9 March 2012, 11:17:06.384 pm
> > UUID: 395becce-f60f-4242-a937-d1fc6ab4f462
> > Ancestors: Monticello-bf.496
> >
> > Add a Monticello preference in order to
> #ignoreSourceCodeFormattingDifferences in method definitions.
> > This will affect the diff/merge behavior of Monticello.
> > When ignoring the differences, the diff is performed on the scanned
> tokens and _ := also compare equal.
> > It's generally a bad idea to ignore those diffs, but does really help
> when browsing diffs with distant cousins like Etoys or Pharo.
> >
> > This preference must be considered as a quick hack.
> > A better idea would be to implement such filter in the Monticello UI,
> but this ain't gonna be as easy.
> >
> > Bis and don't forget hash this time...
> >
> > =============== Diff against Monticello-bf.496 ===============
> >
> > Item was removed:
> > - SystemOrganization addCategory: #Monticello!
> > - SystemOrganization addCategory: #'Monticello-Base'!
> > - SystemOrganization addCategory: #'Monticello-Chunk Format'!
> > - SystemOrganization addCategory: #'Monticello-Loading'!
> > - SystemOrganization addCategory: #'Monticello-Merging'!
> > - SystemOrganization addCategory: #'Monticello-Modeling'!
> > - SystemOrganization addCategory: #'Monticello-Patching'!
> > - SystemOrganization addCategory: #'Monticello-Repositories'!
> > - SystemOrganization addCategory: #'Monticello-Storing'!
> > - SystemOrganization addCategory: #'Monticello-UI'!
> > - SystemOrganization addCategory: #'Monticello-Versioning'!
> > - SystemOrganization addCategory: #'Monticello-Mocks'!
> > - SystemOrganization addCategory: #'Monticello-Utilities'!
> >
> > Item was added:
> > + SystemOrganization addCategory: #'Monticello-Base'!
> > + SystemOrganization addCategory: #'Monticello-Chunk Format'!
> > + SystemOrganization addCategory: #'Monticello-Loading'!
> > + SystemOrganization addCategory: #'Monticello-Merging'!
> > + SystemOrganization addCategory: #'Monticello-Modeling'!
> > + SystemOrganization addCategory: #'Monticello-Patching'!
> > + SystemOrganization addCategory: #'Monticello-Repositories'!
> > + SystemOrganization addCategory: #'Monticello-Storing'!
> > + SystemOrganization addCategory: #'Monticello-UI'!
> > + SystemOrganization addCategory: #'Monticello-Versioning'!
> >
> > Item was changed:
> >  MCDefinition subclass: #MCMethodDefinition
> > +       instanceVariableNames: 'classIsMeta source category selector
> className timeStamp tokens'
> > +       classVariableNames: 'IgnoreSourceCodeFormattingDifferences'
> > -       instanceVariableNames: 'classIsMeta source category selector
> className timeStamp'
> > -       classVariableNames: ''
> >        poolDictionaries: ''
> >        category: 'Monticello-Modeling'!
> >  MCMethodDefinition class
> >        instanceVariableNames: 'definitions'!
> >  MCMethodDefinition class
> >        instanceVariableNames: 'definitions'!
> >
> > Item was added:
> > + ----- Method: MCMethodDefinition
> class>>ignoreSourceCodeFormattingDifferences (in category 'preferences')
> -----
> > + ignoreSourceCodeFormattingDifferences
> > +       "Accessor for the system-wide preference"
> > +
> > +       <preference: 'Ignore source code formatting differences'
> > +               category: 'Monticello'
> > +               description: 'If enabled, the diff and merge tools will
> ignore formatting differences.'
> > +               type: #Boolean>
> > +       ^IgnoreSourceCodeFormattingDifferences ifNil: [ false ]!
> >
> > Item was added:
> > + ----- Method: MCMethodDefinition
> class>>ignoreSourceCodeFormattingDifferences: (in category 'preferences')
> -----
> > + ignoreSourceCodeFormattingDifferences: aBoolean
> > +       "Accessor for the system-wide preference"
> > +
> > +       IgnoreSourceCodeFormattingDifferences := aBoolean!
> >
> > Item was changed:
> >  ----- Method: MCMethodDefinition>>= (in category 'comparing') -----
> > + = t1
> > +       self class ignoreSourceCodeFormattingDifferences
> > +               ifTrue: [^ super = t1
> > +                               and: [t1 tokens = self tokens]].
> > +       ^ super = t1
> > +               and: [t1 source = self source
> > +                               and: [t1 category = self category
> > +                                               and: [t1 timeStamp =
> self timeStamp]]]!
> > - = aDefinition
> > -       ^(super = aDefinition)
> > -               and: [aDefinition source = self source
> > -               and: [aDefinition category = self category
> > -               and: [aDefinition timeStamp = self timeStamp]]]!
> >
> > Item was changed:
> >  ----- Method: MCMethodDefinition>>hash (in category 'comparing') -----
> >  hash
> > +       | t1 |
> > +       self class ignoreSourceCodeFormattingDifferences
> > +               ifTrue: [t1 := classIsMeta asString hashWithInitialHash:
> self tokens hash.
> > +                       t1 := className hashWithInitialHash: t1.
> > +                       ^ t1].
> > +       t1 := classIsMeta asString hashWithInitialHash: 0.
> > +       t1 := source hashWithInitialHash: t1.
> > +       t1 := category hashWithInitialHash: t1.
> > +       t1 := className hashWithInitialHash: t1.
> > +       ^ t1!
> > -       | hash |
> > -       hash := classIsMeta asString hashWithInitialHash: 0.
> > -       hash := source hashWithInitialHash: hash.
> > -       hash := category hashWithInitialHash: hash.
> > -       hash := className hashWithInitialHash: hash.
> > -       ^ hash!
> >
> > Item was changed:
> >  ----- Method:
> MCMethodDefinition>>initializeWithClassName:classIsMeta:selector:category:timeStamp:source:
> (in category 'serializing') -----
> >  initializeWithClassName: classString
> >  classIsMeta: metaBoolean
> >  selector: selectorString
> >  category: catString
> >  timeStamp: timeString
> >  source: sourceString
> >        className := classString asSymbol.
> >        selector := selectorString asSymbol.
> >        category := catString asSymbol.
> >        timeStamp := timeString.
> >        classIsMeta := metaBoolean.
> >        source := sourceString withSqueakLineEndings.
> > +       tokens := nil
> >  !
> >
> > Item was added:
> > + ----- Method: MCMethodDefinition>>tokens (in category 'accessing')
> -----
> > + tokens
> > +       ^tokens ifNil: [tokens := (Scanner new scanTokens: self source)
> replaceAll: #'_' with: #':=']!
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120314/7016e591/attachment.htm


More information about the Squeak-dev mailing list