The Trunk: Monticello-bf.562.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-bf.562.mcz

commits-2
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.562.mcz

==================== Summary ====================

Name: Monticello-bf.562
Author: bf
Time: 20 August 2013, 2:02:41.71 pm
UUID: beda0a3b-0217-4842-a1d0-10dd5f7277d1
Ancestors: Monticello-cmm.561

Add a utility method to check all packages for modifications, setting or resetting the 'modified' flag by comparing the image to the stored version.
MCWorkingCopy checkModified: true

=============== Diff against Monticello-cmm.561 ===============

Item was added:
+ ----- Method: MCWorkingCopy class>>checkModified: (in category 'as yet unclassified') -----
+ checkModified: thorough
+ "Verify that all working copies with a modified flag are really modified, by comparing them to their stored snapshot. If the 'thorough' argument is true, check all packages, even unmodified ones."
+ "MCWorkingCopy checkModified: true"
+ | workingCopies |
+ workingCopies := self allManagers.
+ thorough ifFalse: [
+ workingCopies := workingCopies select: [:wc | wc modified]].
+ workingCopies do: [:wc | wc checkModified]
+ displayingProgress: 'Checking package changes ...' translated.
+ !

Item was added:
+ ----- Method: MCWorkingCopy>>checkModified (in category 'operations') -----
+ checkModified
+ self ancestors size = 1
+ ifFalse: [
+ self modified: true]
+ ifTrue: [
+ | cleanSnapshot currentSnapshot modification |
+ cleanSnapshot := self findSnapshotWithVersionInfo: self ancestors first.
+ currentSnapshot := self package snapshot.
+ modification := currentSnapshot patchRelativeToBase: cleanSnapshot.
+ self modified: modification isEmpty not].
+ !


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.562.mcz

Bert Freudenberg
On 2013-08-20, at 12:02, [hidden email] wrote:

> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-bf.562.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-bf.562
> Author: bf
> Time: 20 August 2013, 2:02:41.71 pm
> UUID: beda0a3b-0217-4842-a1d0-10dd5f7277d1
> Ancestors: Monticello-cmm.561
>
> Add a utility method to check all packages for modifications, setting or resetting the 'modified' flag by comparing the image to the stored version.
> MCWorkingCopy checkModified: true


A couple of packages become dirty after updating even though they should not be. This is because of the recent change that allows to move stuff freely between packages.

This new utility method can be used to remove the 'modified' flag from these clean-but-marked-dirty packages (MCWorkingCopy checkModified: false). Perhaps this should even be done automatically after updating, but because it is not necessary all the time I did not add that. A thorough check might be a good idea to add as an image building step.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.562.mcz

Chris Muller-3
Bert could your new MCReorganizationPreloader detect when it did its
"move" magic and automatically invoke this utility on the affected
packages?

Or, at least a menu item.  If false-dirty packages are going to be the
norm going forward, we need something easy and accessible.

On Tue, Aug 20, 2013 at 2:22 PM, Bert Freudenberg <[hidden email]> wrote:

> On 2013-08-20, at 12:02, [hidden email] wrote:
>
>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-bf.562.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-bf.562
>> Author: bf
>> Time: 20 August 2013, 2:02:41.71 pm
>> UUID: beda0a3b-0217-4842-a1d0-10dd5f7277d1
>> Ancestors: Monticello-cmm.561
>>
>> Add a utility method to check all packages for modifications, setting or resetting the 'modified' flag by comparing the image to the stored version.
>> MCWorkingCopy checkModified: true
>
>
> A couple of packages become dirty after updating even though they should not be. This is because of the recent change that allows to move stuff freely between packages.
>
> This new utility method can be used to remove the 'modified' flag from these clean-but-marked-dirty packages (MCWorkingCopy checkModified: false). Perhaps this should even be done automatically after updating, but because it is not necessary all the time I did not add that. A thorough check might be a good idea to add as an image building step.
>
> - Bert -
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.562.mcz

Bert Freudenberg
Not the preloader itself, because it indeed makes the packages dirty. Only after the actual load step happened are the package clean again.

Previously I had tried to implement an "optimal" version that would only check those packages that needed it, but found it complicated the design too much.

Now I thought of a simpler approach, which simply re-checks the packages that were clean before but are dirty after updating. That one I committed.

Also I added the menu item you suggested. It's a good idea to use that in your working image once in a while. The "modified" flag does not always reflect reality, and this resets it. When you do so, you'll notice a lot of unnecessary "updating trunk" progress reports, not sure where these come from.

- Bert -

On 2013-09-11, at 02:56, Chris Muller <[hidden email]> wrote:

> Bert could your new MCReorganizationPreloader detect when it did its
> "move" magic and automatically invoke this utility on the affected
> packages?
>
> Or, at least a menu item.  If false-dirty packages are going to be the
> norm going forward, we need something easy and accessible.
>
> On Tue, Aug 20, 2013 at 2:22 PM, Bert Freudenberg <[hidden email]> wrote:
>> On 2013-08-20, at 12:02, [hidden email] wrote:
>>
>>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>>> http://source.squeak.org/trunk/Monticello-bf.562.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Monticello-bf.562
>>> Author: bf
>>> Time: 20 August 2013, 2:02:41.71 pm
>>> UUID: beda0a3b-0217-4842-a1d0-10dd5f7277d1
>>> Ancestors: Monticello-cmm.561
>>>
>>> Add a utility method to check all packages for modifications, setting or resetting the 'modified' flag by comparing the image to the stored version.
>>> MCWorkingCopy checkModified: true
>>
>>
>> A couple of packages become dirty after updating even though they should not be. This is because of the recent change that allows to move stuff freely between packages.
>>
>> This new utility method can be used to remove the 'modified' flag from these clean-but-marked-dirty packages (MCWorkingCopy checkModified: false). Perhaps this should even be done automatically after updating, but because it is not necessary all the time I did not add that. A thorough check might be a good idea to add as an image building step.
>>
>> - Bert -
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.562.mcz

Chris Muller-3
Great!  Good idea, the before and after comparison.  Thanks.

On Wed, Sep 11, 2013 at 11:01 AM, Bert Freudenberg <[hidden email]> wrote:

> Not the preloader itself, because it indeed makes the packages dirty. Only after the actual load step happened are the package clean again.
>
> Previously I had tried to implement an "optimal" version that would only check those packages that needed it, but found it complicated the design too much.
>
> Now I thought of a simpler approach, which simply re-checks the packages that were clean before but are dirty after updating. That one I committed.
>
> Also I added the menu item you suggested. It's a good idea to use that in your working image once in a while. The "modified" flag does not always reflect reality, and this resets it. When you do so, you'll notice a lot of unnecessary "updating trunk" progress reports, not sure where these come from.
>
> - Bert -
>
> On 2013-09-11, at 02:56, Chris Muller <[hidden email]> wrote:
>
>> Bert could your new MCReorganizationPreloader detect when it did its
>> "move" magic and automatically invoke this utility on the affected
>> packages?
>>
>> Or, at least a menu item.  If false-dirty packages are going to be the
>> norm going forward, we need something easy and accessible.
>>
>> On Tue, Aug 20, 2013 at 2:22 PM, Bert Freudenberg <[hidden email]> wrote:
>>> On 2013-08-20, at 12:02, [hidden email] wrote:
>>>
>>>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>>>> http://source.squeak.org/trunk/Monticello-bf.562.mcz
>>>>
>>>> ==================== Summary ====================
>>>>
>>>> Name: Monticello-bf.562
>>>> Author: bf
>>>> Time: 20 August 2013, 2:02:41.71 pm
>>>> UUID: beda0a3b-0217-4842-a1d0-10dd5f7277d1
>>>> Ancestors: Monticello-cmm.561
>>>>
>>>> Add a utility method to check all packages for modifications, setting or resetting the 'modified' flag by comparing the image to the stored version.
>>>> MCWorkingCopy checkModified: true
>>>
>>>
>>> A couple of packages become dirty after updating even though they should not be. This is because of the recent change that allows to move stuff freely between packages.
>>>
>>> This new utility method can be used to remove the 'modified' flag from these clean-but-marked-dirty packages (MCWorkingCopy checkModified: false). Perhaps this should even be done automatically after updating, but because it is not necessary all the time I did not add that. A thorough check might be a good idea to add as an image building step.
>>>
>>> - Bert -
>>>
>>>
>>>
>>
>
>