pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

Loading from a git repository with Metacello on a running seaside image

EO
Emilio Oca
Sat, Apr 23, 2022 1:21 AM

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Hi List I need some help with Metacello, and may be git too I would like to be able to, in a running headless image, load the last commit of a git repo Something like Metacello new baseline:'MyProject'; repository: 'github://myUser/MyProject:main/myProject'; load. works just once and may open some dialogs Something like this [ [ Metacello new baseline:'MyProject'; repository: 'github://myUser/MyProject:main/myProject'; onConflictUseIncoming; load. ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. Avoids the dialogs and alerts but the code is still not updated. My intention is to be able to 'refresh' a running seaside image with its latest development version from a git repo (avoiding to personally reach the server and rebuild the docker image) What am I missing? Best Emilio
EL
Esteban Lorenzano
Sat, Apr 23, 2022 4:56 AM

Hi Emilio,

You need something like this:
Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load
ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello will not reload it (hence your project may not be loaded correctly, since baseline may have changed).
In that case, I always execute before something like:
#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]
I ack this is hacky, but it works :)
Esteban
On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';

load.
works just once and may open some dialogs

Something like this
[

[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].

Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its latest development version from a git repo (avoiding to personally reach the server and rebuild the docker image)
What am I missing?

Best

Emilio

Hi Emilio, You need something like this: Metacello new repository: 'github://pharo-spec/Spec:Pharo10'; baseline: 'Spec2'; onConflict: [ :e | e useIncoming ]; onUpgrade: [ :e | e useIncoming ]; ignoreImage; load ignoreImage, onConflict, onUpgrade. BUT if your image already has a baseline for your project then Metacello will not reload it (hence your project may not be loaded correctly, since baseline may have changed). In that case, I always execute before something like: #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] I ack this is hacky, but it works :) Esteban On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: > Hi List > > I need some help with Metacello, and may be git too > > I would like to be able to, in a running headless image, load the last commit of a git repo > > Something like > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > > load. > works just once and may open some dialogs > > > Something like this > [ > > [ > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > onConflictUseIncoming; > load. > ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. > ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. > > > Avoids the dialogs and alerts but the code is still not updated. > > My intention is to be able to 'refresh' a running seaside image with its latest development version from a git repo (avoiding to personally reach the server and rebuild the docker image) > What am I missing? > > Best > > Emilio
EO
Emilio Oca
Mon, Apr 25, 2022 9:30 PM

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but
the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello
will not reload it (hence your project may not be loaded correctly, since
baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Hi Esteban Thanks for the hint. It is still not working. Even if I remove BaselineOfMyProject and MyProject. When it reloads, it doesn't loads the last version of head at github but the one that was already at the image. I just want to update up to what is at gibhub head. Is there another way? Best Emilio On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> wrote: > Hi Emilio, > > You need something like this: > > Metacello new > repository: 'github://pharo-spec/Spec:Pharo10'; > baseline: 'Spec2'; > onConflict: [ :e | e useIncoming ]; > onUpgrade: [ :e | e useIncoming ]; > ignoreImage; > load > > ignoreImage, onConflict, onUpgrade. > > BUT if your image already has a baseline for your project then Metacello > will not reload it (hence your project may not be loaded correctly, since > baseline may have changed). > > In that case, I always execute before something like: > > #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | > (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) > ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] > > > I ack this is hacky, but it works :) > > Esteban > > On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: > > Hi List > > I need some help with Metacello, and may be git too > > I would like to be able to, in a running headless image, load the last > commit of a git repo > > Something like > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > load. > works just once and may open some dialogs > > Something like this > [ > [ > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > onConflictUseIncoming; > load. > ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. > ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. > Avoids the dialogs and alerts but the code is still not updated. > > My intention is to be able to 'refresh' a running seaside image with its > latest development version from a git repo (avoiding to personally reach > the server and rebuild the docker image) > What am I missing? > > Best > > Emilio > >
EL
Esteban Lorenzano
Mon, Apr 25, 2022 9:39 PM

mmm, you may be having another problem elsewhere, because what I typed should be working (is how we enforce the load of new versions to run the tests, for example).

Esteban
On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio
On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu (mailto:estebanlm@netc.eu)> wrote:

Hi Emilio,

You need something like this:
Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load
ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello will not reload it (hence your project may not be loaded correctly, since baseline may have changed).
In that case, I always execute before something like:
#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |

(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)
Esteban
On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com (mailto:emiliooca@gmail.com)> wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';

load.
works just once and may open some dialogs

Something like this
[

[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].

Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its latest development version from a git repo (avoiding to personally reach the server and rebuild the docker image)
What am I missing?

Best

Emilio

mmm, you may be having another problem elsewhere, because what I typed should be working (is how we enforce the load of new versions to run the tests, for example). Esteban On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: > Hi Esteban > > Thanks for the hint. > It is still not working. > Even if I remove BaselineOfMyProject and MyProject. > When it reloads, it doesn't loads the last version of head at github but the one that was already at the image. > > I just want to update up to what is at gibhub head. Is there another way? > > Best > > Emilio > On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu (mailto:estebanlm@netc.eu)> wrote: > > Hi Emilio, > > > > You need something like this: > > Metacello new > > repository: 'github://pharo-spec/Spec:Pharo10'; > > baseline: 'Spec2'; > > onConflict: [ :e | e useIncoming ]; > > onUpgrade: [ :e | e useIncoming ]; > > ignoreImage; > > load > > ignoreImage, onConflict, onUpgrade. > > > > BUT if your image already has a baseline for your project then Metacello will not reload it (hence your project may not be loaded correctly, since baseline may have changed). > > In that case, I always execute before something like: > > #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | > > > > (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) > > ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] > > > > I ack this is hacky, but it works :) > > Esteban > > On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com (mailto:emiliooca@gmail.com)> wrote: > > > Hi List > > > > > > I need some help with Metacello, and may be git too > > > > > > I would like to be able to, in a running headless image, load the last commit of a git repo > > > > > > Something like > > > Metacello new baseline:'MyProject'; > > > repository: 'github://myUser/MyProject:main/myProject'; > > > > > > load. > > > works just once and may open some dialogs > > > > > > > > > Something like this > > > [ > > > > > > [ > > > Metacello new baseline:'MyProject'; > > > repository: 'github://myUser/MyProject:main/myProject'; > > > onConflictUseIncoming; > > > load. > > > ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. > > > ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. > > > > > > > > > Avoids the dialogs and alerts but the code is still not updated. > > > > > > My intention is to be able to 'refresh' a running seaside image with its latest development version from a git repo (avoiding to personally reach the server and rebuild the docker image) > > > What am I missing? > > > > > > Best > > > > > > Emilio
GC
Gabriel Cotelli
Mon, Apr 25, 2022 9:43 PM

Is your BaselineOf implementing:
projectClass

^ MetacelloCypressBaselineProject

? AFAIR missing this method caused that kind of problem in the past.

On Mon, Apr 25, 2022 at 6:30 PM Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but
the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello
will not reload it (hence your project may not be loaded correctly, since
baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Is your BaselineOf implementing: projectClass ^ MetacelloCypressBaselineProject ? AFAIR missing this method caused that kind of problem in the past. On Mon, Apr 25, 2022 at 6:30 PM Emilio Oca <emiliooca@gmail.com> wrote: > Hi Esteban > > Thanks for the hint. > It is still not working. > Even if I remove BaselineOfMyProject and MyProject. > When it reloads, it doesn't loads the last version of head at github but > the one that was already at the image. > > I just want to update up to what is at gibhub head. Is there another way? > > Best > > Emilio > > On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> > wrote: > >> Hi Emilio, >> >> You need something like this: >> >> Metacello new >> repository: 'github://pharo-spec/Spec:Pharo10'; >> baseline: 'Spec2'; >> onConflict: [ :e | e useIncoming ]; >> onUpgrade: [ :e | e useIncoming ]; >> ignoreImage; >> load >> >> ignoreImage, onConflict, onUpgrade. >> >> BUT if your image already has a baseline for your project then Metacello >> will not reload it (hence your project may not be loaded correctly, since >> baseline may have changed). >> >> In that case, I always execute before something like: >> >> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | >> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) >> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] >> >> >> I ack this is hacky, but it works :) >> >> Esteban >> >> On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: >> >> Hi List >> >> I need some help with Metacello, and may be git too >> >> I would like to be able to, in a running headless image, load the last >> commit of a git repo >> >> Something like >> Metacello new baseline:'MyProject'; >> repository: 'github://myUser/MyProject:main/myProject'; >> load. >> works just once and may open some dialogs >> >> Something like this >> [ >> [ >> Metacello new baseline:'MyProject'; >> repository: 'github://myUser/MyProject:main/myProject'; >> onConflictUseIncoming; >> load. >> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. >> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. >> Avoids the dialogs and alerts but the code is still not updated. >> >> My intention is to be able to 'refresh' a running seaside image with its >> latest development version from a git repo (avoiding to personally reach >> the server and rebuild the docker image) >> What am I missing? >> >> Best >> >> Emilio >> >>
DH
Dale Henrichs
Mon, Apr 25, 2022 9:49 PM

Emilio,

Are you using a repository without Monticello meta data? If so, then you
need to change the #projectClass of you your baseline to:

projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ cl
].
^ super projectClass

unless the #projectClass is MetacelloCypressBaselineProject, Metacello will
think that your package versions are 'cypress.1' and Metacello will not
load packages with the same version .... when the #projectClass is
MetacelloCypressBaselineProject, Metacello will always load the package and
let Monticello filter out the changes ...

Dale

On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano estebanlm@netc.eu wrote:

mmm, you may be having another problem elsewhere, because what I typed
should be working (is how we enforce the load of new versions to run the
tests, for example).

Esteban

On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but
the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello
will not reload it (hence your project may not be loaded correctly, since
baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Emilio, Are you using a repository without Monticello meta data? If so, then you need to change the #projectClass of you your baseline to: > projectClass > Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ cl > ]. > ^ super projectClass unless the #projectClass is MetacelloCypressBaselineProject, Metacello will think that your package versions are 'cypress.1' and Metacello will not load packages with the same version .... when the #projectClass is MetacelloCypressBaselineProject, Metacello will always load the package and let Monticello filter out the changes ... Dale On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano <estebanlm@netc.eu> wrote: > mmm, you may be having another problem elsewhere, because what I typed > should be working (is how we enforce the load of new versions to run the > tests, for example). > > Esteban > > On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: > > Hi Esteban > > Thanks for the hint. > It is still not working. > Even if I remove BaselineOfMyProject and MyProject. > When it reloads, it doesn't loads the last version of head at github but > the one that was already at the image. > > I just want to update up to what is at gibhub head. Is there another way? > > Best > > Emilio > > On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> > wrote: > > Hi Emilio, > > You need something like this: > > Metacello new > repository: 'github://pharo-spec/Spec:Pharo10'; > baseline: 'Spec2'; > onConflict: [ :e | e useIncoming ]; > onUpgrade: [ :e | e useIncoming ]; > ignoreImage; > load > > ignoreImage, onConflict, onUpgrade. > > BUT if your image already has a baseline for your project then Metacello > will not reload it (hence your project may not be loaded correctly, since > baseline may have changed). > > In that case, I always execute before something like: > > #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | > (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) > ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] > > > I ack this is hacky, but it works :) > > Esteban > > On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: > > Hi List > > I need some help with Metacello, and may be git too > > I would like to be able to, in a running headless image, load the last > commit of a git repo > > Something like > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > load. > works just once and may open some dialogs > > Something like this > [ > [ > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > onConflictUseIncoming; > load. > ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. > ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. > Avoids the dialogs and alerts but the code is still not updated. > > My intention is to be able to 'refresh' a running seaside image with its > latest development version from a git repo (avoiding to personally reach > the server and rebuild the docker image) > What am I missing? > > Best > > Emilio > >
EO
Emilio Oca
Tue, Apr 26, 2022 1:06 AM

Hi Gabriel, Dale!

My BaselineOf had only #baseline:
Added #projectClass
But is still not working.
It seems to be doing the load, but not the pull before the load.

I had implemented no more than #baseLine: and now projectClass.

If I go through the UI and do the pull it works perfectly.
Can I replicate that with a script?

Best

Emilio

On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

Are you using a repository without Monticello meta data? If so, then you
need to change the #projectClass of you your baseline to:

projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^
cl ].
^ super projectClass

unless the #projectClass is MetacelloCypressBaselineProject, Metacello
will think that your package versions are 'cypress.1' and Metacello will
not load packages with the same version .... when the #projectClass is
MetacelloCypressBaselineProject, Metacello will always load the package and
let Monticello filter out the changes ...

Dale

On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano estebanlm@netc.eu
wrote:

mmm, you may be having another problem elsewhere, because what I typed
should be working (is how we enforce the load of new versions to run the
tests, for example).

Esteban

On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but
the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello
will not reload it (hence your project may not be loaded correctly, since
baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Hi Gabriel, Dale! My BaselineOf had only #baseline: Added #projectClass But is still not working. It seems to be doing the load, but not the pull before the load. I had implemented no more than #baseLine: and now projectClass. If I go through the UI and do the pull it works perfectly. Can I replicate that with a script? Best Emilio On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs < dale.henrichs@gemtalksystems.com> wrote: > Emilio, > > Are you using a repository without Monticello meta data? If so, then you > need to change the #projectClass of you your baseline to: > >> projectClass >> Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ >> cl ]. >> ^ super projectClass > > > unless the #projectClass is MetacelloCypressBaselineProject, Metacello > will think that your package versions are 'cypress.1' and Metacello will > not load packages with the same version .... when the #projectClass is > MetacelloCypressBaselineProject, Metacello will always load the package and > let Monticello filter out the changes ... > > Dale > > On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano <estebanlm@netc.eu> > wrote: > >> mmm, you may be having another problem elsewhere, because what I typed >> should be working (is how we enforce the load of new versions to run the >> tests, for example). >> >> Esteban >> >> On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: >> >> Hi Esteban >> >> Thanks for the hint. >> It is still not working. >> Even if I remove BaselineOfMyProject and MyProject. >> When it reloads, it doesn't loads the last version of head at github but >> the one that was already at the image. >> >> I just want to update up to what is at gibhub head. Is there another way? >> >> Best >> >> Emilio >> >> On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> >> wrote: >> >> Hi Emilio, >> >> You need something like this: >> >> Metacello new >> repository: 'github://pharo-spec/Spec:Pharo10'; >> baseline: 'Spec2'; >> onConflict: [ :e | e useIncoming ]; >> onUpgrade: [ :e | e useIncoming ]; >> ignoreImage; >> load >> >> ignoreImage, onConflict, onUpgrade. >> >> BUT if your image already has a baseline for your project then Metacello >> will not reload it (hence your project may not be loaded correctly, since >> baseline may have changed). >> >> In that case, I always execute before something like: >> >> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | >> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) >> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] >> >> >> I ack this is hacky, but it works :) >> >> Esteban >> >> On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: >> >> Hi List >> >> I need some help with Metacello, and may be git too >> >> I would like to be able to, in a running headless image, load the last >> commit of a git repo >> >> Something like >> Metacello new baseline:'MyProject'; >> repository: 'github://myUser/MyProject:main/myProject'; >> load. >> works just once and may open some dialogs >> >> Something like this >> [ >> [ >> Metacello new baseline:'MyProject'; >> repository: 'github://myUser/MyProject:main/myProject'; >> onConflictUseIncoming; >> load. >> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. >> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. >> Avoids the dialogs and alerts but the code is still not updated. >> >> My intention is to be able to 'refresh' a running seaside image with its >> latest development version from a git repo (avoiding to personally reach >> the server and rebuild the docker image) >> What am I missing? >> >> Best >> >> Emilio >> >>
DH
Dale Henrichs
Thu, Apr 28, 2022 6:28 PM

Emilio,

I wasn't quite sure whether or not you were concerned about having the
BaselineOf refreshed or a reload of the packages managed by the BaselineOf
and as Gabriel mentions, the missing #projectClass method is the most
common problem ...

By default Metacello does not refresh a BaselieOf in your image if it is
already present, however, you can force a refresh of a BaselineOf by using
the the Metcello #get command:

Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
get;
load.

This would be a good pattern to follow when reloading projects after
updating from github ... and I am a bit surprised that this question is not
asked more often :)

Dale

On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca emiliooca@gmail.com wrote:

Hi Gabriel, Dale!

My BaselineOf had only #baseline:
Added #projectClass
But is still not working.
It seems to be doing the load, but not the pull before the load.

I had implemented no more than #baseLine: and now projectClass.

If I go through the UI and do the pull it works perfectly.
Can I replicate that with a script?

Best

Emilio

On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

Are you using a repository without Monticello meta data? If so, then you
need to change the #projectClass of you your baseline to:

projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^
cl ].
^ super projectClass

unless the #projectClass is MetacelloCypressBaselineProject, Metacello
will think that your package versions are 'cypress.1' and Metacello will
not load packages with the same version .... when the #projectClass is
MetacelloCypressBaselineProject, Metacello will always load the package and
let Monticello filter out the changes ...

Dale

On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano estebanlm@netc.eu
wrote:

mmm, you may be having another problem elsewhere, because what I typed
should be working (is how we enforce the load of new versions to run the
tests, for example).

Esteban

On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github but
the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then Metacello
will not reload it (hence your project may not be loaded correctly, since
baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with its
latest development version from a git repo (avoiding to personally reach
the server and rebuild the docker image)
What am I missing?

Best

Emilio

Emilio, I wasn't quite sure whether or not you were concerned about having the BaselineOf refreshed or a reload of the packages managed by the BaselineOf and as Gabriel mentions, the missing #projectClass method is the most common problem ... By default Metacello does not refresh a BaselieOf in your image if it is already present, however, you can force a refresh of a BaselineOf by using the the Metcello #get command: > Metacello new baseline:'MyProject'; > repository: 'github://myUser/MyProject:main/myProject'; > get; > load. This would be a good pattern to follow when reloading projects after updating from github ... and I am a bit surprised that this question is not asked more often :) Dale On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca <emiliooca@gmail.com> wrote: > Hi Gabriel, Dale! > > My BaselineOf had only #baseline: > Added #projectClass > But is still not working. > It seems to be doing the load, but not the pull before the load. > > I had implemented no more than #baseLine: and now projectClass. > > If I go through the UI and do the pull it works perfectly. > Can I replicate that with a script? > > Best > > Emilio > > On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs < > dale.henrichs@gemtalksystems.com> wrote: > >> Emilio, >> >> Are you using a repository without Monticello meta data? If so, then you >> need to change the #projectClass of you your baseline to: >> >>> projectClass >>> Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ >>> cl ]. >>> ^ super projectClass >> >> >> unless the #projectClass is MetacelloCypressBaselineProject, Metacello >> will think that your package versions are 'cypress.1' and Metacello will >> not load packages with the same version .... when the #projectClass is >> MetacelloCypressBaselineProject, Metacello will always load the package and >> let Monticello filter out the changes ... >> >> Dale >> >> On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano <estebanlm@netc.eu> >> wrote: >> >>> mmm, you may be having another problem elsewhere, because what I typed >>> should be working (is how we enforce the load of new versions to run the >>> tests, for example). >>> >>> Esteban >>> >>> On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: >>> >>> Hi Esteban >>> >>> Thanks for the hint. >>> It is still not working. >>> Even if I remove BaselineOfMyProject and MyProject. >>> When it reloads, it doesn't loads the last version of head at github but >>> the one that was already at the image. >>> >>> I just want to update up to what is at gibhub head. Is there another way? >>> >>> Best >>> >>> Emilio >>> >>> On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> >>> wrote: >>> >>> Hi Emilio, >>> >>> You need something like this: >>> >>> Metacello new >>> repository: 'github://pharo-spec/Spec:Pharo10'; >>> baseline: 'Spec2'; >>> onConflict: [ :e | e useIncoming ]; >>> onUpgrade: [ :e | e useIncoming ]; >>> ignoreImage; >>> load >>> >>> ignoreImage, onConflict, onUpgrade. >>> >>> BUT if your image already has a baseline for your project then Metacello >>> will not reload it (hence your project may not be loaded correctly, since >>> baseline may have changed). >>> >>> In that case, I always execute before something like: >>> >>> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | >>> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) >>> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] >>> >>> >>> I ack this is hacky, but it works :) >>> >>> Esteban >>> >>> On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: >>> >>> Hi List >>> >>> I need some help with Metacello, and may be git too >>> >>> I would like to be able to, in a running headless image, load the last >>> commit of a git repo >>> >>> Something like >>> Metacello new baseline:'MyProject'; >>> repository: 'github://myUser/MyProject:main/myProject'; >>> load. >>> works just once and may open some dialogs >>> >>> Something like this >>> [ >>> [ >>> Metacello new baseline:'MyProject'; >>> repository: 'github://myUser/MyProject:main/myProject'; >>> onConflictUseIncoming; >>> load. >>> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. >>> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. >>> Avoids the dialogs and alerts but the code is still not updated. >>> >>> My intention is to be able to 'refresh' a running seaside image with its >>> latest development version from a git repo (avoiding to personally reach >>> the server and rebuild the docker image) >>> What am I missing? >>> >>> Best >>> >>> Emilio >>> >>>
EO
Emilio Oca
Fri, Apr 29, 2022 10:16 PM

Hi Dale

Thanks again, still not working.
After updating github I am unable to pull the changes into the image.
So far the only way is to hit Pull button at the "Working copy of
MyProyect" repo window.
I wish I could reproduce what that button does.

Even this:
Metacello new
repository: 'github://...';
baseline: 'MyProyect';
get
does not update my file system at iceberg/

Best

Emilio

On Thu, Apr 28, 2022 at 3:29 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

I wasn't quite sure whether or not you were concerned about having the
BaselineOf refreshed or a reload of the packages managed by the BaselineOf
and as Gabriel mentions, the missing #projectClass method is the most
common problem ...

By default Metacello does not refresh a BaselieOf in your image if it is
already present, however, you can force a refresh of a BaselineOf by using
the the Metcello #get command:

Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
get;
load.

This would be a good pattern to follow when reloading projects after
updating from github ... and I am a bit surprised that this question is not
asked more often :)

Dale

On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca emiliooca@gmail.com wrote:

Hi Gabriel, Dale!

My BaselineOf had only #baseline:
Added #projectClass
But is still not working.
It seems to be doing the load, but not the pull before the load.

I had implemented no more than #baseLine: and now projectClass.

If I go through the UI and do the pull it works perfectly.
Can I replicate that with a script?

Best

Emilio

On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

Are you using a repository without Monticello meta data? If so, then you
need to change the #projectClass of you your baseline to:

projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^
cl ].
^ super projectClass

unless the #projectClass is MetacelloCypressBaselineProject, Metacello
will think that your package versions are 'cypress.1' and Metacello will
not load packages with the same version .... when the #projectClass is
MetacelloCypressBaselineProject, Metacello will always load the package and
let Monticello filter out the changes ...

Dale

On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano estebanlm@netc.eu
wrote:

mmm, you may be having another problem elsewhere, because what I typed
should be working (is how we enforce the load of new versions to run the
tests, for example).

Esteban

On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github
but the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another
way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then
Metacello will not reload it (hence your project may not be loaded
correctly, since baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with
its latest development version from a git repo (avoiding to personally
reach the server and rebuild the docker image)
What am I missing?

Best

Emilio

Hi Dale Thanks again, still not working. After updating github I am unable to pull the changes into the image. So far the only way is to hit Pull button at the "Working copy of MyProyect" repo window. I wish I could reproduce what that button does. Even this: Metacello new repository: 'github://...'; baseline: 'MyProyect'; get does not update my file system at iceberg/ Best Emilio On Thu, Apr 28, 2022 at 3:29 PM Dale Henrichs < dale.henrichs@gemtalksystems.com> wrote: > Emilio, > > I wasn't quite sure whether or not you were concerned about having the > BaselineOf refreshed or a reload of the packages managed by the BaselineOf > and as Gabriel mentions, the missing #projectClass method is the most > common problem ... > > By default Metacello does not refresh a BaselieOf in your image if it is > already present, however, you can force a refresh of a BaselineOf by using > the the Metcello #get command: > >> Metacello new baseline:'MyProject'; >> repository: 'github://myUser/MyProject:main/myProject'; >> get; >> load. > > This would be a good pattern to follow when reloading projects after > updating from github ... and I am a bit surprised that this question is not > asked more often :) > > Dale > > On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca <emiliooca@gmail.com> wrote: > >> Hi Gabriel, Dale! >> >> My BaselineOf had only #baseline: >> Added #projectClass >> But is still not working. >> It seems to be doing the load, but not the pull before the load. >> >> I had implemented no more than #baseLine: and now projectClass. >> >> If I go through the UI and do the pull it works perfectly. >> Can I replicate that with a script? >> >> Best >> >> Emilio >> >> On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs < >> dale.henrichs@gemtalksystems.com> wrote: >> >>> Emilio, >>> >>> Are you using a repository without Monticello meta data? If so, then you >>> need to change the #projectClass of you your baseline to: >>> >>>> projectClass >>>> Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ >>>> cl ]. >>>> ^ super projectClass >>> >>> >>> unless the #projectClass is MetacelloCypressBaselineProject, Metacello >>> will think that your package versions are 'cypress.1' and Metacello will >>> not load packages with the same version .... when the #projectClass is >>> MetacelloCypressBaselineProject, Metacello will always load the package and >>> let Monticello filter out the changes ... >>> >>> Dale >>> >>> On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano <estebanlm@netc.eu> >>> wrote: >>> >>>> mmm, you may be having another problem elsewhere, because what I typed >>>> should be working (is how we enforce the load of new versions to run the >>>> tests, for example). >>>> >>>> Esteban >>>> >>>> On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: >>>> >>>> Hi Esteban >>>> >>>> Thanks for the hint. >>>> It is still not working. >>>> Even if I remove BaselineOfMyProject and MyProject. >>>> When it reloads, it doesn't loads the last version of head at github >>>> but the one that was already at the image. >>>> >>>> I just want to update up to what is at gibhub head. Is there another >>>> way? >>>> >>>> Best >>>> >>>> Emilio >>>> >>>> On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> >>>> wrote: >>>> >>>> Hi Emilio, >>>> >>>> You need something like this: >>>> >>>> Metacello new >>>> repository: 'github://pharo-spec/Spec:Pharo10'; >>>> baseline: 'Spec2'; >>>> onConflict: [ :e | e useIncoming ]; >>>> onUpgrade: [ :e | e useIncoming ]; >>>> ignoreImage; >>>> load >>>> >>>> ignoreImage, onConflict, onUpgrade. >>>> >>>> BUT if your image already has a baseline for your project then >>>> Metacello will not reload it (hence your project may not be loaded >>>> correctly, since baseline may have changed). >>>> >>>> In that case, I always execute before something like: >>>> >>>> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | >>>> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) >>>> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] >>>> >>>> >>>> I ack this is hacky, but it works :) >>>> >>>> Esteban >>>> >>>> On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: >>>> >>>> Hi List >>>> >>>> I need some help with Metacello, and may be git too >>>> >>>> I would like to be able to, in a running headless image, load the last >>>> commit of a git repo >>>> >>>> Something like >>>> Metacello new baseline:'MyProject'; >>>> repository: 'github://myUser/MyProject:main/myProject'; >>>> load. >>>> works just once and may open some dialogs >>>> >>>> Something like this >>>> [ >>>> [ >>>> Metacello new baseline:'MyProject'; >>>> repository: 'github://myUser/MyProject:main/myProject'; >>>> onConflictUseIncoming; >>>> load. >>>> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. >>>> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. >>>> Avoids the dialogs and alerts but the code is still not updated. >>>> >>>> My intention is to be able to 'refresh' a running seaside image with >>>> its latest development version from a git repo (avoiding to personally >>>> reach the server and rebuild the docker image) >>>> What am I missing? >>>> >>>> Best >>>> >>>> Emilio >>>> >>>>
DH
Dale Henrichs
Fri, Apr 29, 2022 11:01 PM

Emilio,

Okay ... we're peeling the onion :) ...

At this point it sounds like you need to do a flushCache on your filetree
repository in order to force Metacello to re-download from the github into
the local package-cache.

But if Iceberg is involved, I am not the person to ask ... I am not
familiar with the changes that have been made to Metacello to get it to
work with Iceberg ...

Dale

On Fri, Apr 29, 2022 at 3:16 PM Emilio Oca emiliooca@gmail.com wrote:

Hi Dale

Thanks again, still not working.
After updating github I am unable to pull the changes into the image.
So far the only way is to hit Pull button at the "Working copy of
MyProyect" repo window.
I wish I could reproduce what that button does.

Even this:
Metacello new
repository: 'github://...';
baseline: 'MyProyect';
get
does not update my file system at iceberg/

Best

Emilio

On Thu, Apr 28, 2022 at 3:29 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

I wasn't quite sure whether or not you were concerned about having the
BaselineOf refreshed or a reload of the packages managed by the BaselineOf
and as Gabriel mentions, the missing #projectClass method is the most
common problem ...

By default Metacello does not refresh a BaselieOf in your image if it is
already present, however, you can force a refresh of a BaselineOf by using
the the Metcello #get command:

Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
get;
load.

This would be a good pattern to follow when reloading projects after
updating from github ... and I am a bit surprised that this question is not
asked more often :)

Dale

On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca emiliooca@gmail.com wrote:

Hi Gabriel, Dale!

My BaselineOf had only #baseline:
Added #projectClass
But is still not working.
It seems to be doing the load, but not the pull before the load.

I had implemented no more than #baseLine: and now projectClass.

If I go through the UI and do the pull it works perfectly.
Can I replicate that with a script?

Best

Emilio

On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs <
dale.henrichs@gemtalksystems.com> wrote:

Emilio,

Are you using a repository without Monticello meta data? If so, then
you need to change the #projectClass of you your baseline to:

projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl |
^ cl ].
^ super projectClass

unless the #projectClass is MetacelloCypressBaselineProject, Metacello
will think that your package versions are 'cypress.1' and Metacello will
not load packages with the same version .... when the #projectClass is
MetacelloCypressBaselineProject, Metacello will always load the package and
let Monticello filter out the changes ...

Dale

On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano estebanlm@netc.eu
wrote:

mmm, you may be having another problem elsewhere, because what I typed
should be working (is how we enforce the load of new versions to run the
tests, for example).

Esteban

On Apr 25 2022, at 11:30 pm, Emilio Oca emiliooca@gmail.com wrote:

Hi Esteban

Thanks for the hint.
It is still not working.
Even if I remove BaselineOfMyProject and MyProject.
When it reloads, it doesn't loads the last version of head at github
but the one that was already at the image.

I just want to update up to what is at gibhub head. Is there another
way?

Best

Emilio

On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano estebanlm@netc.eu
wrote:

Hi Emilio,

You need something like this:

Metacello new
repository: 'github://pharo-spec/Spec:Pharo10';
baseline: 'Spec2';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load

ignoreImage, onConflict, onUpgrade.

BUT if your image already has a baseline for your project then
Metacello will not reload it (hence your project may not be loaded
correctly, since baseline may have changed).

In that case, I always execute before something like:

#( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each |
(RPackageOrganizer default packageNamed: each ifAbsent: [ nil ])
ifNotNil: [ :aPackage | aPackage removeFromSystem ] ]

I ack this is hacky, but it works :)

Esteban

On Apr 23 2022, at 3:21 am, Emilio Oca emiliooca@gmail.com wrote:

Hi List

I need some help with Metacello, and may be git too

I would like to be able to, in a running headless image, load the last
commit of a git repo

Something like
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
load.
works just once and may open some dialogs

Something like this
[
[
Metacello new baseline:'MyProject';
repository: 'github://myUser/MyProject:main/myProject';
onConflictUseIncoming;
load.
] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ].
] on: MCMergeOrLoadWarning do: [ :ex | ex load ].
Avoids the dialogs and alerts but the code is still not updated.

My intention is to be able to 'refresh' a running seaside image with
its latest development version from a git repo (avoiding to personally
reach the server and rebuild the docker image)
What am I missing?

Best

Emilio

Emilio, Okay ... we're peeling the onion :) ... At this point it sounds like you need to do a flushCache on your filetree repository in order to force Metacello to re-download from the github into the local package-cache. But if Iceberg is involved, I am not the person to ask ... I am not familiar with the changes that have been made to Metacello to get it to work with Iceberg ... Dale On Fri, Apr 29, 2022 at 3:16 PM Emilio Oca <emiliooca@gmail.com> wrote: > Hi Dale > > Thanks again, still not working. > After updating github I am unable to pull the changes into the image. > So far the only way is to hit Pull button at the "Working copy of > MyProyect" repo window. > I wish I could reproduce what that button does. > > Even this: > Metacello new > repository: 'github://...'; > baseline: 'MyProyect'; > get > does not update my file system at iceberg/ > > Best > > Emilio > > On Thu, Apr 28, 2022 at 3:29 PM Dale Henrichs < > dale.henrichs@gemtalksystems.com> wrote: > >> Emilio, >> >> I wasn't quite sure whether or not you were concerned about having the >> BaselineOf refreshed or a reload of the packages managed by the BaselineOf >> and as Gabriel mentions, the missing #projectClass method is the most >> common problem ... >> >> By default Metacello does not refresh a BaselieOf in your image if it is >> already present, however, you can force a refresh of a BaselineOf by using >> the the Metcello #get command: >> >>> Metacello new baseline:'MyProject'; >>> repository: 'github://myUser/MyProject:main/myProject'; >>> get; >>> load. >> >> This would be a good pattern to follow when reloading projects after >> updating from github ... and I am a bit surprised that this question is not >> asked more often :) >> >> Dale >> >> On Mon, Apr 25, 2022 at 6:06 PM Emilio Oca <emiliooca@gmail.com> wrote: >> >>> Hi Gabriel, Dale! >>> >>> My BaselineOf had only #baseline: >>> Added #projectClass >>> But is still not working. >>> It seems to be doing the load, but not the pull before the load. >>> >>> I had implemented no more than #baseLine: and now projectClass. >>> >>> If I go through the UI and do the pull it works perfectly. >>> Can I replicate that with a script? >>> >>> Best >>> >>> Emilio >>> >>> On Mon, Apr 25, 2022 at 6:49 PM Dale Henrichs < >>> dale.henrichs@gemtalksystems.com> wrote: >>> >>>> Emilio, >>>> >>>> Are you using a repository without Monticello meta data? If so, then >>>> you need to change the #projectClass of you your baseline to: >>>> >>>>> projectClass >>>>> Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | >>>>> ^ cl ]. >>>>> ^ super projectClass >>>> >>>> >>>> unless the #projectClass is MetacelloCypressBaselineProject, Metacello >>>> will think that your package versions are 'cypress.1' and Metacello will >>>> not load packages with the same version .... when the #projectClass is >>>> MetacelloCypressBaselineProject, Metacello will always load the package and >>>> let Monticello filter out the changes ... >>>> >>>> Dale >>>> >>>> On Mon, Apr 25, 2022 at 2:39 PM Esteban Lorenzano <estebanlm@netc.eu> >>>> wrote: >>>> >>>>> mmm, you may be having another problem elsewhere, because what I typed >>>>> should be working (is how we enforce the load of new versions to run the >>>>> tests, for example). >>>>> >>>>> Esteban >>>>> >>>>> On Apr 25 2022, at 11:30 pm, Emilio Oca <emiliooca@gmail.com> wrote: >>>>> >>>>> Hi Esteban >>>>> >>>>> Thanks for the hint. >>>>> It is still not working. >>>>> Even if I remove BaselineOfMyProject and MyProject. >>>>> When it reloads, it doesn't loads the last version of head at github >>>>> but the one that was already at the image. >>>>> >>>>> I just want to update up to what is at gibhub head. Is there another >>>>> way? >>>>> >>>>> Best >>>>> >>>>> Emilio >>>>> >>>>> On Sat, Apr 23, 2022 at 1:56 AM Esteban Lorenzano <estebanlm@netc.eu> >>>>> wrote: >>>>> >>>>> Hi Emilio, >>>>> >>>>> You need something like this: >>>>> >>>>> Metacello new >>>>> repository: 'github://pharo-spec/Spec:Pharo10'; >>>>> baseline: 'Spec2'; >>>>> onConflict: [ :e | e useIncoming ]; >>>>> onUpgrade: [ :e | e useIncoming ]; >>>>> ignoreImage; >>>>> load >>>>> >>>>> ignoreImage, onConflict, onUpgrade. >>>>> >>>>> BUT if your image already has a baseline for your project then >>>>> Metacello will not reload it (hence your project may not be loaded >>>>> correctly, since baseline may have changed). >>>>> >>>>> In that case, I always execute before something like: >>>>> >>>>> #( 'BaselineOfSpec2' 'BaselineOfSpecCore' ) do: [ :each | >>>>> (RPackageOrganizer default packageNamed: each ifAbsent: [ nil ]) >>>>> ifNotNil: [ :aPackage | aPackage removeFromSystem ] ] >>>>> >>>>> >>>>> I ack this is hacky, but it works :) >>>>> >>>>> Esteban >>>>> >>>>> On Apr 23 2022, at 3:21 am, Emilio Oca <emiliooca@gmail.com> wrote: >>>>> >>>>> Hi List >>>>> >>>>> I need some help with Metacello, and may be git too >>>>> >>>>> I would like to be able to, in a running headless image, load the last >>>>> commit of a git repo >>>>> >>>>> Something like >>>>> Metacello new baseline:'MyProject'; >>>>> repository: 'github://myUser/MyProject:main/myProject'; >>>>> load. >>>>> works just once and may open some dialogs >>>>> >>>>> Something like this >>>>> [ >>>>> [ >>>>> Metacello new baseline:'MyProject'; >>>>> repository: 'github://myUser/MyProject:main/myProject'; >>>>> onConflictUseIncoming; >>>>> load. >>>>> ] on: MetacelloSkipDirtyPackageLoad do: [ :ex | ex resume: false ]. >>>>> ] on: MCMergeOrLoadWarning do: [ :ex | ex load ]. >>>>> Avoids the dialogs and alerts but the code is still not updated. >>>>> >>>>> My intention is to be able to 'refresh' a running seaside image with >>>>> its latest development version from a git repo (avoiding to personally >>>>> reach the server and rebuild the docker image) >>>>> What am I missing? >>>>> >>>>> Best >>>>> >>>>> Emilio >>>>> >>>>>