[clo-devel] Using git for a common-lisp.net project.

Philippe Brochard pbrochard at common-lisp.net
Tue Jun 7 20:39:53 UTC 2011


Ok, I got git and trac working together on common-lisp.net.

Here is a full record of what I've done:

1) Clone an existing repository or create a new one:
   ------------------------------------------------

$ mkdir /project/clfswm/public_html/git
$ git clone --bare git://repo.or.cz/clfswm.git
or
$ mkdir clfswm.git && cd clfswm.git && git init --bare
(or something like this)

$ cd /project/clfswm/public_html/git/clfswm.git
$ git update-server-info

(Don't know if this is really needed)


2) Edit git configuration:
   ----------------------

$ emacs /project/clfswm/public_html/git/clfswm.git/config
-----
[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
        sharedrepository = 1
[receive]
        denyNonFastforwards = true
[hooks]
        mailinglist = clfswm-cvs at common-lisp.net
        emailprefix = [clfswm-git]
        showrev = "git show -C %s; echo"
-----

3) Ask for admin to create a link: from
   ------------------------------
/var/git/projects/clfswm/clfswm.git to /project/clfswm/public_html/git/clfswm.git


4) Edit trac configuration:
   -----------------------

$ emacs /project/clfswm/trac/conf/trac.ini

Here is the diff with the original:

--------------------------------------------------
27a28,34
> [components]
> #tracext.git.git_fs.gitconnector = enabled
> tracext.git.* = enabled
> #tracopt.ticket.commit_updater.committicketreferencemacro = enabled
> #tracopt.ticket.commit_updater.committicketupdater = enabled
>
>
86c93,95
< repository_dir = /project/clfswm/svn
---
> #repository_dir = /project/clfswm/svn
> repository_dir = /project/clfswm/public_html/git/clfswm.git
> repository_type = git
91a101,118
>
>
> ## The following were taken from http://trac-hacks.org/wiki/GitPlugin#Installation.
> ## But I commented out the settings suggested there to take the defaults for now.
>
> ## the following settings are only supported for plugin version 0.11 or later
> [git]
> ## let Trac cache meta-data via CachedRepository wrapper; default: false
> cached_repository = true
>
> ## disable automatic garbage collection for in-memory commit-tree cache; default: false
> persistent_cache = true
>
> ## length revision sha-sums should be tried to be abbreviated to (must be >= 4 and <= 40); default: 7
> shortrev_len = 6
>
> ## executable file name (in case of doubt use absolute path!) of git binary; default: 'git'
> git_bin = /usr/bin/git
--------------------------------------------------


5) Resync trac with the new git repository:
   ---------------------------------------

$ trac-admin /project/clfswm/trac resync


I hope I haven't done something really wrong. But all seems to works the right
way.

Do you want to add this steps on the hosting documentation page (indeed
with a 's/clfswm/$PROJECT/')? I can write this if you want.

Thanks for your help,

Regards,

Philippe

Philippe Brochard writes:

> Hi,
>
> I'd like to know how I can setup a git repository for a project on
> common-lisp.net (namely: CLFSWM)?
> For now I'm using svn on common-lisp.net and git on repo.or.cz.
> But since I use mostly git for my other projects and most of clfswm
> developers use the repo.or.cz git repository to participate, I'd like to
> use only git coupled with the trac on common-lisp.net.
>
> I maintain both git and svn repositories with some homemade scripts, but
> its not an acceptable solution (even if that works for some years now).
>
> So, is there a way for coupling git and trac on common-lisp.net and can
> I use it there?
>
> Thanks for your job and for any reply.
>
> Philippe Brochard (hocwp) - CLFSWM developer.
>
> _______________________________________________
> clo-devel mailing list
> clo-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clo-devel




More information about the clo-devel mailing list