[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Switching to git

From: Paolo Bonzini
Subject: [Help-smalltalk] Switching to git
Date: Tue, 15 Jan 2008 15:40:54 +0100
User-agent: Thunderbird (Macintosh/20071031)

I converted GNU Smalltalk's Arch repository to git. All development after the 3.0 release will be available only through git and through the new git-cvs gateway (see later). The Arch repositories address@hidden and address@hidden will be available but undocumented (so that they are slowly blurred away by time) and will not be up-to-date anymore. I've added cacherevs of the last revisions to help people who find them by mistake, but that's as much maintainance as I'm willing to do.

It is recommended that you access the repository with git, of course; GNU Smalltalk's Git repository can be accessed through HTTP as well as through the faster Git protocol. Either of the following commands will clone GNU Smalltalk's repository on your machine:

  git clone git://
  git clone

Cloning automatically creates a branch for your work, called master. If you want to base your work on a stable release, you can create local branches from the official stable branches:

  git checkout -b stable-2.3 origin/stable-2.3

After creating the branch, just "git checkout stable-2.3" or "git checkout master" will be enough to switch between branches; and after cloning the repository, "git pull" will be enough to update the current branch with any new patch available upstream (i.e. from me).

You can also browse the Git repository within a web browser. Unlike Arch, this is *fast* (well everything is faster than with Arch). You may also view the complete histories of any file in the repository as well as differences among two versions. Gitweb also allows you to get the latest source code as a tarball, like this:

  wget -O smalltalk-latest.tar.gz \

  wget -O smalltalk-2.3-latest.tar.gz \


As with Arch, by setting up your own public repositories for GNU Smalltalk branches, you will facilitate integration of your code into the main distribution. You can do so at -- if you do it, please write something on the wiki. You can get some inspiration at and

You can prepare a patch "the old way" (i.e. just by doing a single commit in your master branch). Just send out the URL for the branch and the sha1 identifier for the commit (you get it from "git log", the first 8-10 characters are enough) and I'll cherry-pick it.

For more complicated work, you can also set up a "topic branch". Here you can use "git rebase <BRANCH>" (where <BRANCH> will be usually "master", "origin/master" or "origin/stable-VERSION") to reapply your patches on top of a new branch. This is the same as "tla update", except that it works also if you committed something on the branch. Alternatively, you can use "git merge <BRANCH>" which is the same as "tla replay".

In both cases, use "git merge --squash <TOPIC-BRANCH>" to turn the topic branch into a single commit to be sent out the same way.

The "git rebase" example will have shown you that unlike Arch, git is quite happy to rewrite history unless you've already pushed upstream. In "topic branches" of course you are more free, because you probably won't push them until you're done with them. Interesting commands to do so include:

"oh no, I forgot the ChangeLog"
git commit --amend

"oh no, I forgot --amend"
"the fix is a one-liner, but I committed the buggy patch two weeks ago"
git rebase --interactive HEAD^^^^

There *is* one thing you'll miss switching from Arch to git, namely "tla missing". Everything else will be sweet.

To import your arch tree, you can use git-archimport. I suggest that you find your branchpoint in my git archive (just use "git log origin/master" and find the SHA1 checksum for the commit), then do

  # Prepare work area
  git checkout -b local-branchpoint <BRANCHPOINT>
  git checkout -b local local-branchpoint

  # Go
  git archimport address@hidden/smalltalk--devo--2.2:local

  # "tla update"
  git checkout -b prepare-to-merge local
  git rebase origin/master
    ... lots of fixing conflicts ...

  # Let it become the new master branch
  git checkout master
  git merge prepare-to-merge
  git branch -D prepare-to-merge
  git branch -D local-branchpoint
  git branch -D local

Anonymous CVS access

Alternatively, a CVS repository can be checked out through anonymous CVS with one the following commands (again, respectively for the stable and development branches).

  cvs -d :pserver:address@hidden:/smalltalk.git \
    co -d smalltalk HEAD
  cvs -d :pserver:address@hidden:/smalltalk.git \
    co -d smalltalk stable-2.3

When you update from within the checked out directory you do not need the -d options anymore:

  cvs update


As with Arch, after checking out the Git or CVS repositories, in order to build GNU Smalltalk you will need the following tools installed:

* Autoconf 2.60 or later
* Automake 1.9 or later
* Libtool 1.5.x

You will then need to issue the following commands:

  autoreconf -fvi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]