Allereerst weet ik niet zeker of ik op het goede forum zit, aangezien het niet echt een OS vraagje is maar ik weet even niet waar het anders te posten.
Ik ben aan het proberen om een link te maken tussen Subversion and Track. Bij een subversion commit moet het log worden toegevoegd een een Ticket in Trac. Mij lijkt dit iets wat al vele male eerder is gedaan maar ik kan er weinig info over vinden. En omdat ik nu in de officiele Trac gebruikersgroep vastloop probeer ik het eens.
Dit is wat ik heb gedaan, in mijn brak engels, ik hoop dat dat geen probleem is:
First I created "post-commit" in "/var/lib/svn/project/hooks".
Second I copied "/usr/share/trac/contrib/trac-post-commit-hook" to
"/var/lib/svn/project/hooks"
I did "chown www-data.www-data" to both files. And also for testing purpose
I did "chmod 777" to both files, to make sure it's not a permission issue.
"/var/lib/svn/project/hooks/post-commit" contains:
With TortoiseSVN I made a change in subversion, in the comment I added "refs
#1", revision 19 is created. But nothing happens in trac. Also no log
information is written.
After running the post-commit hook from the command line(sudo -u www-data
/var/lib/svn/project/hooks/post-commit /var/lib/trac/project/ 19) everything
goes well, the SVN commit message is added to the specified Trac Ticket.
The "post-commit.log" file is also created(empty,nothing goes wrong?).
So the Post-commit hooks is not called when I do a commit wit TortoiseSVN,
so I think I forgot something. But I read the documentation over and over
but I can't find out what I do wrong.
Ik ben aan het proberen om een link te maken tussen Subversion and Track. Bij een subversion commit moet het log worden toegevoegd een een Ticket in Trac. Mij lijkt dit iets wat al vele male eerder is gedaan maar ik kan er weinig info over vinden. En omdat ik nu in de officiele Trac gebruikersgroep vastloop probeer ik het eens.
Dit is wat ik heb gedaan, in mijn brak engels, ik hoop dat dat geen probleem is:
First I created "post-commit" in "/var/lib/svn/project/hooks".
Second I copied "/usr/share/trac/contrib/trac-post-commit-hook" to
"/var/lib/svn/project/hooks"
I did "chown www-data.www-data" to both files. And also for testing purpose
I did "chmod 777" to both files, to make sure it's not a permission issue.
"/var/lib/svn/project/hooks/post-commit" contains:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| #!/bin/sh # POST-COMMIT HOOK # # The post-commit hook is invoked after a commit. Subversion runs # this hook by invoking a program (script, executable, binary, # etc.) named 'post-commit' (for which # this file is a template) with the following ordered arguments: # # [1] REPOS-PATH (the path to this repository) # [2] REV (the number of the revision just committed) # export LD_LIBRARY_PATH=/usr/local/lib export PYTHONPATH=/usr/local/lib/python2.4 REPOS="$1" REV="$2" /var/lib/svn/P0001/hooks/trac-post-commit-hook -p "$REPOS" -r "$REV" >> post-commit.log |
With TortoiseSVN I made a change in subversion, in the comment I added "refs
#1", revision 19 is created. But nothing happens in trac. Also no log
information is written.
After running the post-commit hook from the command line(sudo -u www-data
/var/lib/svn/project/hooks/post-commit /var/lib/trac/project/ 19) everything
goes well, the SVN commit message is added to the specified Trac Ticket.
The "post-commit.log" file is also created(empty,nothing goes wrong?).
So the Post-commit hooks is not called when I do a commit wit TortoiseSVN,
so I think I forgot something. But I read the documentation over and over
but I can't find out what I do wrong.
Familieman, nerd, mooi weer fietser, buitenmens en levensgenieter...