Code snippet needed ... how to save a monticello package

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

Code snippet needed ... how to save a monticello package

GLASS mailing list

If I have a name of a Monticello package ... how can I save this package into a file  under s apecific name ?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Code snippet needed ... how to save a monticello package

GLASS mailing list

Marten,

Are you using a stone with tODE installed?

Dale

On 1/25/19 8:12 AM, Marten Feldtmann via Glass wrote:

If I have a name of a Monticello package ... how can I save this package into a file  under s apecific name ?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Code snippet needed ... how to save a monticello package

GLASS mailing list

Normally not.


Marten

Dale Henrichs via Glass <[hidden email]> hat am 25. Januar 2019 um 18:27 geschrieben:

Marten,

Are you using a stone with tODE installed?

Dale

On 1/25/19 8:12 AM, Marten Feldtmann via Glass wrote:

If I have a name of a Monticello package ... how can I save this package into a file  under s apecific name ?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


 

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Code snippet needed ... how to save a monticello package

GLASS mailing list

Marten,

Well, with tODE installed there is a straightforward smalltalk API for saving mcz files ... I created tODE so that the smalltalk API would be available even if they are not using the tODE GUI ... Saving Monticello packages is not the simplest thing to do:)

Here's is the tODE code that it takes to save an mc file with tODE (in the class TDMonticelloTool):

mcsave
  "
  mc save <pkg-name> <version-name> <repository-spec> <commit-message>
     save <pkg-name> <version-name> @<repository-path> @<commit-message>
"

  | packageName wc versionName repoSpec repo commitMessage newVersion |
  packageName := tokens at: 2.
  wc := self resolveWorkingCopyReference: packageName.
  versionName := tokens at: 3.
  repoSpec := tokens at: 4.
  repo := self resolveRepositoryReference: repoSpec.
  commitMessage := tokens at: 5.
  (commitMessage beginsWith: '@')
    ifTrue: [ commitMessage := self resolveAtPathReference: commitMessage ].
  newVersion := [ wc newVersion ]
    on: MCVersionNameAndMessageRequest
    do: [ :notification | notification resume: (Array with: versionName with: commitMessage) ].
  self storeVersion: newVersion inRepository: repo.
  ^ newVersion

as you can see there are several method calls to `self` here that each do some important work ... If you rummage around in a stone with tODE installed, you can extract the necessary code but there is quite a bit of code involved in going through the whole process of saving a package  -- it is quite complicated ...

If you have tODE installed you would execute the following tODE command:

mc save <package-name> <package-name>-<yourinits>.<sequence-number> filetree://<path-to-directory> `<commit-message>`

And this command can be run from a bash command-line in GsDevKit_home without firing up the GUI:

$GS_HOME/bin/todeIt <stoneName> << EOF
mc save <package-name> <package-name>-<yourinits>.<sequence-number> filetree://<path-to-directory> `<commit-message>`
EOF
Without tODE, you can take a look at the class MCCmdSavePackage which was part of the implementation of the repository browser in GemTools, but there is no simple API as MCCmdSavePackage was written as part of the MCRepositoryBrowser, so the state is distributed across multiple classes ...

I wrote the TDMonticelloTool to try to simplify the process of saving Monticello packages and I think that your best bet is to use tODE ... I don't think Jade has support for reading and writing Monticello packages ...

When Rowan becomes available, there will be a much simple smalltalk api for saving all of the dirty packages in a project and of course there will be suport from within Jadeite for saving projects as well ...

If you want a workspace doit that you can run from a Jade workspace in a stone with tODE installed, I can help with that ...

Dale

On 1/25/19 9:46 AM, Marten Feldtmann wrote:

Normally not.


Marten

Dale Henrichs via Glass [hidden email] hat am 25. Januar 2019 um 18:27 geschrieben:

Marten,

Are you using a stone with tODE installed?

Dale

On 1/25/19 8:12 AM, Marten Feldtmann via Glass wrote:

If I have a name of a Monticello package ... how can I save this package into a file  under s apecific name ?


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


 

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass