List Info

Thread: Switching to git




Switching to git
country flaguser name
Switzerland
2008-01-15 08:40:54
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 
smalltalksv.gnu.org and bonzinignu.org--2004b 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.sv.gnu.org/smalltalk.git
   git clone http://git.sv.g
nu.org/r/smalltalk.git

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 
 
'http://git.savannah.gnu.org/gitweb/?p=sma
lltalk.git;a=snapshot;h=master'
   wget -O smalltalk-2.3-latest.tar.gz 
 
'http://git.savannah.gnu.org/gitweb/?p
=smalltalk.git;a=snapshot;h=stable-2.3'


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 http://repo.or.cz/ -- if you
do 
it, please write something on the wiki.  You can get some
inspiration at 
http://repo.or.cz/about.
html and 
http://
savannah.gnu.org/maintenance/UsingGit.

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 meexample.com--2007/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:anonymouspserver.git.sv.gnu.org:/smalltalk.git 
     co -d smalltalk HEAD
   cvs -d :pserver:anonymouspserver.git.sv.gnu.org:/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



Building
========

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
   ./configure
   make

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Switching to git
country flaguser name
Switzerland
2008-01-15 08:48:41
> 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.

... from within another branch such as "master",
of course.

Paolo



_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Switching to git
country flaguser name
Switzerland
2008-01-15 08:48:41
> 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.

... from within another branch such as "master",
of course.

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Switching to git
user name
2008-01-15 23:41:54
	For newbies:

On 15.01.2008 20:40:54, Paolo Bonzini wrote:
...
> 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:
...
There's a tradition to advice reading "Everyday
GIT" and both Tutorials  
to newbies. You can find those in your local Git
documentation or Git  
website. For Russian-speakers http://freesource.info has
some useful  
bits of info.

> You can also browse the Git repository within a web
browser.

Several GUIs available, that give a very good presentation
for both  
newbies and experienced. Worth to notice are qgit and
giggle.

> 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.

If you don't have a public repo, git-diff is to help in
"plain text  
patch" manner.

Git is a great and flexible. It worth time you spend to
learn it.

Best regards, Ildar.
-- 
Ildar  Mulyukov,  free SW designer/programmer
================================================
email: ildarusers.sourceforge.net
home: http://tuganger.narod.ru/
ALT Linux Sisyphus
================================================


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Switching to git
user name
2008-01-17 03:27:06
On 15.01.2008 20:40:54, Paolo Bonzini wrote:
>    git clone http://git.sv.g
nu.org/r/smalltalk.git

	Hi!

Would you mind setting tags to easily find releases in the
tree? Or /  
and publish commit name (sha1) when announcing a new release
(along  
with snapshot ftp reference)?

Thanks! Best regards, Ildar
-- 
Ildar  Mulyukov,  free SW designer/programmer
================================================
email: ildarusers.sourceforge.net
home: http://tuganger.narod.ru/
ALT Linux Sisyphus
================================================


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: Switching to git
country flaguser name
Switzerland
2008-01-17 03:51:26
Ildar Mulyukov wrote:
> On 15.01.2008 20:40:54, Paolo Bonzini wrote:
>>    git clone http://git.sv.g
nu.org/r/smalltalk.git
> 
>     Hi!
> 
> Would you mind setting tags to easily find releases in
the tree? Or / 
> and publish commit name (sha1) when announcing a new
release (along with 
> snapshot ftp reference)?

It's on the todo list.

If you would like to do that for some releases, it would
help.

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )