Hi Luke,

ok, it's a high tech solution, this is more because I could not on the spot remember what you would need as a script (and also because your 'no metadata' requirement makes the filetree solution problematic).

But I'd suggest still one bit of advice that is implicit in my solution: create at least a baseline for your project (covering say all packages in your repository); instead of hacking around with Monticello and FileTree, it will allow you to use a simple Metacello command to load everything and prepare correct, long term use of your project.

And you will have the save everything as well.

Regards,

Thierry

Le 20/08/2017 à 10:36, Luke Gorrie a écrit :
Hi Thierry,

I am really looking for a "low-tech" solution here - five line Monticello code snippet - that will be easy for me to understand (as a newbie) and also easy for new contributors to my project to understand (who will have no prior exposure to Pharo.)

I don't know what AltBrowser is, but just as a user I need to get a bit more "winnage" before I am ready to take another iteration at learning more tools. The tools currently represent barriers in the way of solving my problems. I am sure this will change over time with more gradual learning and experience.


On 18 August 2017 at 16:28, Thierry Goubier <thierry.goub...@gmail.com <mailto:thierry.goub...@gmail.com>> wrote:

    Hi Luke,

    if you use gitfiletree with AltBrowser and configurations/baselines,
    then you'll see that you have a command to do the writing for you,
    without metadata and with a single git commit.

    Regards,

    Thierry


    Le 17/08/2017 à 13:25, Luke Gorrie a écrit :

        Hoi,

        I want to have a quick "cheat mode" for loading and saving the
        Smalltalk packages in my project. This is to make life easy for
        newbies who are not very familiar with Monticello and Metacello.

        The "cheat" is to assume that there is one filetree://
        repository that contains all of the relevant packages, and all
        we need to do is load or save each of those packages in that
        repository.

        I have the loading part working already:

              repo := MCFileTreeRepository new directory: '/foo/bar/baz'
        asFileReference.
              repo allFileNames do: [ :file |
                  (repo versionFromFileNamed: file) load.
                ].

        but now I am wondering how to do the saving part? That is, given
        a path to a filetree repo like '/foo/bar/baz', how do I save
        each package in that repo i.e. export the code in the image?

        Ideally I would like the same operation to skip metadata that is
        likely to cause conflicts when the code is checked into Git
        later e.g. package timestamps and versions.

        Tips would be appreciated :).








Reply via email to