pharo-wiki
pharo-wiki copied to clipboard
Improve explanation of loading project baseline from local directory with gitlocal prefix
Currently section about loading MC project from local directory, contains just explanation of 2 prefixes: tonel, or filetree. See:
This snippet should be configured with:
{prefix}: This is specific to the file format:
filetreefor a Filetree projecttonelfor a Tonel project
But there is a 3rd option to use: gitlocal://prefix. How this is different to these two? Is gitlocalspecifying relative directory and implicit format is tonel?
@jecisc Hi Cyril! Can you comment add a reply here, if you have a knowledge of how gitlocal prefix works? I can update that section then and issue a PR. Thanks in advance!
Hi, To be honest I never used this one. Here is the comment I found in the code:
Class: IceGitLocalRepositoryType
I resolve git local repositories (repositories already existing on your disk).
A gitlocal repositoy is composed of:
gitlocal://full/path/to/repository
gitlocal - The git local identifier
full/path/... - This is a path to the place where the sources are.
For example, if you have a repository in '/dev/voyage', which also has sources in subdirectory 'mc', your full path will be: '/dev/voyage/mc'. A part of my responsibilities is to find the git root in the path provided.
Example:
------------
A script to install voyage using this would like more or less like this:
Metacello new
repository: 'gitlocal://Users/esteban/Dev/Repository/voyage/mc';
baseline: 'Voyage';
load: 'mongo tests'.
I've used it with gitlocal://./subdir/ ; it's useful in terminal-based usage scenario:
$ git clone $GIT_URL_OF_PROJECT
$ cd $NAME_OF_PROJECT
$ run pharo from there (create image, load code… as it should be)
So I would assume, semantically it does not look anyhow different to tonel or filetree prefix (it just loads local repo based on relative or absolute path), and probably it uses default Iceberg setting for file format?
I guess.
so it need to be a GitHub repo and not a standalone folder with sources, but you don’t have to care about the format it seems. We can add that to the doc. I’ll try to do it at some point today or tomorrow