[Glass] Define and load a project into Tode

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Feb 11 11:58:09 PST 2016



On 02/11/2016 10:06 AM, Trussardi Dario Romano via Glass wrote:
> Ciao,
>
> 	i'm interested to import my git repository in Tode environment.
>
> 	I have a local clone	 /mnt/development	of my bitbucket remote repository.
>
> 	What should I do ?
Use the `project entry` command to create a project entry for your 
project. Here's an example from `man project entry`:

   project entry --baseline=External 
--repo=filetree:///opt/git/External/repository --loads=`#('Core')` 
/sys/local/server/projects

You;ll recognize the arguments here as being the same as you would use 
to load the project with Metacello:

   Metacello new
     baseline: 'External';
     repository: 'filetree:///opt/git/External/repository';
     load: #('Core').

And the final argument `/sys/local/server/projects` puts the project 
entry into the shared projects directory, so the project entry will how 
up as "unloaded" in the `project list` for each stone that you create.

If you edit the project entry it will look like the following:

   ^ TDProjectSpecEntryDefinition new
     baseline: 'External'
       repository: 'filetree:///opt/git/External/repository'
       loads: #('Core');
     status: #(#'active');
     locked: true;
     yourself

The status #active means that the project will be listed in bold at the 
top of the `project list` and since are specifying a local clone, you 
want to make sure that the registration is locked.

After adding the project entry, you can load the project in a stone by 
using the `project load` command in any stone (or as part of an 
installtion script:

   project load External

For example here's a bash script that I use to add in a custom project 
that I run after the createStone:

. defStone.env
$GS_HOME/bin/devKitCommandLine todeIt $GEMSTONE_NAME << EOF
project install --url=http://gsdevkit.github.io/GsDevKit_home/Obex.ston
project load Obex
mount @/sys/stone/dirs/Obex/ /home obex
EOF



>
> 	I can define the remote repository to clone and push it directly from Tode?
Yes you should be able to use the `push` and `Git > pull` menu items on 
the `project list` to push and pull to your bitbuckt repo ...

Let's see, I am curious how you created the clone from bitbucket ... if 
you used https:.... then you will have to arrange for git to be able to 
use credentials and here's info that relates to github[1] and I assume 
that this applies to bitbucket as well.

If you can use the `git@` form for the clone, that's what I recommend 
since the ssh keypair eliminates the need to put your username and 
password somewhere on disk .

I will note that with the project entry, you can specify the remote name 
(`git add....`) to be used for push and pull ...

[1] 
https://github.com/GsDevKit/gsDevKitHome/blob/master/docs/installationGitHubDetails.md#setup-your-ssh-credentials
>
> 	The package to load is defined with a	 BaselineOf 	subclass.
>
> 	Thanks for any references and considerations?
>
> 	Dario
>
> 	P.S. Which channel should I use to submit requests about Tode?

My preference is to use this list, since I would like all of the 
GsdevKit_home users to have a familiarity with using tODE ...

Dale


More information about the Glass mailing list