Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.494.mcz
==================== Summary ====================
Name: Monticello-bf.494
Author: bf
Time: 24 February 2012, 4:27:52.801 pm
UUID: d27059d4-3f41-43b5-a488-0ac8a0066667
Ancestors: Monticello-bf.493
- fix branch handling in version names
- let MCDiffyVersion handle parsing diffy version names
=============== Diff against Monticello-bf.493 ===============
Item was added:
+ ----- Method: MCVersionDependency>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ ^self versionInfo packageAndBranchName!
Item was added:
+ ----- Method: MCVersionInfo>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ ^ name
+ ifNil: [ self name ]
+ ifNotNil: [ name asMCVersionName packageAndBranchName ]!
Item was removed:
- ----- Method: MCVersionName>>ancestorAuthor (in category 'accessing') -----
- ancestorAuthor
- "The author of the ancestor, if this is a Diffy filename."
-
- ^self ancestry copyUpTo: $.!
Item was removed:
- ----- Method: MCVersionName>>ancestorVersionNumber (in category 'accessing') -----
- ancestorVersionNumber
- "The author of the ancestor, if this is a Diffy filename."
-
- ^(self ancestry copyAfter: $.) asInteger ifNil: [ 0 ]!
Item was added:
+ ----- Method: MCVersionName>>baseVersionName (in category 'accessing') -----
+ baseVersionName
+ "The version name of our ancestor, if this is a Diffy filename."
+
+ ^(MCDiffyVersion baseNameFrom: (self copyUpThrough: $))) asMCVersionName!
Item was added:
+ ----- Method: MCVersionName>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ "The MC package name, possibly with branch name, embedded into this filename."
+
+ ^self versionName copyUpToLast: $-!
Item was changed:
----- Method: MCVersionName>>packageName (in category 'accessing') -----
packageName
"The MC Package name embedded into this filename."
+ ^self packageAndBranchName copyUpTo: $.!
- ^self versionName copyUpToLast: $-!
Item was changed:
----- Method: MCVersionName>>versionName (in category 'accessing') -----
versionName
"Answer my version name as a ByteString, without the file suffix or any ancestor-attributes."
| end |
+ self isEmpty ifTrue: [^ String empty].
+ end := self indexOf: $( ifAbsent: [
+ (self last between: $0 and: $9)
+ ifTrue: [ self size + 1 ]
+ ifFalse: [ self lastIndexOf: $. ifAbsent: [ self size + 1 ] ] ].
+ ^self first: end - 1!
- self isEmpty ifTrue: [^ String empty].
- (self last between: $0 and: $9)
- ifTrue: [ end := self size ]
- ifFalse: [
- end := (self lastIndexOf: $. ifAbsent: [ self size + 1 ]) - 1.
- end := end min: (self indexOf: $( ifAbsent: [ self size + 1 ]) - 1 ].
- ^self first: end!
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.494.mcz
==================== Summary ====================
Name: Monticello-bf.494
Author: bf
Time: 24 February 2012, 4:27:52.801 pm
UUID: d27059d4-3f41-43b5-a488-0ac8a0066667
Ancestors: Monticello-bf.493
- fix branch handling in version names
- let MCDiffyVersion handle parsing diffy version names
=============== Diff against Monticello-bf.493 ===============
Item was added:
+ ----- Method: MCVersionDependency>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ ^self versionInfo packageAndBranchName!
Item was added:
+ ----- Method: MCVersionInfo>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ ^ name
+ ifNil: [ self name ]
+ ifNotNil: [ name asMCVersionName packageAndBranchName ]!
Item was removed:
- ----- Method: MCVersionName>>ancestorAuthor (in category 'accessing') -----
- ancestorAuthor
- "The author of the ancestor, if this is a Diffy filename."
-
- ^self ancestry copyUpTo: $.!
Item was removed:
- ----- Method: MCVersionName>>ancestorVersionNumber (in category 'accessing') -----
- ancestorVersionNumber
- "The author of the ancestor, if this is a Diffy filename."
-
- ^(self ancestry copyAfter: $.) asInteger ifNil: [ 0 ]!
Item was added:
+ ----- Method: MCVersionName>>baseVersionName (in category 'accessing') -----
+ baseVersionName
+ "The version name of our ancestor, if this is a Diffy filename."
+
+ ^(MCDiffyVersion baseNameFrom: (self copyUpThrough: $))) asMCVersionName!
Item was added:
+ ----- Method: MCVersionName>>packageAndBranchName (in category 'accessing') -----
+ packageAndBranchName
+ "The MC package name, possibly with branch name, embedded into this filename."
+
+ ^self versionName copyUpToLast: $-!
Item was changed:
----- Method: MCVersionName>>packageName (in category 'accessing') -----
packageName
"The MC Package name embedded into this filename."
+ ^self packageAndBranchName copyUpTo: $.!
- ^self versionName copyUpToLast: $-!
Item was changed:
----- Method: MCVersionName>>versionName (in category 'accessing') -----
versionName
"Answer my version name as a ByteString, without the file suffix or any ancestor-attributes."
| end |
+ self isEmpty ifTrue: [^ String empty].
+ end := self indexOf: $( ifAbsent: [
+ (self last between: $0 and: $9)
+ ifTrue: [ self size + 1 ]
+ ifFalse: [ self lastIndexOf: $. ifAbsent: [ self size + 1 ] ] ].
+ ^self first: end - 1!
- self isEmpty ifTrue: [^ String empty].
- (self last between: $0 and: $9)
- ifTrue: [ end := self size ]
- ifFalse: [
- end := (self lastIndexOf: $. ifAbsent: [ self size + 1 ]) - 1.
- end := end min: (self indexOf: $( ifAbsent: [ self size + 1 ]) - 1 ].
- ^self first: end!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.146.mcz
==================== Summary ====================
Name: Tests-nice.146
Author: nice
Time: 22 February 2012, 11:13:55.416 pm
UUID: 8a2421e6-d98a-4acd-a225-22a152f00759
Ancestors: Tests-nice.145
Add a variant CompilerSyntaxErrorNotifyingTest for testing case of so called non interactive Compiler notification.
See class comment for the funny definition of "non interactive".
=============== Diff against Tests-nice.145 ===============
Item was added:
+ CompilerNotifyingTest subclass: #CompilerSyntaxErrorNotifyingTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Compiler'!
+
+ !CompilerSyntaxErrorNotifyingTest commentStamp: 'nice 2/22/2012 22:37' prior: 0!
+ A CompilerSyntaxErrorNotifyingTest is a specialization for testing correct handling of non interactive compiler notification.
+ Non interactive is a very relative notion in Smalltalk...
+ Here it means that user interaction will not happen directly in the TextEditor holding source code, but rather thru a SyntaxError window that will pop-up.
+ This test intercept the Notification before the pop-up is raised.
+ !
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest class>>shouldInheritSelectors (in category 'testing') -----
+ shouldInheritSelectors
+ "This class can recycle all of super tests, it just has to refine internal Compiler evaluation machinery"
+ ^true!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>enumerateAllSelections (in category 'private') -----
+ enumerateAllSelections
+ "This method intercepts the SyntaxErrorNotification and prevent the SyntaxError morph to open.
+ The notification errorCode hold the source of evaluated sub-selection with inserted error message.
+ This can be compared to expected error notification."
+ | syntaxErrorProbe |
+ syntaxErrorProbe := Object new.
+ 1 to: self numberOfSelections do: [:n |
+ | result |
+ result := [self evaluateSelectionNumber: n] on: SyntaxErrorNotification do: [:exc |
+ | expectedSourceWithError expectedNotificationLocation |
+ expectedNotificationLocation := (expectedErrorPositions at: n) - (morph editor startIndex - 1).
+ expectedSourceWithError := morph editor selection
+ copyReplaceFrom: expectedNotificationLocation
+ to: expectedNotificationLocation - 1
+ with: (expectedErrors at: n) allButFirst.
+ self assert: expectedSourceWithError = exc errorCode asString.
+ exc return: syntaxErrorProbe].
+ self assert: result == syntaxErrorProbe].!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>evaluateSelection (in category 'private') -----
+ evaluateSelection
+ ^(nil class evaluatorClass new)
+ evaluate: morph editor selection readStream
+ "Note subtle difference versus (morph editor selectionAsStream).
+ The later does not answer the same contents and would raise a SyntaxErrorNotification with wrong sub-selection"
+ in: nil
+ to: nil
+ notifying: nil
+ ifFail: [^failure]
+ logged: false!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.146.mcz
==================== Summary ====================
Name: Tests-nice.146
Author: nice
Time: 22 February 2012, 11:13:55.416 pm
UUID: 8a2421e6-d98a-4acd-a225-22a152f00759
Ancestors: Tests-nice.145
Add a variant CompilerSyntaxErrorNotifyingTest for testing case of so called non interactive Compiler notification.
See class comment for the funny definition of "non interactive".
=============== Diff against Tests-nice.145 ===============
Item was added:
+ CompilerNotifyingTest subclass: #CompilerSyntaxErrorNotifyingTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Compiler'!
+
+ !CompilerSyntaxErrorNotifyingTest commentStamp: 'nice 2/22/2012 22:37' prior: 0!
+ A CompilerSyntaxErrorNotifyingTest is a specialization for testing correct handling of non interactive compiler notification.
+ Non interactive is a very relative notion in Smalltalk...
+ Here it means that user interaction will not happen directly in the TextEditor holding source code, but rather thru a SyntaxError window that will pop-up.
+ This test intercept the Notification before the pop-up is raised.
+ !
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest class>>shouldInheritSelectors (in category 'testing') -----
+ shouldInheritSelectors
+ "This class can recycle all of super tests, it just has to refine internal Compiler evaluation machinery"
+ ^true!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>enumerateAllSelections (in category 'private') -----
+ enumerateAllSelections
+ "This method intercepts the SyntaxErrorNotification and prevent the SyntaxError morph to open.
+ The notification errorCode hold the source of evaluated sub-selection with inserted error message.
+ This can be compared to expected error notification."
+ | syntaxErrorProbe |
+ syntaxErrorProbe := Object new.
+ 1 to: self numberOfSelections do: [:n |
+ | result |
+ result := [self evaluateSelectionNumber: n] on: SyntaxErrorNotification do: [:exc |
+ | expectedSourceWithError expectedNotificationLocation |
+ expectedNotificationLocation := (expectedErrorPositions at: n) - (morph editor startIndex - 1).
+ expectedSourceWithError := morph editor selection
+ copyReplaceFrom: expectedNotificationLocation
+ to: expectedNotificationLocation - 1
+ with: (expectedErrors at: n) allButFirst.
+ self assert: expectedSourceWithError = exc errorCode asString.
+ exc return: syntaxErrorProbe].
+ self assert: result == syntaxErrorProbe].!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>evaluateSelection (in category 'private') -----
+ evaluateSelection
+ ^(nil class evaluatorClass new)
+ evaluate: morph editor selection readStream
+ "Note subtle difference versus (morph editor selectionAsStream).
+ The later does not answer the same contents and would raise a SyntaxErrorNotification with wrong sub-selection"
+ in: nil
+ to: nil
+ notifying: nil
+ ifFail: [^failure]
+ logged: false!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.146.mcz
==================== Summary ====================
Name: Tests-nice.146
Author: nice
Time: 22 February 2012, 11:13:55.416 pm
UUID: 8a2421e6-d98a-4acd-a225-22a152f00759
Ancestors: Tests-nice.145
Add a variant CompilerSyntaxErrorNotifyingTest for testing case of so called non interactive Compiler notification.
See class comment for the funny definition of "non interactive".
=============== Diff against Tests-nice.145 ===============
Item was added:
+ CompilerNotifyingTest subclass: #CompilerSyntaxErrorNotifyingTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tests-Compiler'!
+
+ !CompilerSyntaxErrorNotifyingTest commentStamp: 'nice 2/22/2012 22:37' prior: 0!
+ A CompilerSyntaxErrorNotifyingTest is a specialization for testing correct handling of non interactive compiler notification.
+ Non interactive is a very relative notion in Smalltalk...
+ Here it means that user interaction will not happen directly in the TextEditor holding source code, but rather thru a SyntaxError window that will pop-up.
+ This test intercept the Notification before the pop-up is raised.
+ !
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest class>>shouldInheritSelectors (in category 'testing') -----
+ shouldInheritSelectors
+ "This class can recycle all of super tests, it just has to refine internal Compiler evaluation machinery"
+ ^true!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>enumerateAllSelections (in category 'private') -----
+ enumerateAllSelections
+ "This method intercepts the SyntaxErrorNotification and prevent the SyntaxError morph to open.
+ The notification errorCode hold the source of evaluated sub-selection with inserted error message.
+ This can be compared to expected error notification."
+ | syntaxErrorProbe |
+ syntaxErrorProbe := Object new.
+ 1 to: self numberOfSelections do: [:n |
+ | result |
+ result := [self evaluateSelectionNumber: n] on: SyntaxErrorNotification do: [:exc |
+ | expectedSourceWithError expectedNotificationLocation |
+ expectedNotificationLocation := (expectedErrorPositions at: n) - (morph editor startIndex - 1).
+ expectedSourceWithError := morph editor selection
+ copyReplaceFrom: expectedNotificationLocation
+ to: expectedNotificationLocation - 1
+ with: (expectedErrors at: n) allButFirst.
+ self assert: expectedSourceWithError = exc errorCode asString.
+ exc return: syntaxErrorProbe].
+ self assert: result == syntaxErrorProbe].!
Item was added:
+ ----- Method: CompilerSyntaxErrorNotifyingTest>>evaluateSelection (in category 'private') -----
+ evaluateSelection
+ ^(nil class evaluatorClass new)
+ evaluate: morph editor selection readStream
+ "Note subtle difference versus (morph editor selectionAsStream).
+ The later does not answer the same contents and would raise a SyntaxErrorNotification with wrong sub-selection"
+ in: nil
+ to: nil
+ notifying: nil
+ ifFail: [^failure]
+ logged: false!