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.
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@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@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clo-devel
Follow up to have emails notifications:
6) Copy emails scripts from oct project: ------------------------------------
$ cp /project/oct/public_html/git/
$ cp /project/oct/public_html/git/post-receive . $ cp /project/oct/public_html/git/post-receive-email . $ cp /project/oct/public_html/git/trac-post-receive-hook.3.py .
$ cd hooks/ $ ln -sf ../../post-receive
7) Edit post-receive and trac-post-receive-hook.3.py: -------------------------------------------------
$ diff /project/oct/public_html/git/post-receive post-receive 3c3 < DIR="/project/oct/public_html/git" ---
DIR="/project/clfswm/public_html/git"
$ diff /project/oct/public_html/git/trac-post-receive-hook.3.py trac-post-receive-hook.3.py 72,73c72,73 < TRAC_ENV = '/project/oct/trac' < GIT_PATH = '/usr/local/bin/git' ---
TRAC_ENV = '/project/clfswm/trac' GIT_PATH = '/usr/bin/git'
Best regards,
Philippe
Philippe Brochard writes:
Ok, I got git and trac working together on common-lisp.net.
Here is a full record of what I've done:
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)
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@common-lisp.net emailprefix = [clfswm-git] showrev = "git show -C %s; echo"
Ask for admin to create a link: from
/var/git/projects/clfswm/clfswm.git to /project/clfswm/public_html/git/clfswm.git
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
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@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clo-devel
clo-devel mailing list clo-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/clo-devel