The Trunk: Monticello-nice.694.mcz

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

The Trunk: Monticello-nice.694.mcz

commits-2
Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-nice.694.mcz

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

Name: Monticello-nice.694
Author: nice
Time: 13 February 2019, 5:10:42.293481 pm
UUID: 32251c33-6f20-4c4f-8e6b-b0bb32019731
Ancestors: Monticello-tpr.693

Warn about false ancestors thru bold-red-UI

A false ancestor is a package that has same name-author.versionNumber than a true ancestor, but not the same id (UUID).
Generally, its contents will be different from the true ancestor.
It is vital to know this information, particularly when browsing an inbox, otherwise we could override a true ancestor when moving/copying this package to repository that already contains the true one.

Right now, the warning is only for selected version in the versionList.
It's because the list is built from version names only and ignore ids.
Most actions will operate on selected version though, so it's better than nothing.

=============== Diff against Monticello-tpr.693 ===============

Item was changed:
  MCVersionInspector subclass: #MCRepositoryInspector
+ instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited inheritedId'
- instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited'
  classVariableNames: 'BrowseBranchedVersionsSeparately Order'
  poolDictionaries: ''
  category: 'Monticello-UI'!

Item was changed:
  ----- Method: MCRepositoryInspector>>identifyLoadedAndInherited: (in category 'morphic ui') -----
  identifyLoadedAndInherited: aMCWorkingCopy
  | seen |
  seen := Set new.
  aMCWorkingCopy ancestors do:
  [ : ancestor | loaded add: ancestor versionName.
  seen add: ancestor.
  ancestor ancestorsDoWhileTrue:
  [ : heir | (seen includes: heir)
  ifTrue: [ false ]
  ifFalse:
  [ inherited add: heir versionName.
+ inheritedId add: heir id.
  seen add: heir.
  true ] ] ]!

Item was changed:
  ----- Method: MCRepositoryInspector>>initializeEmphasis (in category 'initialize-release') -----
  initializeEmphasis
  inherited := Set new.
+ inheritedId := Set new.
  loaded := Set new!

Item was added:
+ ----- Method: MCRepositoryInspector>>selectedVersionIsFalseAncestor (in category 'testing') -----
+ selectedVersionIsFalseAncestor
+ "Answer true if selectedVersion is a false ancestor of working copy.
+ An ancestor of working copy that has same name, but not same id is a false ancestor!!"
+ ^(selectedVersion notNil
+ and: [(inherited includes: selectedVersion versionName)
+ and: [(inheritedId includes: self versionInfo id) not]])!

Item was added:
+ ----- Method: MCRepositoryInspector>>summary (in category 'morphic ui') -----
+ summary
+ self selectedVersionIsFalseAncestor
+ ifTrue: [^ (Text string: 'Beware, this is a false ancestor whose name conflicts with a true one\' withCRs attributes: {TextColor red. TextEmphasis bold})
+ , super summary].
+ ^ super summary!

Item was changed:
  ----- Method: MCRepositoryInspector>>versionHighlight: (in category 'morphic ui') -----
+ versionHighlight: aMCVersionName
- versionHighlight: aMCVersionName
  inherited ifNil: [inherited := #()].
+ inheritedId ifNil: [inheritedId := #()].
+ (selectedVersion notNil
+ and: [selectedVersion = aMCVersionName
+ and: [self selectedVersionIsFalseAncestor]])
+ ifTrue: ["False ancestor might be dangerous, signal them in red"
+ ^ Text string: aMCVersionName attributes: {TextColor red. TextEmphasis bold}].
+ ^ Text
- ^Text
  string: aMCVersionName
+ attribute: (TextEmphasis new
+ emphasisCode: ((loaded includes: aMCVersionName)
+ ifTrue: ["underlined" 4]
+ ifFalse: [(inherited includes: aMCVersionName)
+ ifTrue: [0]
+ ifFalse: ["bold" 1]]))!
- attribute: (TextEmphasis new emphasisCode: (
- ((loaded includes: aMCVersionName) ifTrue: [ 4 "underlined" ]
- ifFalse: [ (inherited includes: aMCVersionName)
- ifTrue: [ 0 ]
- ifFalse: [ 1 "bold" ] ])))!

Item was changed:
  ----- Method: MCRepositoryInspector>>versionSelection: (in category 'morphic ui') -----
  versionSelection: aNumber
  selectedVersion := version := nil.
  aNumber isZero ifFalse: [ selectedVersion := (self versionList at: aNumber) asString ].
+ self selectedVersionIsFalseAncestor ifTrue: [self changed: #versionList].
  self
  changed: #versionSelection ;
  changed: #summary ;
  changed: #hasVersion!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-nice.694.mcz

David T. Lewis
This should be very helpful. But I am confused, and I don't know
how to see the bold-red-UI warning.

Can you give an example of a browser that shows the bold red font?
For example, if I open a MCFileRepositoryInspector on the inbox,
with Monticello selected as the package in the left pane, should
I see a version in bold red font on the list of versions in the
right pane?

Thanks,
Dave


On Wed, Feb 13, 2019 at 04:10:48PM +0000, [hidden email] wrote:

> Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-nice.694.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-nice.694
> Author: nice
> Time: 13 February 2019, 5:10:42.293481 pm
> UUID: 32251c33-6f20-4c4f-8e6b-b0bb32019731
> Ancestors: Monticello-tpr.693
>
> Warn about false ancestors thru bold-red-UI
>
> A false ancestor is a package that has same name-author.versionNumber than a true ancestor, but not the same id (UUID).
> Generally, its contents will be different from the true ancestor.
> It is vital to know this information, particularly when browsing an inbox, otherwise we could override a true ancestor when moving/copying this package to repository that already contains the true one.
>
> Right now, the warning is only for selected version in the versionList.
> It's because the list is built from version names only and ignore ids.
> Most actions will operate on selected version though, so it's better than nothing.
>
> =============== Diff against Monticello-tpr.693 ===============
>
> Item was changed:
>   MCVersionInspector subclass: #MCRepositoryInspector
> + instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited inheritedId'
> - instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited'
>   classVariableNames: 'BrowseBranchedVersionsSeparately Order'
>   poolDictionaries: ''
>   category: 'Monticello-UI'!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>identifyLoadedAndInherited: (in category 'morphic ui') -----
>   identifyLoadedAndInherited: aMCWorkingCopy
>   | seen |
>   seen := Set new.
>   aMCWorkingCopy ancestors do:
>   [ : ancestor | loaded add: ancestor versionName.
>   seen add: ancestor.
>   ancestor ancestorsDoWhileTrue:
>   [ : heir | (seen includes: heir)
>   ifTrue: [ false ]
>   ifFalse:
>   [ inherited add: heir versionName.
> + inheritedId add: heir id.
>   seen add: heir.
>   true ] ] ]!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>initializeEmphasis (in category 'initialize-release') -----
>   initializeEmphasis
>   inherited := Set new.
> + inheritedId := Set new.
>   loaded := Set new!
>
> Item was added:
> + ----- Method: MCRepositoryInspector>>selectedVersionIsFalseAncestor (in category 'testing') -----
> + selectedVersionIsFalseAncestor
> + "Answer true if selectedVersion is a false ancestor of working copy.
> + An ancestor of working copy that has same name, but not same id is a false ancestor!!"
> + ^(selectedVersion notNil
> + and: [(inherited includes: selectedVersion versionName)
> + and: [(inheritedId includes: self versionInfo id) not]])!
>
> Item was added:
> + ----- Method: MCRepositoryInspector>>summary (in category 'morphic ui') -----
> + summary
> + self selectedVersionIsFalseAncestor
> + ifTrue: [^ (Text string: 'Beware, this is a false ancestor whose name conflicts with a true one\' withCRs attributes: {TextColor red. TextEmphasis bold})
> + , super summary].
> + ^ super summary!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>versionHighlight: (in category 'morphic ui') -----
> + versionHighlight: aMCVersionName
> - versionHighlight: aMCVersionName
>   inherited ifNil: [inherited := #()].
> + inheritedId ifNil: [inheritedId := #()].
> + (selectedVersion notNil
> + and: [selectedVersion = aMCVersionName
> + and: [self selectedVersionIsFalseAncestor]])
> + ifTrue: ["False ancestor might be dangerous, signal them in red"
> + ^ Text string: aMCVersionName attributes: {TextColor red. TextEmphasis bold}].
> + ^ Text
> - ^Text
>   string: aMCVersionName
> + attribute: (TextEmphasis new
> + emphasisCode: ((loaded includes: aMCVersionName)
> + ifTrue: ["underlined" 4]
> + ifFalse: [(inherited includes: aMCVersionName)
> + ifTrue: [0]
> + ifFalse: ["bold" 1]]))!
> - attribute: (TextEmphasis new emphasisCode: (
> - ((loaded includes: aMCVersionName) ifTrue: [ 4 "underlined" ]
> - ifFalse: [ (inherited includes: aMCVersionName)
> - ifTrue: [ 0 ]
> - ifFalse: [ 1 "bold" ] ])))!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>versionSelection: (in category 'morphic ui') -----
>   versionSelection: aNumber
>   selectedVersion := version := nil.
>   aNumber isZero ifFalse: [ selectedVersion := (self versionList at: aNumber) asString ].
> + self selectedVersionIsFalseAncestor ifTrue: [self changed: #versionList].
>   self
>   changed: #versionSelection ;
>   changed: #summary ;
>   changed: #hasVersion!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-nice.694.mcz

Nicolas Cellier
Hi Dave,
The bold-red only appears in version list, not in package list, and more over, only on selected version.
This is because the id are not easily accessible until the package is loaded.
For an example, select Installer-Core in inbox, any version.

Le jeu. 14 févr. 2019 à 03:21, David T. Lewis <[hidden email]> a écrit :
This should be very helpful. But I am confused, and I don't know
how to see the bold-red-UI warning.

Can you give an example of a browser that shows the bold red font?
For example, if I open a MCFileRepositoryInspector on the inbox,
with Monticello selected as the package in the left pane, should
I see a version in bold red font on the list of versions in the
right pane?

Thanks,
Dave


On Wed, Feb 13, 2019 at 04:10:48PM +0000, [hidden email] wrote:
> Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-nice.694.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-nice.694
> Author: nice
> Time: 13 February 2019, 5:10:42.293481 pm
> UUID: 32251c33-6f20-4c4f-8e6b-b0bb32019731
> Ancestors: Monticello-tpr.693
>
> Warn about false ancestors thru bold-red-UI
>
> A false ancestor is a package that has same name-author.versionNumber than a true ancestor, but not the same id (UUID).
> Generally, its contents will be different from the true ancestor.
> It is vital to know this information, particularly when browsing an inbox, otherwise we could override a true ancestor when moving/copying this package to repository that already contains the true one.
>
> Right now, the warning is only for selected version in the versionList.
> It's because the list is built from version names only and ignore ids.
> Most actions will operate on selected version though, so it's better than nothing.
>
> =============== Diff against Monticello-tpr.693 ===============
>
> Item was changed:
>   MCVersionInspector subclass: #MCRepositoryInspector
> +     instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited inheritedId'
> -     instanceVariableNames: 'repository packageNames versionNames selectedPackage selectedVersion order versionInfo loaded newer inherited'
>       classVariableNames: 'BrowseBranchedVersionsSeparately Order'
>       poolDictionaries: ''
>       category: 'Monticello-UI'!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>identifyLoadedAndInherited: (in category 'morphic ui') -----
>   identifyLoadedAndInherited: aMCWorkingCopy
>       | seen |
>       seen := Set new.
>       aMCWorkingCopy ancestors do:
>               [ : ancestor | loaded add: ancestor versionName.
>               seen add: ancestor.
>               ancestor ancestorsDoWhileTrue:
>                       [ : heir | (seen includes: heir)
>                               ifTrue: [ false ]
>                               ifFalse:
>                                       [ inherited add: heir versionName.
> +                                     inheritedId add: heir id.
>                                       seen add: heir.
>                                       true ] ] ]!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>initializeEmphasis (in category 'initialize-release') -----
>   initializeEmphasis
>       inherited := Set new.
> +     inheritedId := Set new.
>       loaded := Set new!
>
> Item was added:
> + ----- Method: MCRepositoryInspector>>selectedVersionIsFalseAncestor (in category 'testing') -----
> + selectedVersionIsFalseAncestor
> +     "Answer true if selectedVersion is a false ancestor of working copy.
> +     An ancestor of working copy that has same name, but not same id is a false ancestor!!"
> +     ^(selectedVersion notNil
> +                     and: [(inherited includes: selectedVersion versionName)
> +                                     and: [(inheritedId includes: self versionInfo id) not]])!
>
> Item was added:
> + ----- Method: MCRepositoryInspector>>summary (in category 'morphic ui') -----
> + summary
> +     self selectedVersionIsFalseAncestor
> +             ifTrue: [^ (Text string: 'Beware, this is a false ancestor whose name conflicts with a true one\' withCRs attributes: {TextColor red. TextEmphasis bold})
> +                             , super summary].
> +     ^ super summary!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>versionHighlight: (in category 'morphic ui') -----
> + versionHighlight: aMCVersionName
> - versionHighlight: aMCVersionName
>       inherited ifNil: [inherited := #()].
> +     inheritedId ifNil: [inheritedId := #()].
> +     (selectedVersion notNil
> +                     and: [selectedVersion = aMCVersionName
> +                                     and: [self selectedVersionIsFalseAncestor]])
> +             ifTrue: ["False ancestor might be dangerous, signal them in red"
> +                     ^ Text string: aMCVersionName attributes: {TextColor red. TextEmphasis bold}].
> +     ^ Text
> -     ^Text
>               string: aMCVersionName
> +             attribute: (TextEmphasis new
> +                             emphasisCode: ((loaded includes: aMCVersionName)
> +                                             ifTrue: ["underlined" 4]
> +                                             ifFalse: [(inherited includes: aMCVersionName)
> +                                                             ifTrue: [0]
> +                                                             ifFalse: ["bold" 1]]))!
> -             attribute: (TextEmphasis new emphasisCode: (
> -                     ((loaded includes: aMCVersionName) ifTrue: [ 4 "underlined" ]
> -                             ifFalse: [ (inherited includes: aMCVersionName)
> -                                     ifTrue: [ 0 ]
> -                                     ifFalse: [ 1 "bold" ] ])))!
>
> Item was changed:
>   ----- Method: MCRepositoryInspector>>versionSelection: (in category 'morphic ui') -----
>   versionSelection: aNumber
>       selectedVersion := version := nil.
>       aNumber isZero ifFalse: [ selectedVersion := (self versionList at: aNumber) asString ].
> +     self selectedVersionIsFalseAncestor ifTrue: [self changed: #versionList].
>       self
>                changed: #versionSelection ;
>                changed: #summary ;
>                changed: #hasVersion!
>
>



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-nice.694.mcz

David T. Lewis
Thank you, I see it now. This is very helpful :-)

Dave

On Thu, Feb 14, 2019 at 08:30:27AM +0100, Nicolas Cellier wrote:

> Hi Dave,
> The bold-red only appears in version list, not in package list, and more
> over, only on selected version.
> This is because the id are not easily accessible until the package is
> loaded.
> For an example, select Installer-Core in inbox, any version.
>
> Le jeu. 14 f??vr. 2019 ?? 03:21, David T. Lewis <[hidden email]> a
> ??crit :
>
> > This should be very helpful. But I am confused, and I don't know
> > how to see the bold-red-UI warning.
> >
> > Can you give an example of a browser that shows the bold red font?
> > For example, if I open a MCFileRepositoryInspector on the inbox,
> > with Monticello selected as the package in the left pane, should
> > I see a version in bold red font on the list of versions in the
> > right pane?
> >
> > Thanks,
> > Dave
> >
> >
> > On Wed, Feb 13, 2019 at 04:10:48PM +0000, [hidden email] wrote:
> > > Nicolas Cellier uploaded a new version of Monticello to project The
> > Trunk:
> > > http://source.squeak.org/trunk/Monticello-nice.694.mcz
> > >
> > > ==================== Summary ====================
> > >
> > > Name: Monticello-nice.694
> > > Author: nice
> > > Time: 13 February 2019, 5:10:42.293481 pm
> > > UUID: 32251c33-6f20-4c4f-8e6b-b0bb32019731
> > > Ancestors: Monticello-tpr.693
> > >
> > > Warn about false ancestors thru bold-red-UI
> > >
> > > A false ancestor is a package that has same name-author.versionNumber
> > than a true ancestor, but not the same id (UUID).
> > > Generally, its contents will be different from the true ancestor.
> > > It is vital to know this information, particularly when browsing an
> > inbox, otherwise we could override a true ancestor when moving/copying this
> > package to repository that already contains the true one.
> > >
> > > Right now, the warning is only for selected version in the versionList.
> > > It's because the list is built from version names only and ignore ids.
> > > Most actions will operate on selected version though, so it's better
> > than nothing.
> > >
> > > =============== Diff against Monticello-tpr.693 ===============
> > >
> > > Item was changed:
> > >   MCVersionInspector subclass: #MCRepositoryInspector
> > > +     instanceVariableNames: 'repository packageNames versionNames
> > selectedPackage selectedVersion order versionInfo loaded newer inherited
> > inheritedId'
> > > -     instanceVariableNames: 'repository packageNames versionNames
> > selectedPackage selectedVersion order versionInfo loaded newer inherited'
> > >       classVariableNames: 'BrowseBranchedVersionsSeparately Order'
> > >       poolDictionaries: ''
> > >       category: 'Monticello-UI'!
> > >
> > > Item was changed:
> > >   ----- Method: MCRepositoryInspector>>identifyLoadedAndInherited: (in
> > category 'morphic ui') -----
> > >   identifyLoadedAndInherited: aMCWorkingCopy
> > >       | seen |
> > >       seen := Set new.
> > >       aMCWorkingCopy ancestors do:
> > >               [ : ancestor | loaded add: ancestor versionName.
> > >               seen add: ancestor.
> > >               ancestor ancestorsDoWhileTrue:
> > >                       [ : heir | (seen includes: heir)
> > >                               ifTrue: [ false ]
> > >                               ifFalse:
> > >                                       [ inherited add: heir versionName.
> > > +                                     inheritedId add: heir id.
> > >                                       seen add: heir.
> > >                                       true ] ] ]!
> > >
> > > Item was changed:
> > >   ----- Method: MCRepositoryInspector>>initializeEmphasis (in category
> > 'initialize-release') -----
> > >   initializeEmphasis
> > >       inherited := Set new.
> > > +     inheritedId := Set new.
> > >       loaded := Set new!
> > >
> > > Item was added:
> > > + ----- Method: MCRepositoryInspector>>selectedVersionIsFalseAncestor
> > (in category 'testing') -----
> > > + selectedVersionIsFalseAncestor
> > > +     "Answer true if selectedVersion is a false ancestor of working
> > copy.
> > > +     An ancestor of working copy that has same name, but not same id is
> > a false ancestor!!"
> > > +     ^(selectedVersion notNil
> > > +                     and: [(inherited includes: selectedVersion
> > versionName)
> > > +                                     and: [(inheritedId includes: self
> > versionInfo id) not]])!
> > >
> > > Item was added:
> > > + ----- Method: MCRepositoryInspector>>summary (in category 'morphic
> > ui') -----
> > > + summary
> > > +     self selectedVersionIsFalseAncestor
> > > +             ifTrue: [^ (Text string: 'Beware, this is a false ancestor
> > whose name conflicts with a true one\' withCRs attributes: {TextColor red.
> > TextEmphasis bold})
> > > +                             , super summary].
> > > +     ^ super summary!
> > >
> > > Item was changed:
> > >   ----- Method: MCRepositoryInspector>>versionHighlight: (in category
> > 'morphic ui') -----
> > > + versionHighlight: aMCVersionName
> > > - versionHighlight: aMCVersionName
> > >       inherited ifNil: [inherited := #()].
> > > +     inheritedId ifNil: [inheritedId := #()].
> > > +     (selectedVersion notNil
> > > +                     and: [selectedVersion = aMCVersionName
> > > +                                     and: [self
> > selectedVersionIsFalseAncestor]])
> > > +             ifTrue: ["False ancestor might be dangerous, signal them
> > in red"
> > > +                     ^ Text string: aMCVersionName attributes:
> > {TextColor red. TextEmphasis bold}].
> > > +     ^ Text
> > > -     ^Text
> > >               string: aMCVersionName
> > > +             attribute: (TextEmphasis new
> > > +                             emphasisCode: ((loaded includes:
> > aMCVersionName)
> > > +                                             ifTrue: ["underlined" 4]
> > > +                                             ifFalse: [(inherited
> > includes: aMCVersionName)
> > > +                                                             ifTrue: [0]
> > > +                                                             ifFalse:
> > ["bold" 1]]))!
> > > -             attribute: (TextEmphasis new emphasisCode: (
> > > -                     ((loaded includes: aMCVersionName) ifTrue: [ 4
> > "underlined" ]
> > > -                             ifFalse: [ (inherited includes:
> > aMCVersionName)
> > > -                                     ifTrue: [ 0 ]
> > > -                                     ifFalse: [ 1 "bold" ] ])))!
> > >
> > > Item was changed:
> > >   ----- Method: MCRepositoryInspector>>versionSelection: (in category
> > 'morphic ui') -----
> > >   versionSelection: aNumber
> > >       selectedVersion := version := nil.
> > >       aNumber isZero ifFalse: [ selectedVersion := (self versionList at:
> > aNumber) asString ].
> > > +     self selectedVersionIsFalseAncestor ifTrue: [self changed:
> > #versionList].
> > >       self
> > >                changed: #versionSelection ;
> > >                changed: #summary ;
> > >                changed: #hasVersion!
> > >
> > >
> >
> >

>