Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

timfel/gitocello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What this is

This is my simple attempt at an interoperability tool between Git and Monticello. It is specifically tailored at inter operating between GNU Smalltalk and Squeak/Pharo (as those are the only Smalltalks I know of which use one of these two version control systems). However, I try to keep the code specific to either Smalltalk fairly separate, so the code might be pretty easily adaptable to other uses. I just didn’t see any.

The Squeak Code

The project is “self-hosting” and has been almost right-away. The Squeak side consists of a Git wrapper, a Package-to-Filesystem mapper and a “Registry” class which keeps track of the settings and Git-enabled packages in the system and is used as the command interface for Gitocello. For GNU Smalltalk interoperability I have included a GstPackageWriter class that creates a ‘package.xml’ file from the Monticello package information.

The GNU Smalltalk “Code”

The GST side for now is only a post-receive hook written in bash that creates a new Monticello package from the last commit and only with the last commit message. This is mainly for simplicity, but also because the project is not meant to be used in both directions, but rather to support porting efforts and keeping ports up-to-date.

Setup and Use

The idea is (for now), that the remote Git repository is in a subfolder “git-repositories” with its name. The “post-receive” hook is installed and thus when a push happens, the according Monticello package is created in the default Mcz location (which would be ../../ from the repository root, this is ‘configurable’ in the hook).

This remote repository has to be created by hand for now, and

the hook has to be enabled manually: I will automate this as soon as I find the time.

For development in the Squeak image, one can yellow-click the package

in the Monticello browser and check “track with Git” to commit to the default Git repository with each Monticello commit (per default under package-cache/git-repositories/PACKAGE). For now, you have to manually add the origin and push to it from time to time. This will all be automated. Automatic conversion to Gnu Smalltalk syntax is already in place, however.

Development from GNU Smalltalk is difficult right now: There is a script in

git-hooks that will create a Monticello package from the current code using the conversion rules defined in the Gitocello package on gst-convert.

The conversion to Squeak using gst-convert needs some more testing though:

at least on my setup it ignores conversion rules in that direction. This might not be all so bad, if one does an initial load of the package into a Squeak environment, changes the necessary bits of code and uses the Monticello merge for subsequent generated packages most conversion will be merged in just fine.

Also, gst-convert will never obsolete portable code anyway. Paolo Bonzini

helped me a lot with lightning fast reactions to my bug-reports on gst-convert, and I think right now it will work just fine for the purposes of this project.

About

Git O'Cello tries to bridge from Squeak+Monticello to GNU Smalltalk+Git

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published