Issue running git-svn-mirror script on code

Geert Janssens janssens-geert at telenet.be
Fri Jan 25 12:43:10 EST 2013


On 25-01-13 18:12, Derek Atkins wrote:
>
> I'm fine with this.  I *may* have some time this weekend, but not a
> lot.  I promised I'd use this weekend to clean up my office so I wont
> really be online much.
I won't have time this weekend.
> Also, I'll need some help with:
>
> 1) setting up the repos to point to github.  I suspect this just
> requires setting up an origin or something to properly push, but I'm
> still a git newbie and would like to get someone more knowledgable to
> help.
I'll leave this to John.
>
> 2) writing the gitolite hook script(s) to push the updates up.  Again, I
> want to make sure it's done right.
We could write pure git hook scripts and insert them in each repo, but I 
think it would be more useful to manage all the hook scripts inside the 
gitolite-admin repo. This will allow each admin to make the necessary 
updates.

In order to do so, you will have to configure gitolite to look for hooks 
in the gitolite-admin repo. Here's a starting point:
http://sitaramc.github.com/gitolite/cust.html#hooks
http://sitaramc.github.com/gitolite/cust.html#pushcode

Basically, you set LOCAL_CODE to some location inside the gitolite-admin 
repo and create the directory structure as shown in the second link. 
Then we can add hooks in hooks/common. From what I understand, gitolite 
hooks are just like git hooks, with the exception that the "update" hook 
is reserved for gitolite.

So we need to figure out what is the equivalent git hook to svn's 
post-commit, and write a script that does what we want: send mails upon 
commit. From
http://git-scm.com/book/ch7-3.html
I find a post-commit hook that can be used or the server side's 
post-receive. The former is closer to the svn's post-commit, so is 
probably the easiest to work from.
> Once we do this then we should make sure that the only account that can
> write into the github repos is the code-gnucash-org account that I set
> up specifically for the server automation.
>
Except for some admins maybe, just in case something goes out of sync 
and some manual intervention is needed. Anyway, modifying these write 
permissions is straightforward on github.

Geert


More information about the gnucash-devel mailing list