On Friday, April 10, 2020 at 10:50:16 AM UTC-7, tw77 wrote: > > Hi, > > I can't get rid of the per-request synchronization. > > Here's the setup: > - Ubuntu Server 16.04.6 > - Trac 1.2.5 > - Git 2.7.4 > > I have a single Trac project with 2 svn repositories. I've defined > post-commit hooks for them and everything works as expected (surce > browsing, timeline, ticket referencing). > > But now I'm trying to add a third repository, a git one. > I configured a post-receive hook: > > #!/bin/sh > export PYTHON_EGG_CACHE="/tmp/python_egg_cache" > /usr/local/bin/trac-admin /path/to/my_trac_env changeset added "$1" "$2" > > But it doesn't the job! > > I can browse the source code, i can see commits in the timeline, but the > commits aren't added to the tickets. > > This behaviour (timeline has commits, tickets don't) is often connected > with sync_per_request. But as far as I can see, I don't have it enabled. > > The trac.ini doesn't have it on and in the "repository" table the > "sync_per_request"-option ist set to false for the git repository. > > The post-receive hook seems ok; if I call it directly (like mentioned > here: https://groups.google.com/d/msg/trac-users/ELU632puVSg/cMIUr-44BQAJ > ), the ticket get the expected comment. > > What else can I do? Where can I control the sync-behaviour? > > > Thanks in advance, > > Thomas >
You may need to enable [git] cached_repository https://trac.edgewall.org/wiki/TracIni#git-section We have an open ticket for making the behavior more consistent across repository backends: https://trac.edgewall.org/ticket/12406 There's also a robust post-receive hook here: https://trac.edgewall.org/ticket/10730#comment:11 But if you call the hook directly and it works, it seems like the problem is that your Git hook is not being called when a commit is pushed. - 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 view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/8130eaa1-624f-43f4-9370-cdc24f1024af%40googlegroups.com.
