Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pharo workflow: file out, slices and saving to repository

Perhaps I'm asking something extremely trivial, but I got a bit confused between numerous options of doing things in Pharo (Pharo 4).

I am starting to work on a library for Pharo/Smalltalk called PolyMath. I am collaborating with other people on this project. They have set up main and inbox repositories on smalltalkhub, including Jankins CI. So, from my side things are pretty simple: make changes, create the slice and save it to inbox repository.

While I'm working on the piece of code, I would like to save the changes (I think Pharo does it for me on regular base) in case my computer crashes, or I need to reboot it to install updates. Or a bit more ambitious: to pick up work on another laptop (perhaps, by saving the changes to Dropbox). At the same time I don't want to push the changes into the inbox repository as the changes are incomplete.

If I save the changes to my local package cache, the packages are not "dirty" any more; and I don't know if slicing will produce right changes to push them to the inbox repository.

Should I just do fileout on the packages I'm working on? (But it seems when I filein them later, this action makes some other packages dirty, perhaps they are connected?) I can also save the image, but I would like to reload the image time to time to fetch the latest changes done by other people.

Just to recap what I want to achieve:

  • Save changes locally, but preserve the ability to create the slice and see the difference between local packages and external repository.
  • Being able to push my changes to the inbox repository.
like image 420
mobiuseng Avatar asked Mar 30 '16 12:03

mobiuseng


1 Answers

Each change you do in the image should be save in the .changes file in case your Pharo image crash. You can latter recover the lost changes via WorldMenu -> Tools -> Recover lost changes.

To save your code you can either commit it in one of your own repository or in the package cache. When you want to commit in the real repository you have two options:

  • You want to keep the commits history. In that case you can open the package-cache via Monticello, select each commit and use Copy to copy the commit in the main repository.
  • You just want to make one commit with all the changes. In that case you can just commit into the main repository if the code you produced is loaded into the current image. To be sure to keep all your changes you can use the Changes option to check all the modifications that will be push.

What is important when you commit is the code that is inside the image, not the fact that a package is dirty or not. This is just an help.

like image 184
Cyril Ferlicot Avatar answered Nov 26 '22 01:11

Cyril Ferlicot