On Tuesday, May 28, 2019 at 2:28:09 PM UTC-7, J Cornily wrote:
>
> Hi Ryan,
>
> Thanks of your reply and help, i did get rid off the permission error,
> by having assigned the depot group ownership directory tree to apache.
> My trac env is located in  /var/lib/trac/uuuu 
> Here is the ls -l /home/jdum/gtrac/.git/hooks  of my depot
>
> drwxr-xr-x. 2 jdum apache 4096 28 mai   21:02 .
> drwxr-xr-x. 8 jdum apache  163 28 mai   21:02 ..
> -rwxr-xr-x. 1 jdum apache  452 28 mai   21:02 applypatch-msg.sample
> -rwxr-xr-x. 1 jdum apache  896 28 mai   21:02 commit-msg.sample
> -rwxr-xr-x. 1 jdum apache  107 28 mai   21:02 post-commit
> -rwxr-xr-x. 1 jdum apache  445 28 mai   21:02 post-receive
> ......
> # The post receive hook looks like 
> --------------------------------------------------------------------------------
> tracenv=/var/lib/trac/uuuu    # change with your Trac environment's path
> repos="(default)"                   # 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 sudo trac-admin "$tracenv" changeset added "$repos"
> done
> # The post commit hook looks like 
> ---------------------------------------------------------------------------------------
> #!/bin/bash
> REV=$(git rev-parse HEAD)
> sudo trac-admin /var/lib/trac/uuuu changeset added "(default)"  $REV
> # 
> ------------------------------------------------------------------------------------------------------------------------------------
> Here is part of the batch script i used to register my depot with trac
> if [[ -r $GIT_REPO_DIR && -x $GIT_REPO_DIR  ]]
> then
>     cd $(dirname $GIT_REPO_DIR)
>
>     rev=$(git rev-parse HEAD)
>     sudo trac-admin "$PROJECT_DIR" changeset added "(default)" $rev && 
> _mok "$GIT_REPO_DIR is synced with trac database"
>     sudo trac-admin $PROJECT_DIR repository resync "(default)" $rev && 
> _mok "$GIT_REPO_DIR is resynced with trac database"
>     #sudo trac-admin "$PROJECT_DIR" repository alias "gtrac" "(default)" 
> && _mok "$GIT_REPO_DIR set alias for (default)"
>
>   
>     #_mdbg 2 "Repo: $GIT_REPO_DIR is readable"
> else
>      _mnok "Repo is not readable"
>      exit 4
> fi
>
>
> #------------------------------------------------------------------------------------------------------------------------------------
> Attached are my trac.log file (uuuu.log)
>                        my trac.ini
>                        some screen shots on the trac web interface side.
> Attached are some web trac interface (depot view)
>
> Otherwise i'm using  Centos 7, and trac 1.2.3
>
> So far, i  registered the depot with trac, 
> then i make some change in my depot /home/jdum/gtrac
> e.g: >fff ; git add fff; git commit -m "ffff added"; git push
> The post-commit hooks proceed, it appears in the log file
> But in the depot  section in the web trac admin interface
> There's no sign of the commit's made, and no sign of the trac browser 
> either.
>
> Thanks for your time and help
> Mfg
> Jacques
>

I'd use this Git hook:
https://trac.edgewall.org/wiki/TracRepositoryAdmin#Git

I noticed in the logs:
(139726099257152) Trac[uuuu:git_fs] DEBUG: disabled CachedRepository for 
'/home/jdum/gtrac/.git'

Please try enabling [git] cached_repository:
https://trac.edgewall.org/wiki/TracIni#git-section 

Then issue a resync of the command line. Hopefully the Repository Browser 
is showing your changes at that point, and we can go from there.

- Ryan

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/9d5ff460-8179-46c7-89a5-b6331b694bc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to