在 2017年8月10日星期四 UTC+8下午5:50:22,RjOllos写道:
>
>
>
> On Thu, Aug 10, 2017 at 2:48 AM, Mingxing Tian <mx....@qq.com 
> <javascript:>> wrote:
>
>> I try to create the file "post-receive" and enter the contents of the 
>> given, of course, modify the value of the above two lines of variables. But 
>> the result is a failure, this way is not correct. 
>>
>
> We need to know the exact steps you took and the error messages you 
> received in order to help you determine what you did incorrectly.
>
> - Ryan 
>

My steps:
 
[root@host105 svnconf]# cd /home/git/repositories/testing.git/hooks/
[root@host105 hooks]# touch post-receive
[root@host105 hooks]# vim post-receive
[root@host105 hooks]# cat post-receive
#!/bin/sh
tracenv=/home/projects/xxx     # change with your Trac environment's path
repos=testing                   # change with your repository's name
while read oldrev newrev refname; do
    if [ "$oldrev" = 0000000000000000000000000000000000000000 ]; then
        git rev-list --reverse "$newrev" --
    else
        git rev-list --reverse "$newrev" "^$oldrev" --
    fi | xargs trac-admin "$tracenv" changeset added "$repos"
done
[root@host105 hooks]#


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to