<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
Why does #<span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">conflictsWithUpdatedMethods return "nil" at all? Should always be an empty or non-empty collection.</span><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 04.03.2020 08:49:45 schrieb karl ramberg <karlramberg@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 3 Mar 2020 at 23:18, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of UpdateStream to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/UpdateStream-ct.13.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/UpdateStream-ct.13.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: UpdateStream-ct.13<br>
Author: ct<br>
Time: 21 December 2019, 1:00:30.046795 pm<br>
UUID: 4f856f41-7ea6-c744-a765-4f5bdc635989<br>
Ancestors: UpdateStream-mt.12<br>
<br>
Fix a small bug when dropping a changeset without conflicts into the image, showing the "conflicts with updated methods" and then pressing "no"<br>
<br>
=============== Diff against UpdateStream-mt.12 ===============<br>
<br>
Item was changed:<br>
----- Method: FilePackage class>>conflictsWithUpdatedMethods: (in category '*UpdateStream-instance creation') -----<br>
conflictsWithUpdatedMethods: fullName<br>
| conflicts changeList |<br>
conflicts := (self fromFileNamed: fullName) conflictsWithUpdatedMethods.<br>
+ (conflicts isNil or: [conflicts isEmpty]) ifTrue: [^ self].</blockquote><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Could this use isEmptyOrNil ?</div><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto">Karl</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
- conflicts isEmpty ifTrue: [^ self].<br>
changeList := ChangeList new.<br>
changeList<br>
changes: conflicts<br>
file: (FileDirectory default readOnlyFileNamed: fullName) close.<br>
ChangeList <br>
open: changeList<br>
name: 'Conflicts for ', (FileDirectory localNameFor: fullName)<br>
multiSelect: true.!<br>
<br>
Item was changed:<br>
----- Method: FilePackage>>conflictsWithUpdatedMethods (in category '*UpdateStream-conflict checker') -----<br>
conflictsWithUpdatedMethods<br>
"Check this package for conflicts with methods in the image which are in newer updates."<br>
<br>
| localFileName stream updateNumberString updateNumber imageUpdateNumber updateNumberChangeSet conflicts fileStream |<br>
+ <br>
- <br>
localFileName := FileDirectory localNameFor: fullName.<br>
stream := ReadStream on: sourceSystem.<br>
stream upToAll: 'latest update: #'.<br>
updateNumberString := stream upTo: $].<br>
stream close.<br>
<br>
fileStream := FileStream readOnlyFileNamed: fullName.<br>
(fileStream contentsOfEntireFile includes: Character linefeed)<br>
ifTrue: [self notify: 'The changeset file ', localFileName, ' contains linefeeds. Proceed if...<br>
you know that this is okay (e.g. the file contains raw binary data).'].<br>
fileStream close.<br>
+ <br>
- <br>
updateNumberString isEmpty ifFalse: "remove prepended junk, if any"<br>
[updateNumberString := (updateNumberString findTokens: Character space) last].<br>
updateNumberString asInteger ifNil:<br>
[(self confirm: 'Error: ', localFileName, ' has no valid Latest Update number in its header.<br>
Do you want to enter an update number for this file?')<br>
+ ifFalse: [^ nil]<br>
- ifFalse: [^ self]<br>
ifTrue: [updateNumberString := UIManager default<br>
request: 'Please enter the estimated update number (e.g. 4332).']].<br>
updateNumberString asInteger ifNil: [self inform: 'Conflict check cancelled.'. ^ self].<br>
updateNumber := updateNumberString asInteger.<br>
+ <br>
- <br>
imageUpdateNumber := SystemVersion current highestUpdate.<br>
updateNumber > imageUpdateNumber ifTrue:<br>
[(self confirm: 'Warning: The update number for this file (#', updateNumberString, ')<br>
is greater than the highest update number for this image (#', imageUpdateNumber asString, ').<br>
This probably means you need to update your image.<br>
Should we proceed anyway as if the file update number is #', imageUpdateNumber asString, '?')<br>
ifTrue:<br>
[updateNumber := imageUpdateNumber.<br>
updateNumberString := imageUpdateNumber asString]<br>
+ ifFalse: [^ nil]].<br>
+ <br>
- ifFalse: [^ self]].<br>
- <br>
updateNumberChangeSet := self findUpdateChangeSetMatching: updateNumber.<br>
+ updateNumberChangeSet ifNil: [^ nil].<br>
+ <br>
- updateNumberChangeSet ifNil: [^ self].<br>
- <br>
Smalltalk isMorphic ifTrue: [self currentWorld findATranscript: self currentEvent].<br>
self class logCr; logCr; log: 'Checking ', localFileName, ' (#', updateNumberString, ') for method conflicts with changesets after ', updateNumberChangeSet name, ' ...'.<br>
+ <br>
- <br>
conflicts := OrderedCollection new.<br>
self classes do: [:pseudoClass |<br>
(Array with: pseudoClass with: pseudoClass metaClass) do: [:classOrMeta |<br>
classOrMeta selectorsDo: [:selector | | conflict |<br>
conflict := self<br>
checkForMoreRecentUpdateThanChangeSet: updateNumberChangeSet<br>
pseudoClass: classOrMeta<br>
selector: selector.<br>
conflict ifNotNil: [conflicts add: conflict].<br>
].<br>
].<br>
].<br>
self class logCr; log: conflicts size asString, (' conflict' asPluralBasedOn: conflicts), ' found.'; logCr.<br>
self class closeLog.<br>
^ conflicts!<br>
<br>
<br>
</blockquote></div></div>
</div></blockquote>
</div></body>